texts: Identifying a vintage lighting sequencer method

texts:
In India, on certain social festivals like Durga Puja, Kali puja etc, lighting decorations are done around roads etc, where various themes or stories are animated (such as stories from Aesop's fables), using a complex array of chaser light techniques.
Nowadays these chaser effects are done on LED lights using sequence generator chips or ICs. Back when I was a kid, say in the early 90's, the task was done in an entirely different way. There was a big motor (usually a ceiling fan motor) attached with a drum-like structure, and there were and some carbon brushes connected with that drum looked somewhat like this:

When the drum revolved, the unevenly placed conductive plates touched the carbon brushes at a different time-period, it resulted in switching on associated light series. I still can see in my mind's eye the falling sparks from the carbon brushes.
But unfortunately after web crawl through several years I couldn't found a single blog mentioning this vintage lighting technique. When I ask people in person, I see most people forgot it or may be they never noticed it. The laypeople who sewed the stories on iron grids were mostly uneducated poor people, seemingly blogging was not possible for them. I wonder how a wildly popular technique can just be forgotten.
My question is:
Is there a name for this mechanical sequence generation technique?
Prior research
I have thoroughly searched wikipedia and other internet websites.
I also asked my dad who told me the "drum" like portion were probably a bit more complicated than this, containing some gears that reduces the speed of switching. I found some blogs that mention use of relay switch as a sequence generator, but I really did not find any mention of motors as sequence generators.
Confession and request
Our family got our first camera in around 2007 (which was a Kodak film camera,) when this lighting technique was already obsoleted, so we do not have any photographs of this technique. If anybody has a picture of this technique, please add the photograph and a permission to reuse.
See also:
Modern day version (LED based) of such lightings:
https://www.youtube.com/watch?v=gV72RqjA-4A
https://www.youtube.com/watch?v=BfbLxQVMpOI


texts: How to switch yard lights without ending up with a really long circuit

texts:
We're planning to install some area lights in the farm yard, and want to be able to turn them on from the house.  This is simple enough with normal house switches, but I'm concerned that the overall distances are going to cause problems with wire resistance.  We're looking at a total circuit length in the hundreds of meters range, probably with 20A @ 110V worth of total lighting, let alone the wire load. Should I be concerned?  Is there a commercially-available switch solution that I can readily employ?  What do large facilities do for this sort of thing?

I know a fair amount about residential electrical wiring, but I'm no electrician.


texts:
Has anyone connected a c10 battery with a c20 battery in parallel or series.
Will this work?
What are the problems of connecting 2 batteries with different c ratings to the same inverter?


texts: DBC file with 2 messages with same ID (CANBUS)

texts:
I have a DBC file and inside of this file there are the lines bellow:

  BO_ 1 BCS_Vout: 8 HIL  SG_ Vout_01 : 0|15@1+ (4,800) [0|32767]
  "mV"  BCS

  BO_ 1 BCS_Load: 8 HIL  SG_ Load_01 : 0|15@1+ (5,0)
  [0|32767] "mA"  BCS

How the ECU will differentiate between these messages, since the message ID are the same?

TIA


texts:
simulate this circuit – Schematic created using CircuitLab

I'm using Arduino Mega Pro 5V. Pins use a max of 40-50mA.

I'm connecting 3 RGB super bright 5mm LEDs. Currently wired in parallel each light with 100Ω resistor.

I'm hooking the lights up to fiber optic fabric and they just aren't lighting the Fiber optics up very well. I'm having them switch from Pink to Blue with PWM pins. I'm trying to figure out how to get the lights brighter. After thinking about it I'm confused to if I need the resistors or if I'm using to high since they are all connected to the same pin. I think this is dulling the light alot.

I need 10 lights total 2 groups of 3 lights and two groups of 2 lights so on the two lights I can see where I may need a small resistor but since the Aurdino already limits part of the current.

This is only my 2nd project, its for a costume Sewing I'm expert. I've only recently started adding electronics and I'm teaching myself so sometime need the help of other more experienced than me.

Here is the only information I have on the lights. And I'm Using the Arduino Mega Pro 5V from Sparkplug. Currently I'm using a lilypad max 40MA but I need more PWM pins so I'll be switching to sparkplug board (it shipped today)
I tested my lilypad red pin with multimeter and it was drawing 30-40MA.

Condition: 100% Brand new and high quality
Material: Plastic and metal
Quantity: 100 pcs
Mode: Common Cathode
Forward Voltage: 1.8~3.4V
Power: 0.06W
Bulb Diameter: 5mm
Total Length: 36mm
Package include: 100pcs common cathode 4-Pins Led light


texts: The reason why will the VDC influence the output of comparator

texts:
There is my schematic,teacher gave us,for the comparator, Theoretically,when the black line is bigger than blue,the red one will become "signal one".but i found the vdc value will influence the output wave,why ?which VDC value is the suitable for this comparator?how do i know that?

You can see the pictures below for different VDC

VDC=1.8V,and the output(red) are all "signal one"

2.VDC=5V,and actually we can know the comparator does work,but i am not sure that the comparator work correctly or wrong,or just have big delay.

3.There are VDC=10V and 15V,and we can compare them with the wave for VDC=5V,we can found the "signal one become thinner",and i think the delay become shorter

4.VDC=50V,and the wave does't become shorter,it becomes fatter,and there is a pulse when the signal change(0 to 1 or 1 to 0),and the delay time is shorter and shorter


texts: Thevenin Equivalent Network: How to treat Capacitor across 0v potential, with Dependent Sources?

texts:
We were given this question in our intro to EE course:

Find the Thevenin equivalent network between points a and b for the circuit shown in the image below:

For the short-circuit current, I redrew the circuit as follows:

I'm a little confused about where to proceed from here, though. My prof said a cap across 0V potential has zero resistance and should be treated as a short-circuit. However, this creates a wire loop surrounding the dependent current source. I wonder if, since 0V = the potential across the cap, if the cap should be treated as an open circuit instead (since the cap's voltage is at the potential on either side of it, and this would remove the wire loop)?

Any ideas on how to proceed? Is there a mistake?

Bonus question: what would be the best way to approach finding the Open circuit voltage (Vx, in this case)? I've tried but get an ugly 3x3 complex matrix to solve.

TIA


texts: What happens if an inverter neutral is bonded to earth

texts:
My question is similar with this question: https://physics.stackexchange.com/questions/299199/will-a-battery-connected-to-the-earth-eventually-deplete#:~:text=First%20off%2C%20every%20battery%20will,circuit%2C%20current%20does%20not%20flow.
Let's say I bond a true sine DC to AC inverter's neutral wire to my subpanel's neutral (which is bonded to earth in my main panel).
I know most DC to AC inverters don't really generate a negative current for half the AC cycle. 85 volt is alternately applied to both the hot and neutral leg.
What will happens if the 85 V energized leg is grounded?
Does a flow of current between my inverter AC outlet neutral and the ground will be observed? Can this damage the unit or everything will be fine and the potential between the hot and neutral leg will be as expected?


texts: inverting address decoder with low after high

texts:
I have an 74137 address decoder and know how to build one like that from basic gates. But in my use case the address decoder is connected to the enable pins of a number of bus drivers and I fear this will cause temporary shorts.

So I want to make sure the old bus driver is always disabled before a new bus drivers is enabled. The bus drivers have an active low enable pin so I need an inverting address decoder. Overall the address decoder has to only set the new output to low after setting the old output to high.

How do I build an address decoder like that?

Note: I only need a 2-to-4 address decoder and I can probably extend a 1-to-2 example myself.

(Does any 74xx series chip do this?)

Update:

I've created a little test setup with just a 74139 and 2x 74541 and connected the output of the address decoder to an oscilloscope:

simulate this circuit – Schematic created using CircuitLab

What I see is that the 1Y0 and1 Y3 outputs are nearly complements. As Y0 falls Y3 rises at about the same speed. After 15ns they hit the mid point and cross. After 30ns 1Y0 is below 5% and 1Y3 above 95%.

The output of the bus drivers (Y1) only starts to change at 25ns and takes 25ns to reach >95%. So overall it takes 50ns from the time the address inputs change to the bus having switched.

What concerns me is that I see a voltage drop on Vcc from 5V to 4.6V on the switch. Low point is at 15ns, when 1Y0 and 1Y3 are both at 50% level and Vcc comes back to 5V at 30ns when the address decoder has finished switching. Power supply is through USB with a 470uF condensator. All chips also have individual 0.1uF condensators between Vcc and GND.

My conclusion is that I do see the two bus drivers going active at the same time and the resulting short pulls down my limited power supply. And power must not drop below 4.5V as that's the minimum required for other components.

So any tips how best to modify the 74139 or build an address decoder from gates to make it go low only after high on the old output is established? Should I run the outputs through 2 OR gates to delay any falling edge?

simulate this circuit


texts: Why high quality broadcast studio monitors use a middle range AB amplifier?

texts:
I had an issue with my Genelec 8010A studio monitors. Until recently I was truly happy with these monitors. The sound quality is exceptional, pure, precise the dynamic is impressive even though you need a subwoofer to have a better cover the low frequencies.

Anyway, one of my speaker stopped working few days ago and I decided to take a deep  look. The active monitor is based on a embedded TDA7269A (AB, 2x14W, 0.03..0.7% THD). I am not an expert in audio electronics, but I am a bit surprised that such products use a very middle range integrated amplifier.

Is this something surprising. I would like to get an "engineering rationale" for this kind of technical choices.


texts: Typical impedance values for a large 150 MVA power transformer

texts:
I am trying to calculate the impedance in ohms for a 220kV/110kV 150MVA transformer (European grid), but the values I am getting are not in range of values I usually see in online examples.

X in p.u. is 0.06 p.u., so I used:

$$\begin{align*}
Z_{B220} = \frac{V_b*V_b}{S} &= \frac{220\cdot220}{150}\approx322.6 \\
\\
X_{220} &= 0.06\cdot322.6 = 19.3
\end{align*}$$

Does this look like a reasonable value? Secondary side (150kV) would yield ~5 ohm using these formulas.

The reason why I am not sure is that I found some examples online which usually had much smaller values, so I am not sure if I am using p.u. values properly.


texts: Using series P-Channel MOSFETs for high-side switching

texts:
I am looking at using two p-ch MOSFETs in series as part of a high-side load switching scheme, and do not understand the following circuit behaviour.

In simulation of the simplified schematic below, no current is driven into the load:

Edit: The MOSFETs being modelled are DMP2008UFG, model supplied by manufacturer

If neither Q1 or Q2 are conducting, Q2 has a floating source voltage and therefore undefined Vgs.

What I expected to happen:

Q1 to turn on, as its Vgs > Vth.
As Q1 is on, then Q2's source if no longer floating and is instead defined at near Vcc.
As Q2's Vgs>Vcc, Q2 conducts
Current flows into the load

Clearly I am misunderstanding the circuit. Why does no current flow into the load?

Many thanks in advance,

Gerry


texts: How can 100Base-T achieve 100 meter distance at 125Mhz clock?

texts:
I admit I have some large holes in my understanding of this topic, but it seems like you run into physical limitations of the speed of light.

If the speed of electricity through copper is about 280,000,000 meters per second, and the clock on the ethernet card is running at 125Mhz (found this online, not sure if this is the right speed), the signal should only be able to travel about

280,000,000 * (1/125,000,000) = ~2.24 meters

before the next clock cycle starts. Assuming only 1 bit can be on a wire at a time (possibly a bad assumption), how is 100 meters possible?


texts: Using 60Hz clamp meter for measuring current that is not 60Hz

texts: What should I expect when I use a clamp meter rated for 60Hz to measure current that is not 60Hz (Eg. 100Hz) ? Will the RMS current value be higher/lower accordingly?


texts: Is EMF induced in a conducting loop moving in a uniform magnetic field with uniform velocity perpendicular to the magnetic field?

texts:
Due to the the magnetic force= q(v × B), the separation of charges must take place. One point must be at high potential than the other. So can't we just take the separation of the charges as the induced EMF?

Whereas Faraday's law defies this logic.


texts: Oscilloscope to Function Generator Trigger Delay

texts:
Simple question, is it common for there to be a delay between an external trigger out from an oscilloscope to the trigger in of a function generator?

Specifically, I have a Rigol 1054Z oscilloscope and a Rigol DG1022 function generator. The oscope is measuring a signal for a rising edge trigger, the trigger out signal is connected to my function generator via a BNC. My function generator is set to be a pulse for 350ns configured in burst mode with an external trigger. This output is connected to a T junction with one side connected to a Max chip and the other to a BNC connected back to my oscope. I'm measuring ~750ns of delay from when my trigger fires to when the function generator outputs. Is this normal? Is there some setting that could improve it? I tried looking in the datasheets but I do not see anything mentioning the external triggers and some delay except maybe some 10ns or less fields.

Yellow=Control, Purple=Signal from generator, Blue=Output of Max chip.

Any hint as to this being normal or not would greatly help thank you.


texts: Can I generate pure sine wave with just a clock and amplifier?

texts:
I see pure sine wave DC to AC inverters cost a lot more than the modified sine wave ones due to added complexity.
Can't we just take a DC source, feed it into a quartz clock to create a sine wave, then amplify it up in order to create a pure sine wave? If so, why do they even bother creating these modified sine wave inverters as should a simple clock + amplifier be pretty cheap?


texts:
I need to run a 12v fan (440w) from a 240v supply - what would be the best way? Should of mentioned that this fan is attached to a car conditioning rad and therefore dc. - Sorry.

Thanks to those who answered.


texts: Appreciate help in identifying this vintage IC - Fairchild HL41109 QB

texts: Trying to find out what this one is has been a real head-scratcher. Google leads me down numerous rabbit-holes to dead ends. And I see 1 or 2 for sale on eBay, but apparently they have no idea what it is either. Insight, help, moral support would all be greatly appreciated - thanks!


texts: Automate Noise Sensitive Designs of SMD For 95% Sensitivity

texts:
I am thinking of automating my noise sensitive designs of high sensitivity in SMD: maintain 95% signal sensitivity by adjusting the factors (1-3) in the thread What is the best way to layout a PCB with crystal oscillators and MCU?

  Electric fields and especially their rate of change should be
  minimized. - - [M]aximize spacing between
  lines that swing their voltage rapidly Magnetic fields should be
  minimized.
  Magnetic fields are proportional to loop size and rate of
  change of current. - - [D]ecouple anything that has a high
  rate of current change (power conversion, IC power lines) with
  suitable capacitor values and you want to route power lines as closely
  together as possible to minimize the size of the current loops.
  High impedance means low noise immunity. Avoid high impedance lines, and if
  you have them, make them as unsusceptible to noise as possible. Shield
  them, guard them, but ideally just terminate them with a low impedance
  so you don't have to deal with it.

and

Doing Little Filtering of the Signal at the low frequency bands, especially < 10 Hz, but signal target < 500 Hz.

Pseudo automation

How to choose correct amount of layers to maintain 95% sensitivity of the signal?
Simplify board by removing components which filter signal unncessarily.
Estimates of factors (1), (2), (3) for the current designs.

Case Example

Let's consider Biosignal PI's Hat (one version of revision A) as an example.
Assume it is a simple two-layered PCB having ADUM1000 isolated (black-purple stripes at the right-bottom corner) from other two ADUMs (ADUM4400ARWZ, ADUM6400ARIZ) where the latter ADUM is different than in the link's material list here.

which resistors and capacitors are (other components here with exception that ADUM6400ARIZ instead of ADUM6403ARIZ)

Qty   Value   Device  Package Parts on PCB
12    0.1uF   C-USC0805   C0805   C2, C3, C6, C7, C8, C13, C14, C15, C17, C18, C19, C21   CAPACITOR, American symbol
1 100K    R-US_R0805  R0805   R10 RESISTOR, American symbol
3 10uF    C-USC0805   C0805   C9, C12, C16    CAPACITOR, American symbol
2 15pF    C-USC0805   C0805   C4, C5  CAPACITOR, American symbol
1 2.2nF   C-USC0805   C0805   C1  CAPACITOR, American symbol
8 4.5k    R-US_R0805  R0805   R1, R3, R4, R5, R6, R7, R8, R9  RESISTOR, American symbol
3 4.7uF   C-USC0805   C0805   C10, C11, C20   CAPACITOR, American symbol
1 40K R-US_R0805  R0805   R13 RESISTOR, American symbol
1 4M  R-US_R0805  R0805   R11 RESISTOR, American symbol
8 500 R-US_R0805  R0805   R2, R12, R14, R15, R16, R17, R18, R19   RESISTOR, American symbol
3 5K  R-US_R0805  R0805   R20, R21, R22

My comments

About 80% sensitivity of the output signal in the current design.
R20 has different resistance (4.7 \micro\ohm) than C14, C16, C18 and C21 (0.1 \micro\ohm), which is not a good thing because error-prone design.
Some expensive capacitors (10 \micro F and 4.7 \micro F) as I started to discuss about them in the thread Replace Tight Capacitors for Better Tolerance?
I do not understand which frequency bands the capacitors (10 \micro F and 4.7 \micro F) remove. TODO
I am afraid if the two-layers are enough to maintain high sensitive signal.

How can you automate the noise sensitive designs of SMD with only little filtering for 95% Signal Sensitivity?


texts:
BS"D

Hi all.

I'm having trouble analysing the voltages/currents in various logic circuits.

For example, I can't understand WHY a NOT circuit actually works.

I've watched a YouTube video from Ben Eater (link: https://www.youtube.com/watch?v=sTu3LwpF6XI @ time 2:30)

The circuits he presents there is attached here:

Why is it that when you press the switch, no current flows through the LED?

As far as I'm concerned, pressing the switch equals to creating a short between points A and B. So I could replace the transistor with a wire that connects to A and B.

I don't see how these prevents current from flowing through the LED.

Using the equations for parallel loads, some current still flows through the LED.

He also says that when you press the switch, it zeros the potential difference between points A and B.
I can't see how this happens using the equations I have.

Can someone please help and clarify?

Thanks! :)


texts:
I found a great deal on an old Heathkit I0-12 at an auction the other day and decided it would make for a fun project. The unit looks awesome and could probably survive a bomb blast. When I got home, I opened it up to check its condition and surprisingly, short of the dust, it appeared to be in really good shape!

After doing a little bit of research online just about everybody that tries to breath some life into these generally replaces all of the caps and resistors. Which really brings me to reason for this post.

I flipped the switch. There was light!! It took a couple seconds for the cathode ray tube to warm up and I was able to adjust and center a shaky signal, but I was receiving quite a bit of interference. I was able to produce a somewhat erratic sine wave, but there were many peaks along the curve.

I left it turned on for about 10-15 minutes while I messed around with the knobs, and then I heard one of the caps start sizzling, so I immediately shut it down. There was a clear fluid coming from a .1MFD 1600v cap that is connected to the PSU circuit and runs to the CRT. Could this have been what was causing the rough signal?

Does anybody have any experience refurbishing an old oscilloscope like this? Can I expect to see a clearer signal after replacing all the capacitors?

Are each of the tubes rectifiers? Is it worth replacing all of these?

Buying this unit for such a great price I was looking for a great way to expand my knowledge of circuity and gain a nice piece of functional art to add to my workshop.

Any comments, guidance, or constructive criticism would be really great and very much appreciated. Thanks!


texts: Powering LED strips with 5v power supply - safety question

texts:
I am making an LED strip installation.  I will be using 15 meters of APA102 LEDs.  They require constant voltage, I believe.  https://cdn-shop.adafruit.com/datasheets/APA102.pdf

I calculated that I need 23.4A at 5v, or around 120w.  Adding 20% for safety, I figure I need a 150W 5v supply.

I will be buying a power supply from Digikey:  https://www.digikey.ca/product-detail/en/tdk-lambda-americas-inc/LS150-5/285-1817-ND/1918828.

I will be running large wires from the power supply to each of the strips (ie in parallel), while running the LED strips' data lines in series. The Arduino will control the strips, and that will be powered by the supply as well (that should be fine, right?).

I will encase the power supply and Arduino in an aluminium encasement. This will hang from the ceiling outdoors, and be subject to low temperatures in winter (Canada). I am figuring on a temperature range of -10C to 30C. I will be testing it indoor at first, of course.

My confusion is with safety of the power supply. I am relatively new to electronics, and the high current and power makes me a bit nervous, so I want to verify things first.

I think that I need to hook up the live AC wire to L on the power supply, the neutral AC to N, and the ground AC to GND.  I then need to hook up the Arduino and LEDs Vcc to V+, and Arduino/LED GND to V- (correct?).

The installation instructions from the power supply http://www.us.tdk-lambda.com/ftp/manuals/ls_manual.pdf states "This power supply has a possibility for hazardous voltage to appear at output terminal depending on the type of failure. The outputs of these products must be earthed in the end equipment to maintain SELV. If the outputs are not earthed, they must be considered hazardous and must not be made user accessible."

Would you be able to explain what this means I need to do? I have read quite a bit about this, and have an idea of what it means, but I want to be absolutely certain.

I think it means that I need to, in this situation, hook up V- to the AC GND.  Do I have this correct?

Also, do I need to hook up the chassis of both the power supply and the encasement to GND?

Thank you for you help.

EDIT:
Thanks for your answers.  I found this series of articles that made things much more clear for me.  https://www.acromag.com/white-paper-electrical-ground-rules

Also, I am still wondering how to verify that the PE and Neutral on the AC in my house are actually independent, up to the mains board.  This is the best I have found: https://soundforums.net/features/192052-basic-receptacle-testing


texts:
I'm working on my first small electronics project; building a small LM317 based power supply. I've built the circuit as shown in the data sheet (black part of the circuit diagram below) on a perfboard. Now I wanted to add an LED to indicate if the switch is in on (bottom) or off (left) position. I added it to the circuit as shown below (red). However, the LED doesn't turn on if I switch to on position (the power supply itself works fine).

My question is: can this even work if the LED were connected as indicated in the diagram? If not, what would be the easiest solution to get such an on/off indicator LED?

Image link:


texts: How to power a 17W T5 Germicidal UVC Lamp?

texts:
I recently bought a SBL 350T Germicidal Lamp from American Ultraviolet, but have been having some trouble finding out how to power the lamp since I do not have much experience in lighting and the base of the lamp is unique.
After doing some research, I believe I need a ballast and a starter, but am not sure if I need specific ones for this type of lamp because it is not a standard fluorescent light.
The final problem I have is when looking on how to connect the ballast and starter with the bulb most things online have different bases, such as this, so I am wondering how I should connect everything together once I purchase everything I need.


texts: How does earthing work when earth is dry?

texts:
Earthing is meant to provide reliable contact of an electric appliance to earth so that if there's an insulation fault current goes into earth instead of through a person's body. This requires earthing to be made of thick conductors driven deep into earth.

Here's how good earthing was described in one domestic pump manual (I'm pretty sure that it correlates well with local building codes): three steel pipes each at least one inch in diameter and twenty feet (six meters) length must be driven into earth vertically in a triangle pattern with at least two feet distance between each two pipes. The top of each pipe must be at least two feet below the ground surface. A common steel rod must be welded to all three and the equipment being earthed must be connected to that rod. Welding spots must be painted to protect them from corrosion.

Now that's plenty of metal and looks impressive. But how does it guarantee a low resistance path for insulation fault currents? What happens if earth is dry and not conductive enough?


texts: What is the best cable for a 3d printer wire bundle?

texts:
I am connectorizing my Ender 3's hot end through a 15-pin D-sub connector, so I can swap in an E3D hotend much more easily. I have previously done this with another printer, but I am updating my approach. As part of that update, I am looking for a good cable/set of cables to run from the controller board to a D-sub that I will mount by the default extruder motor.
I need to account for 15 wires, with the following allocations:
2 wires, part fan (~0.1Amps at 24v)
2 wires, hot end fan (~0.1Amps at 24v)
2 wires, thermistor (unsure of signal, but thermistor wires are usually 24AWG or less)
4 wires, stepper motor control (~1.5Amps at ~ 5v, signal pulses)
5 wires, BLTouch (under 0.1Amp at 5v)
I will run the heater lines in parallel, with a separate connector. It would be neat to find a clean solution, but I don't expect to find a generic cable with 15 small wires and 2 large ones.
So, I'm looking for a heat-tolerant way to run about 18 inches of cable here. It will be flexing constantly, but that doesn't include any sharp bends or kinks.
Would a pair of ethernet cables be a good fit here? I'm a little nervous about running the fans over that wire gauge. I read Using 2x CAT6 cables for 3D Printer Hot End which suggests that it's fine, but I wonder if there's an obvious better option.


texts: Unreliable switch on string of LED lights

texts:
I have a string of LED lights (think Xmas tree lights) powered by a wall wart (3.2V 1A)

and turned on and off with a simple inline rocker switch

I had troubles with the lights flickering and randomly turning themselves off..I thought the switch was bad so I replaced it with a cheap switch from hardware store. However, this did not fix the issue..the lights sometimes flicker and dim, or altogether turn off (actually become very dim, but not completely off). I do believe the problem is with the switch as compressing the body of the switch (not even the rocker part) ameliorates the light, but that never lasts long. I've double checked a the connections, and the strain relief on the cables, and things look good.

I realized that the switch is rated 230V AC, so I'm thinking maybe the contacts are reliable only at this kind of mains voltage and we're not designed for low DC currents? Are there such in line switch specifically for DC circuits?


texts:
It is a well known fact that high speed signal would have return current path on the plane right beneath it's PCB trace.

Suppose we have 4 layer stackup, SIG-GND-PWR-SIG with dielectrics CORE-PREPREG-CORE respectively. Difference between core and prepreg is that core has cooper filled on both sides of dielectric and prepreg is just full dielectric, no copper on any side of the material.

Why wouldn't return current flow on the top side of CORE between SIG-GND since there is a full cooper plane on top side of CORE?


texts: How do I calculated total current on each line with an even number of circuits (unbalanced)

texts:
In the first example I was calculating  the current each line would see for the purpose of sizing wire. An EE told me my calculation was wrong and that phase A would see 74A not 64A.

I'm wondering what I am doing wrong.

The second example is a slightly different configuration which I would think would be more balanced.


texts: Understanding CFLs in Electrical Circuits

texts:
I wish to have a better understanding of how CFLs work in a electrical circuit like a home.

A CFL broke a little towards the top when I touched it.

I noticed it light up at the bottom and then made a noise. The top near the break did not light up. Was this a short circuit? Could of it damaged something on the same circuit due to excessive amperage or voltage being put back into the circuit when this failure happened?


texts: It is better to fix x's in the simulation or in the design?

texts:
I have a question about how to deal with x's in Verilog netlist simulations.  I have a disagreement with another engineer (who is a bit more senior than I am) about what the right approach is.  Although this question might seem opinion based, I do think there is a right answer even if the views are divided.

I do development for mixed-signal ASICs.  I'm doing netlist simulations of a microprocessor which doesn't have it's program registers reset (it's an ARM Cortex-M3, there is an option to not have the registers reset during synthesis).

We have a ROM which the processor starts executing from after reset.  During that program execution, one program register (R6) has x's in it because it wasn't reset.  At a point in the simulation, x's from that register spread like wildfire through the rest of the design, and breaks the simulation.  We don't see this issue in RTL simulations.

I would prefer to make a design change to cause the registers to be reset or to have the ROM program write zeros to those registers first thing.  My college is very resistant to making any design change to clear out these x's, and he would prefer to mask them in the simulation somehow.

His contention is that the "x's aren't real because x's don't exist in real hardware".  He therefore concludes that the x's in the simulation aren't real, and that any design changes based on these is not a good thing, or at lest, way too extreme of a response.

My contention is that although it is undoubtedly true that x's don't exist in hardware, they represent unknown or unpredictable values.  I believe the gate library models x's to propagate pessimistically.  Therefore, if x's are propagating to kill the simulation, it suggests there could be a combination of bits that would cause a problem.  Since that is a possibility,  I don't see making a design change to clear the x's as being too extreme, even if I can't prove they are absolutely real.  (I suppose I could try a search for the bad combination of bits, but that would be a lot of work.)

Now, I can imagine an answer that the right approach depends on the type of quality that is being developed here.  But, I think that the design changes I've suggested (adding in the resets or clearing them in the program) cost very little (especially modifying the ROM program).  I think that going through the process of masking the bits in the simulation would be much more labor intensive.

What could I be misunderstanding from his point-of-view?  What is the best approach?  Is it really so bad to make a design change for a problem you can't prove is absolutely real?


texts: Why don't wires block out the backlight of LCD/TFT displays?

texts:
Every explanation I've seen about how TFT/LCD screens work only talks about one pixel at a time. My question is: how are thousands of pixels and subpixels connected and controlled?

I assume that they don't have a +ve/-ve pair of wires each or else the wires would block out the light. If the signal is routed through other pixels, how do we control where the signal goes?


texts: How do you implement an Energia interrupt handler?

texts:
So, I have an application that needs to be very conservative with the power.  I use the suspend() command to go into LPM4 and wait for an interrupt to occur.

During the interrupt, I attempt to communicate with an I2C device.  However, Wire.endTransmission() locks up and goes into never-never land.

How can I get around this and allow my interruptHandler to get sensor data?

Is there some methodology for properly using an interrupt handler?


texts: What is the best insulator for suface resistivity? (and triboelectric charging?)

texts: What are good materials to use with high surface resistivity for building capacitors, pH meters, or electrometers?


texts: Can I use a twisted pair cable to send power to a device that uses a micro-USB jack?

texts:
I purchased a Google Home Mini that according to the specs this requires 5V, 1.8A.  The OEM power cable has a transformer that plugs into AC and has about 3 feet of cable terminating at a USB micro plug.

I have in my wall a cable (about 10 feet) with 2 twisted pairs and the gauge is 22. I want to use this to act as an extension to power the Google Home mini.  I would snip off the wire connected to the micro USB cable and solder the wires to the cable in the wall, and then solder the wires at the other end and then plug into an outlet.

Will this work, and is it safe?

ETA:  The cable in the wall was originally for a motion sensor.


texts:
I am trying to further understand the .cir file I have downloaded from Infineon that I am using to model some of their mosfets in LTspice.
In the below example can anyone explain the lines starting with X$M? I can't find this format in any notes elsewhere

(note: Z27 and Z28 are other .subckt functions in the same .cir file)


texts: Typically, what is the function between pulse width and angle in a servo motor?

texts:
I have a pair of Futaba S3001 servers that I am controlling with a Raspberry Pi, using the pigpio library.

To control the angles of the servos, I set the pulse width according to the formula:

pulse_width = centre + angle * multiplier

where centre is the pulse width required for 0 degrees, and the multiplier is a figure arrived at by trial and error to that represents the pulse width difference required for one degree change.

For one servo, I have arrived at:

multiplier_1 = 9.444444444444445
centre_1 = 1350

and the other:

multiplier_2 = 9.222222222222221
centre_2 = 1315

This seems to work reasonably well, at least within +/- 45 degrees.

At larger angles, I am not so sure it's still within bounds, but it's hard to tell.

My questions are:

Is the relationship between pulse width and angle wholly linear, as I am assuming?
Does the linearity break down more towards the ends of the servo's travel?
What sort of accuracy should I expect from a hobby servo such as this?
Is there a better way to arrive at the function I need?


texts: How to trace a net in Altium Designer viewer (search for all places a signal is used)?

texts:
Given a net or off-sheet symbol, how can I follow the entire net, and (this part is important) step through all connections on all sheets?

It seems like a simple thing, but I just can't find it.

The Navigator Panel->Navigator is fine, but still only searches one sheet:


texts: A phototransistor with LED and resistance in emitter

texts:
Earlier I used a simple phototransistor arrangement to detect an on/off signal via a laser pulse.

I connected the collector to Vcc(5V), and emitter was grounded through a resistance. The base was unconnected.

As soon as the laser would bias the transistor, I would be able to observe about 4V at the emitter. Without the laser biasing (and in the normal room lightening condition) the transistor would not bias and I will get 0 reading at emitter.

However for debugging purposes I connected a LED in the emitter circuit as well. But got very strange results. Now the transistor was being biased in the normal light conditions. I am getting about 1-2V at emitter without laser biasing.

I understand that a resistance in emitter causes feedback, and think that LED might be giving a non-linear feedback or something. Is this the reason or am I missing something completely?

Also the transistor starts to work normally as soon as the LED is removed.
Once the transistor is biased with laser the LED glows normally, but even without the laser biasing, the LED does glow although very dimly.


texts: A question about analog IC vs digital IC

texts:
I don't have any experience in designing analog or digital ICs.

But from what I have read there must be a reason to call an IC analog or digital.

I have the following questions:

Does/Can an analog IC include any transistor which are operating in saturation region as switch?

Or similarly can a digital IC include any transistor which are operating in active/linear region?


texts: Turning on/off leds very fast. Will it do harm?

texts:
I am using an arduino board to controll a led strip. 3 transistor and 3 resistors are between the board and the leds. 1 for each color (RGB). I am using analogWrite to change the brightness.

But I wanted to make the leds even less bright, without adding another resistor. I figured out that when i turn them on and off very fast they will not flicker but they will appear to be less bright.

Will this harm the leds? Or is this ok to do? Do other people also use this trick?


texts: No boot messages are being diaplyed while booting FREERTOS

texts:
I asked a question on LCD display with FreeRTOS here. This time my question is a little bit different so I am posting as a new question.

Normally I have seen that when we port Linux on any board having ARM, boot messages come automatically on the LCD. I saw this while porting Android/Angstrom on beagleboard xm.

But in my case when I ported FreeRTOS on the EFM32 Giant Gecko board, nothing appears on the LCD.  I then ran a sample application given in simplicity studio that runs on FreeRTOS and blinks LEDs. This is the only way I know that RTOS is running.

I am expecting that boot messages should come on the LCD as in case of Beagleboard. How do I enable this feature. I guess LCD driver is disabled by default. I think I should try to enable it. Right?

The second approach is I use the following function in the FreeRTOS code to print various messages. In a separate application I have used this function to print characters on the LCD successfully.

Is this the right approach to  display boot messages on LCD?

void SegmentLCD_Write   ( char *string   )
Write text on LCD display.
    Parameters:
        string  Text string to show on display
            Definition at line 767 of file segmentlcd.c.
            References CHAR_TypeDef::bit, CHAR_TypeDef::com,
            EFM_Alphabet,   SegmentLCD_AlphaNumberOff(), and MCU_DISPLAY::Text.
Referenced by SegmentLCD_LowerHex(), and SegmentLCD_LowerNumber().


texts: Measuring an electrical signal without tapping wires

texts:
I came across a product which taps into a twisted pair differential signal without making physical contact with the conductors. Instead, the wires are untwisted for a few centimeters and clamped into cylindrical sensor in a parallel orientation with a small gap between them.

What physical principles is a device like this based on and how does it work?


texts:
I am following the following tutorial (http://www.arduino.cc/en/Tutorial/ShiftIn) to connect a shift-in register to my Arduino. In the tutorial they use a CD4021 'CD4021' shift register and I got a 'm74hc165'. After looking at the datasheet (http://www.datasheetlib.com/datasheet/735260/m74hc165b1_sgs-thomson-microelectronics.html#datasheet) I cannot figure out how to connect the following wires:

Q8 (pin 3) to Ardunio DigitalPin 9 (blue wire)
CLOCK (pin 10) to to Ardunio DigitalPin 7 (yellow wire)
P/S C (pin 9) to Ardunio DigitalPin 8 (green wire)

Mentioned in the tutorial in section 2. Can somebody help me with how to connect these three wires to the shift-register?


texts:
Where can I find a source to buy lavet-style stepper motors?

Can I direct drive lavet-style stepper motors using the uC or do I need a driver IC?


texts: Orange Pi registers pointers list needed

texts: I need the orange Pi lite registers mapping for a project but I can't find it anywhere. Does someone know the mapping of the registers?


texts: simplifying RTD (resistance temperature detector) units

texts:
using a RTD, the norms give you dissipation constants in ohm per ohm per degree C, I dont understand as this should simplify to simply degrees C? what is the meaning of this unit?

Thanks!


texts: Powering a circuit from either USB or LIPO

texts:
I have a small hobby project which includes MCU and some peripherals.
It is powered by 3.3V power source and consumes 200mA-800mA for up to a minute. However, most of the time it's in deep sleep mode where is consumes very little current (as low as 5 µA, hopefully) in order for it to last longer when powered by battery.
Now I would like to power my project by USB when USB is connected, or by one cell LIPO battery when USB is disconnected. When USB is connected I would like it to both power the circuit and charge the LIPO.
Here is the high level scheme I had in mind:

simulate this circuit – Schematic created using CircuitLab
Since USB voltage (5V) is always higher than LIPO voltage, D1 and D2 make sure that when USB is connected the LIPO is disconnected from the DC converter, and when USB is disconnected the LIPO charger is disconnected.
My questions are:

Does my high level scheme make sense? Any special consideration for selecting D1 and D2?
My main concern is how to select the DC converter.
Input voltage ranges from 3V to 5V although I can probably live with the converter shutting down when its input is below 3.3V as most of the LIPO power is consumed before it gets lower.
I'm looking for a high efficiency converter that can handle efficiently both high currents and very low currents, in order to make the battery last longer.
Would a step down converter be a better choice than LDO? What parameters should I look for in the data sheet?


texts: Unable to access structure members through pointer in function called form another funciton?

texts:
While trying to interface BMP180 to my STM32L4 Controller using libraries I found that the ,

BMP180_RETURN_FUNCTION_TYPE bmp180_get_calib_param(void)

funciton called from

BMP180_RETURN_FUNCTION_TYPE bmp180_init(struct bmp180_t *bmp180)

is unable to access the structure member through the pointer.

The BMP180_RETURN_FUNCTION_TYPE bmp180_init(struct bmp180_t *bmp180) takes the structure address and assign it to a pointer,static struct bmp180_t *p_bmp180; declared  globally in  bmp180.c.
 For Example : p_bmp180->calib_param.ac1 =(something) is not actually making any change to the structure member, whereas it changes in the init function( BMP180_RETURN_FUNCTION_TYPE bmp180_init(struct bmp180_t *bmp180)), where the address of the structure is received from bmp180_support.c.

What could be a reason for this and how to solve it?
The IDE used is KeilMDK-V5.


texts:
I found the following part on a circuit board, but I have never seen anything like it before and I am curious.

The blue part is about 1cm long, 5mm high, 4mm thick, and vaguely cylindrically shaped.
There are no further prints on the other side and the ones visible (to me) read 4.00, some kind of round logo and N. I've tried to take a more detailled picture:

On the PCB, the part was labelled with QRC1.
Can someone identify this part?


texts: ADS Simulation: Why doesn't the diode rectify the signal?

texts:
As titled, the diode in my half-wave rectifier did not rectify the AC signal. Vd1 is still AC signal. Therefore Vout ~ 0V. Why could that happen? The diode's parameters are SPICE parameters.

The strange thing is, with exactly that diode's model, for a shunt-diode rectifier, it worked!!! The results are attached. Could anyone give me a hint to solve this problem? Thank you very much.

Results updated when removing DC feed

All of you were right about the DC feed. Thank you very much for pointing out the reason. But there is still one question. Why did not the diode block the negative half-cycle of Vd as it should do in the theory? As observed in my following results, in negative half-cycle Vout amplitude is smaller than that of Vd, but it's not 0. I also removed the DC block, and Vout = Vd. How can it be?


texts:
I have this MAX9278 deserializer.
I am planning to give Shielded Twisted Pair (STP) input to the IN+ and IN- pins of the deserializer instead of COAX input.
Can someone help me to let me know what pins or pin configurations I need to change in the deserializer pin out or what I need to take care incase I am planning to give STP input instead of COAX input?
What would be address in the case of STP input?
I am unable to find clear information in the datasheet regarding this.
Please do help.


texts: USB Type-C DRP Integrated Switch/Interface Chip

texts:
I would like to experiment with a power bank design with a single usb type-c port. The port should have dual role, source current for charging other devices as well as sink current for charging itself.

So far I've looked at various chips that can handle the usb type-c interface and set the mode via CC lines (example TUSB320 series from TI) but none of these can handle the switching of VBUS with mosfets between the battery charging IC and output dc-dc converter according to the current usb mode DFP or UFP.

To achieve this function it seems I need an external controller that would monitor the USB interface chip and command the switching accordingly.

So my question is, do you know of any usb type-c interface chips that can also handle the switching without the need of an additional controller?

I don't need PD, just 5V 1.5A in and out.

Thanks!


texts: Failing to program a third party NRF52832 board with nrf52DK through SWD connector after first time

texts:
I'm trying to flash a simple blincky solution into my 3rd party board through a standard SWD programming header from the debug out port of my PCA10040 NRF52832 DK
with my Segger embedded studio IDE.

I've managed to upload the code for a single time but afterwards this simply doesn't work saying this:

What could be the problem?

Thanks for helping.


texts: Mp2307 maximum duty cycle in the datasheet

texts:
MP2307 datasheet says on the second page: Maximum Duty Cycle when FB=1.00V, 90%. A few lines up says the FB between from 0.900V to 0.950V.

So why calculate with FB=1.00V, if the feedback voltage is ~0.925V?


texts: Power LED constant current driver unstability

texts:
I have a task to design a driver to drive 3W power LED. I have only 4 wires to dim 7 LEDs individually, so I decided to use WS2811 "magic" driver for PWM. The rest of the circuit is to provide constant current for the LED.

U1A, U1B create loop to control current through the LED. D1 (zener) and RV1 (trimmer) allow to set maximum current. Q2 shorts this set voltage to ground with frequency of 2Khz and variable PWM, to control LED brightness. So - I'm not changing current throught the LED - I turn it on (maximum set) and off to set the brightness. I know this is not simplest way to do it, but I've got boards for it for free.
What is the problem?
At lower duty cycles it works ideally. Probe is connected between Q1 drain and ground, 12V is stable.
Set current is about 310mA, and when Q1 conducts it has 400mV voltage drop, so it's limiting the current well.

However, at higher duty cycle circuit "has time to think" and it starts to oscillate.

It has always higher voltage drop, so no damage to LEDs, it works well, but I would love to have it working 100% correct. And one more thing: using a resistor as a load instead of diode also makes it completly stable.
How to make it more stable, keeping ability to dim with 2kHz?


texts: Current amplifier to raise 0-5 mA to 0-20 mA range

texts:
I have a little BLE device that can drive an LED at variable brightness (according to a programmable 0-255 byte value). This works, but has the major caveat that it can only source 5 mA, whereas many LEDs are spec'd to run at 20 mA nominal. The result is that it can only drive the efficient tiny SMD chip LEDs, and not most discrete LEDs.

So I'm looking to make a little current amplifying circuit to take the 0-5 mA and amplify it to the range of 0-20 mA. What approach would be the best to go about doing this? Any pointers are greatly appreciated.


texts: Why we do not need wrist bands for ESD protection when using an iphone?

texts:
When using high performance oscilloscopes, it is recommended to always operate with a wrist band connecting with ground through 1MOhm.

So my understanding for that is the oscilloscopes are designed with ESD protection, however not strong enough to protect it from any ESD.

Then why we do not need to wear wrist bands when using an iphone?


texts: Is there any tool for decompiling raw binary files to C code for the Motorola 68000 processor series?

texts: I have the ROM dump (.bin files) targeted for the MC68008 processor. Need to convert them into a high level source code. I have already found tools for disassmbling them into assembly code. The next step is converting them to C code. But I could not find any tool that works. I have already tried the following decompilers with no success: RecStudio, Boomerang, Decompiler 0.2.4, IDA Pro with Hex-Rays.


texts: LTspice measuring drain current when certain values of Vds and Vgs are reached

texts:
I'm new to LTspice and I need to measure all the possible values of the drain current of a JFET when certain combinations of Vds and Vgs values are reached. That is, I need to record specific points of the output curve of the JFET.
For example: Vgs will vary from 0 to -5V in -1V steps; for each Vgs value, Vds will vary from 0 to 10V in 0.5V steps; for each Vds in each Vgs I need to record the drain current.
This could be done with nested .step directives if Vds was a voltage source (so I could use a {Vds} param), but I have this circuit instead:

Any idea is welcome.
Thanks in advance.


texts: How to use LVCMOS18 (1.8V I/O) on Artix 7 (Arty evaluation board)

texts:
I am using the ARTY 7 evaluation board from digilent which used the Artix-7 x35AT cpg324 packaging. Using one of the general purpose I/O banks i want to configure it for 1.8V configuration. (I am using this for 3-wire SPI to generate the spi clock and read the output from my ADC which are at 1.8V)

I looked through the documentation to configure this on the board and after going through all the relevant documents i am still unable to configure the I/O to LVCMOS18 standard.

Here is the table which mentions how to configure the files

And here is how i have configured in the XDC file

set_property IOSTANDARD LVCMOS18 [get_ports adc_conv_oc]
set_property IOSTANDARD LVCMOS18 [get_ports adc_din]
set_property IOSTANDARD LVCMOS18 [get_ports adc_sclk]

set_property PACKAGE_PIN V15 [get_ports adc_conv_oc]
set_property PACKAGE_PIN U16 [get_ports adc_din]
set_property PACKAGE_PIN T11 [get_ports adc_sclk]

set_property CONFIG_VOLTAGE 1.8 [current_design]
set_property CFGBVS GND [current_design]

The synthesized design has the following I/O port which indicates that the I?O's are configured for LVCMOS18 on bank 14 and VCC = 1.8V

The UG470 documentation mentions the following:

The 7 series FPGAs have two I/O bank types: high-range (HR I/O) banks support 3.3V,2.5V, and a few lower voltage I/O standards, and high-performance (HP I/O) banks support I/O standards of 1.8V or lower voltage. The dedicated configuration and JTAG I/O are located in bank 0. Bank 0 is a high-range bank type on all devices except for the Virtex-7 HT devices. Several of the configuration modes also rely on pins in bank 14 and/or bank 15. Bank 14 and bank 15 are HR I/O banks in the Spartan-7, Artix-7 and Kintex-7 families, but are always HP I/O banks in the Virtex-7 family. See UG475, 7 seriesFPGAs Packaging and Pinout Guide for bank information for each device.
Note: The CFGBVS pin is not available on Virtex-7 HT devices. Virtex-7 HT devices support only 1.8V operation for configuration banks.
The CFGBVS pin setting determines the I/O voltage support for bank 0 at all times, and for bank 14 and bank 15 during configuration. The VCCO supply for each configuration bankmust match the CFGBVS selection if used during configuration — 2.5V or 3.3V if CFGBVS is tied to VCCO_0, and 1.8V or 1.5V if CFGBVS is tied to GND.

but somehow i always get the output to be 3.3V. Any ideas on how to solve this?
Does the Arty-7 evaluation board for some reason not allow me to configure the voltages to LVCMOS18?

Thanks


texts: Current source schematics. What's the difference?

texts:
I have two current source schematics. They are nearly identical and one could be transformed to another by moving componets and voltage sources around. Both are set to 1 mA output.

But the left one doesn't work. The right one works perfectly. Why?


texts: I am new in the world of microcontrollers and I want to know the main differences between a Datasheet and a Reference Manual of a microcontroller and when do I use one and when the other.


texts: How can I wait for a response from an SPI slave with an ATmega16?

texts:
I'm trying to connect to a slave in SPI net, I need to send a command and receive a response. I've used the below code for connection:

  char SPI_sendchar(char chr) {
      char receivedchar = 0;
      SPDR = chr;
      while(!(SPSR & (1<<SPIF)));
      receivedchar = SPDR;
      return (receivedchar);
  }

But I always "receivedchar" variable equal to variable "chr", I'm try to use this code without any slave in net but the result is the same.


texts: How sine wave is generated in wien bridge oscillator?

texts: It is known that the initial feedback signal is developed from the noise in the resitors and the transients of the power supply. The question here is : why the waveform at the output is sine wave particulary and not any other waveform?


texts: Is it okay to briefly exceed a resistor's power rating in a high-reliability product?

texts:
I am dealing with a 0.01R 500mW resistor. It is a current sense resistor and measures the current flowing through a MOSFET and inductor. According to simulations, when the supply starts up, the RMS current is very high (~3A) for about 1 millisecond, and the resistor will be exposed to pulses of ~1.2W. The pulses then drop down to 200mW, and the RMS is around 125mW. Is it okay to briefly exceed the ratings of any resistor?

If I have to pick a 2W resistor it will be much bigger, so I'd like to use a smaller resistor, but reliability is a high priority for this product.


texts: Solar panel does not charge after lipo battery is low

texts:
I am trying to run arduino with solar panel, I have a project for farming so electrcity is problem. I need to use a independent energy.
I bought Solar Power Manager 5V SKU DFR0559 and a 2000 mAh LiPo battery also this is my solar panel 5v 250 Ma Solar Panel I used 4 parallel solar panel to increase charging current. my circuit is same as docs says.

After the preliminary information, let's come to the question now at first I make fully charged LiPo battery and and load to arduino blink sample to Arduino mega and start to circuit. If I measure the instantaneous current draw of arduino mega it is showing 40-50 mA. So everyting working fine. LiPo is full with 2000 mAh, I need max 50 mAh, and solar power is about 5 W. I have tested it works fine 2 days. But after all if I cover the solar panel and the system is powered only by LiPo battery. (I am simulating long cloudy day, and if LiPo power finished) after LiPo battery voltage decrease to critical level. DFR0559 is cutting the power. After that even if I open the soler panel and turned to sun. System not starting properly. LiPo battery not charging well at docs of DFR0559 it says it will start charging 90 mA  until threshold voltage. Well arduino need 50 mA so only left 40 mA to lipo battery. At the normal condition I am measuring more than 500 mA can produce solar panel, but now it is only 90 mA, DFR0559 limiting amperage draw . Due to this low current, the LiPo battery cannot be charged properly and the system cannot work properly again. The system shuts down the minute the sun goes.
How can fix this issue?


texts:
The software app being developed runs on the embedded hardware and spits the debug output through a serial port during various functionality of the app. Following are the questions.

Can I use the JTAG interface to the MCU in testing the app flashed on to it ?
Is there a way to automate testing especially for regression testing?

I am currently thinking of creating an app that looks for the debug output over the serial and scans for various sentences spitted out? Is this a good idea.

Any ideas pertaining to this topic will be appreciated.


texts:
I apologize if this is a super beginner question, but Im a beginner so thats probably why.

Ive built a program on arduino that takes the readout from a potentiometer, and"maps" it to three buttons.

Ie.   when readout is 40-50 (button1), when readout is 350-500 (button2), when readout is 800-1023 (button3)

Now I want to actually apply it to what its actually going to be used for in the real world.  Which requires the potentiometer to become just a "length of wire".

Depending on where I touch it, I will convert the readout into corresponding button presses.

How can I do this?  Like how do I make just a length of wire, act like a sort of "fader".

I assume this is how some "keybeds" in keyboards work.  With the rail? Im looking for an example of how to hook such a system up.


texts: Replacing a FET to avoid the body diode (audio switching)

texts:
Here is a circuit I've found online for switching a guitar signal, it uses a mechanical relay in order to rout the signal through a sound processing unit or around it, bypassing the circuit.

Mechanical relays sometimes create a 'pop' noise due to coil coupling EMF when discharging or due to DC potential differences while switching (think the sound processing unit is AC coupled so when switched to a load that capacitor will discharge). Another source of noise might be the actual pulse created by the MCU to engage the relay. The square wave has a rich harmonic content that can easily couple into the audio path.

This circuit, as far as I can understand, uses a FET that switches just before the relay and creates a low impedance path to ground which enables any capacitor on the output to discharge and will mute the signal by conducting it to ground while the switch takes place. The diode is there to protect the FET (not sure about that one).

The thing is that the 2N7000, as all other MOSFETs, has a body diode which will start conducting while the signal is on the negative cycle, if larger than it's forward voltage. Since the sound processing unit is AC coupled this means that there will be negative voltage present and the diode should conductor at peaks which will square the wave shape, causing distortion. Is there an easy and quick way to solve this by replacing the FET with some other device? I imagine I could DC bias the signal so high that it will never clip but rather not do that if possible.


texts: Distortion Elimination with Differential Transistor Pair

texts:
Most of you know that incorporation of negative feedback within amplifier is one of major considerations when designing a hi-fi amplifier. Till now, I have only dealt with differential transistor pair as input stage of amplifier and "eliminator" of distortions fed back from output of an amplifier. Although, I'm not quite sure if all kinds of distortions get eliminated by it (when compared to the original signal brought to the input of amplifier).

This circuit (proposed and made by user G36) has distorted signal, which is being delivered to voltage-amplification stage and after that it gets corrected to original (sine wave) signal being brought to the input of amplifier. It gets corrected by the differential transistor pair stage. (not shown here but: input of amplifier is at Q1 via capacitor and the output is taken from the collector of Q4).

Only problem here is that, when the distorted signal gets distorted enough, the output signal is being clipped. When input signal amplitude is low enough the signal at the base of Q4 is distorted (spiky signal), while the output at the collector of being corrected to sine wave (note that both channels weren't set to same voltage scale).

When the input amplitude was increased progressively, those spikes were higher and higher at the same time, but the higher they were, the negative half-waves were also progressively being clipped. I added potentiometer instead of RF2 to control the portion of NFB being fed to the base of Q2 but that didn't help either.

So that left me wondering for bit, and now it seems to me that all of that distortion cannot be eliminated (or corrected) after all.

I somehow didn't manage to design a differential transistor pair amplifier myself, but maybe with your help you can help me get closer to fully understand it and make one myself that would work like it should.


texts: LM324 output voltage gets low in difference amplifier configuration when UPS supply is turned on

texts:
I am using lm324 as difference amplifier to measure the string voltages of lithium ion battery pack ( four cells in series). I am using all single package of LM324 that have 4 Op-amp.
The Lithium ion battery pack is being charged by the UPS ( uninterruptible Power Supply). The UPS voltage have some noise and you can see in the attached picture. The supply voltage of LM324 is also connected in parallel with UPS and Battery terminal.

The problem is that , whenever the ups start charging battery, the output voltage of LM324 is disturbed. Without charging of UPS, the voltage of each cell in the string is 3.3V as nominal.
But when the UPS start charging, the same voltage becomes low as 1.6V.

We have connected decoupling capacitor with LM324 but it didn't work.
Can you please recommend any suggestion.

 UPS voltage

difference amplifier circuit configuration.

Complete circuit of LM324 as difference amplifier.

Output Voltage of LM324 with Oscilloscope.


texts: Hi tech c adc code not working as expected

texts:
I am new to using PIC micro-controllers, and I am working on a project that involves reading an analog value.  I am using the PIC16F877A.  I have found code for using the ADC posted below however when I try to compile it I get the error Error   [192] C:\Users\Owner\Documents\Pic Projects\Analog\Main.c; 20.1 undefined identifier "GO_nDONE".  Here is my code

#include<htc.h>
#include<pic.h>
#define _XTAL_FREQ 20000000

__CONFIG(UNPROTECT & PWRTDIS & WDTDIS & HS & LVPDIS);

void InitADC(void)
{
    ADCON1  = 0x80;
    TRISA   = 0x2f;
    TRISE   = 0x07;
    ADCON0  = 0x81;
}

unsigned int GetADCValue(unsigned char Channel)
{
    ADCON0 &= 0xc7;
    ADCON0 |= (Channel<<3);
    __delay_ms(10);
    GO_nDONE = 1;
    while(GO_nDONE);
    return ((ADRESH<<8)+ADRESL);
}

void main()
{

}


texts: Buck converter with state feedback: does changing the input voltage changes the dynamic of the converter?

texts:
Short question: in a buck converter with state feedback, do changes in the input voltage cause changes in the dynamics of the output voltage (and inductor current)?
The problem: let's say we have a buck converter, for which we can consider the average model for analysis purposes. Also, let's consider that the duty cycle is 0.5. In the open-loop circuit, if we apply a step change in the input voltage, the output voltage will show some dynamics and will settle at some value. In this case, the dynamics will be the same regardless of the magnitude of the step change, whether it is 1 V or 10 V. The behavior of the output voltage will only scale in magnitude with the step change, but its shape will not change. So basically, the model of the circuit does not depend on the input voltage, we just need to scale the output accordingly.
Now, let's consider that we will add a state feedback controller to the system. We will choose the gain vector \$K\$ so that the poles of the system are placed at a certain location in order to have a certain dynamic response.
The question now is: if the input voltage changes, will the output voltage keep the dynamics and only scale with changes of input voltage? Can we keep the model independent of the input voltage?
I believe that this is not the case, and changing the input voltage now will actually change the dynamics of the system, and the model of the system cannot be independent of the input voltage anymore. This is in contrast with the open-loop system, where we can remove the dependence of the input voltage.
My reasoning is the following. Consider the (average) model of the buck converter on the state-space representation
$$
\begin{bmatrix} \dot{i_L} \\ \dot{v_C}\end{bmatrix} = \begin{bmatrix} 0 & -1/L \\ 1/C & -1/RC\end{bmatrix}\begin{bmatrix} i_L \\ v_C\end{bmatrix} + \begin{bmatrix} V_i/L \\ 0\end{bmatrix}u
$$
where \$R\$, \$L\$ and \$C\$ are the load, inductor and capacitor of the converter, \$i_L\$ is the inductor current, \$v_C\$ is the capacitor voltage, \$V_i\$ is the input voltage and \$u\$ is the duty cycle. Considering the usual state space representation of the form
$$
\dot{x} = Ax + Bu
$$
and if we choose a state feedback law of the form \$u = -Kx + r\$, with \$r\$ the reference, then the closed-loop system becomes
$$
\dot{x} = (A-BK)x + Br.
$$
We choose the vector \$K\$ to place the poles at a desired location. Now, for me, if we change the input voltage \$V_i\$, then we will be changing the matrix \$(A - BK)\$, and that will change the dynamics of the system; the response will not be merely scaled by changes in \$V_i\$.
I discussed this issue with a colleague, and he told me that \$V_i\$ should not be a part of the matrix \$B\$, and so changing \$V_i\$ will not change the dynamics of the system but will only scale its response. But to me, it is not possible to simply remove \$V_i\$ from the matrix \$B\$, because doing so would cause the feedback law to change to
$$
V_iu = -Kx.
$$
Now, if \$V_i\$ changes, the control law will not be exactly \$-Kx\$ anymore, and that will essentially change \$K\$, which will again impact the matrix \$(A - BK)\$.
The implication of this is that, if we design static gains (pole placement, LQR), these gains will not give the desired response anymore if \$V_i\$ changes. On the other hand, I believe these gains will just scale with changes in \$V_i\$, but then we have to measure this voltage.
Are there any flaws on my reasoning?


texts: Massive power usage for a simple VHDL design

texts:
I'm trying to implement Gaussian elimination to calculate Matrix rank, The following code uses lots of power like 60 watts for 2x2 matrix which looks weird considering it uses 3% of DSPs too. If no division used the power consumption become as low as 10 watts but still massive for a 2x2 matrix.

myloop2 : for k in 0 to matrix_RowClmsize-1 loop
            M(op_i,k) <= M(op_i,k) - ((M(op_i,op_j) * M(op_j,k)) / M(op_j,op_j));
end loop myloop2;

Obviously M is the matrix.

I'm using ZedBoard and Vivado 2017.2

Edit:


texts: newbie question: can I plug a 250v power strip into a 120v power outlet (and then connect three 120v power adapters to the power strip)?

texts: I'm sorry if the question is too dumb, but I was wondering if I could connect a power strip rated for 250v into my home's power outlet (120v). I wanted to connect 3 power adapters rated at 120v to it (that would then power up some effect pedals I have for guitar). Could the wire gauge inside the power strip be a problem? Because I thought that since the rated voltage support is higher, there shouldn't be any problem (I mean, resistors and eventual caps wouldn't catch fire, but would they some how underpower my power adapters?). Please correct me otherwise. Thank you!


texts:
Let's say that I have a periodic charge build-up across the capacitor C1.

I could either choose to measure the current using a transimpedance amplifier as shown below or could measure the voltage instead.

I've been told it's probably better to measure the current because of the parasitic capacitance coming from the BNC cable (represented as a capacitor in the image below).

I do see that the voltage you measure is going to be less for high frequency voltage signal because there will be voltage drop across the parasitic capacitance.

However, don't you also lose current to the parasitic capacitance of the BNC cable? Is the loss miniscule because the parasitic capacitance is on the order of pF? (1st question) So, the parasitic capacitor will get charged up quick and most of the current will still flow to the transimpedance amplifier?

The second question I have is, when using a transimpedance amplifier, as shown below, I was told to put a 1pF capacitor in parallel with the gain resistor to stabilize the feedback.

What is the typical frequency range of the undesired oscillation that we want to get rid of by having this capacitor in parallel with the resistor (to effectively remove the parasitic capacitance of the BNC cable)? Don't you sort of have to know what the unwanted signal's frequency is going to be to choose the right capacitance value to remove that signal?  Could someone explain to me what's the best way to choose the right value for the capacitor?

simulate this circuit – Schematic created using CircuitLab

ADDED

simulate this circuit


texts: 555 Schmitt Trigger works well with CMOS LMC but not NE555?

texts:
I have an NE555 (the non-CMOS version) running in astable mode at 118Khz.  I have the output pin3 connected to input for a second 555 running as a Schmitt Trigger to invert the signal. What I found is that if the schmitt trigger is an ordinary NE555, the signal is absolutely awful.  The inverter trips on all kinds of small voltage transients and produces a signal that doesn't match the input at all.  If I change the schmitt trigger to use an LMC555 (CMOS version), it suddenly works perfectly.  I wouldn't have expected this to be a problem when only running at 118Khz.  Does anyone else have a thought on this?  Does the NE555 have much lower useable operating range when running in Schmitt Trigger mode?  Or is there something else I should know here?

This is an example of the schmitt circuit:

Here are the oscope shots of the results.  In both shots, the top green channel is the output pin from the astable NE555.  The bottom yellow channel is the output from the second 555 running as an inverter.  In the first shot, you see the correct desired result when using the CMOS 555 for schmitt.  In the second shot, you see the totally messed up result when using an NE 555 for schmitt.  (Keep in mind that the green channel is an NE555 in both shots)

Also, the second shot doesn't show the worst of it.  Depending on circuit configurations I had that caused noise to occur at other places, the signal got way way worse.  I was amazed, because most of the time this noise appears to be less than 20% of the voltage difference.  The behavior here doesn't make any sense to me.  Information for the 555 claims that it has "high noise immunity" but the NE555 is acting like small-ish amount of noises totally throw it off.


texts: How to use a transformer to power a 5V chip (an Atmega328)?

texts:
I am designing an Atmega328 based device which needs to be powered directly from 230V AC. I have found a transformer in my local electronics store which seems perfect, but I have never worked with transformers before.

Does this unit output 6/9/12 V DC or does it output AC which needs to be converted?

If it still needs to be converted to DC, what size/type diodes and capacitors should be used and how to get it to 5V?

Lastly, should this transformer, with its blue and black primary wires, be connected in serie or parallel to a mains supply running through my device? It is a device that connects to the mains, and then you connect another device (e.g. TV) to it, so should it connect in serie or parallel to the wires running to power the TV?

Thank you for helping out!


texts:
Are the two figures same?

I have drawn the feedback topology for voltage shunt type. I just want to clear a doubt if these two refer to the same thing and if there is anything wrong.

I am not so confident with the first diagram.


texts: Four wire voltage sensing, all four wires in one cable?

texts:
If I twist the power positive and negative wire together and do the same for the sensing wires, can all four wires (two twisted pair) be in one cable or they should be physically separated from each other?

simulate this circuit – Schematic created using CircuitLab


texts: Calculate transfer function H(w) of Schmitt trigger with RC at inverting input

texts:
I have got the following Schmitt trigger circuit implemented already on a breadboard. As seen, the input signal at the non-inverting and inverting terminals of the op amp is the same, but with the addition of a RC circuit in the inverting terminal. In this way, I am comparing the input signal with a delayed version of the same signal such that I can identify peaks. I got the idea from here.

simulate this circuit – Schematic created using CircuitLab

I wanted to obtain its transfer function so as to analyse more carefully the influence of the RC network (and ultimately, the circuit itself). I obtained an expression for \$H(w)\$, created some code in Matlab to plot the transfer characteristic (magnitude and phase) of the circuit, and also implemented the circuit in TI-Tina simulator. Using the Tina's AC analysis, I also plotted the transfer characteristic... and my Matlab results differ from Ti-Tina's results.

Here the results from Matlab:

And here the results from TI-Tina:

For this reason I wanted to ask whether the following set of equations to obtain \$H(w)\$ is correct.

The voltage \$V_{+}\$ is:
\begin{equation}
V_{+} = V_{in}\dfrac{R_{f}}{R_{1} + R_{f}} + V_{o}\dfrac{R_{1}}{R_{1} + R_{f}}
\end{equation}

Considering admittances, \$V_{-}\$ is \$V_{-} = V_{in}\dfrac{G_{2}}{G_{2} + sC_{1}}\$. Putting \$s = jw\$ and \$R_{2} = 1/G_{2}\$, we have:

\begin{equation}
V_{-} = V_{in}\dfrac{1}{1 + jwC_{1}R_{2}}
\end{equation}

As \$V_{+}=V_{-}\$, the following expression can be obtained:

\begin{equation}
V_{o} = V_{in}\dfrac{1-jwC_{1}R_{2}R_{f}/R_{1}}{1 + jwC_{1}R_{2}}
\end{equation}

Therefore,

\begin{equation}
H(w) = \dfrac{V_{o}}{V_{in}}=\dfrac{1-jwC_{1}R_{2}R_{f}/R_{1}}{1 + jwC_{1}R_{2}}
\end{equation}

Any insights? I would appreciate your help. Many thanks.

If useful, the code I've used in Matlab is:

%--- We fix Rf and R2 and vary C1
R1 = 10;
Rf = 10e6;
R2 = 10e3;
C1 = [1 10 100 1000] .* 1e-9;

opts = bodeoptions;
opts.Title.String = '';
opts.Title.FontSize = 12;
opts.Xlabel.FontSize = 12;
opts.Ylabel.FontSize = 12;
opts.TickLabel.FontSize = 10;
opts.FreqUnits = 'Hz';
opts.Grid = 'on';

H = [];
for i=1:length(C1)
    H = [H tf([-C1(i) * R2 * Rf / R1,1],[C1(i)*R2,1])];
end

figure
hold on
for i=1:length(C1)
    bodeplot(H(i),opts);
end

legend_t = cell(length(C1), 1);
for i=1:length(C1)
    legend_t{i} = sprintf('C=%snF', num2str(C1(i) * 1e9));
end

legend(legend_t);
title({'Transfer function of Inverting Schmitt Trigger', ...
    sprintf('Rf=%dMOhm, R1=%dOhm, R2=%dkOhm', Rf/1e6, R1, R2/1e3)});


texts: how to design a multiplier digital circuit using 4bit adders with output in BCD?

texts: I want to design a circuit that multiplies a number by 6 an input binary number using only 4bit full adders. I designed the combinational logic but couldn't do it with 4bit adders as i were asked in my exam. any help?


texts: One battery slot of a set kills its sitting battery

texts:
My kid has a battery-operated toy, it runs on three AAA batteries. Once, the toy suddenly stopped working, but all batteries were good. I decided to disassemble the toy and look for internal damage or some loose wire. Found nothing and reasembled it. The next day, on a last attempt before dumping it, I placed the batteries back on just to confirm, but it just started working again. Have no idea what changed. Humidity maybe?
Now the issue. Since then, the toy is killing one of the batteries in the pack, in a week or so. It stops working, I check the batteries, the one on the left is completely dead with 0 volts, the other ones are ok. I replace the dead battery, it gets back working ok. Another week or so, the toy stops working again, and the newly replaced battery is dead. It's always on the same deck position.
Never seen this happening and it didn't seem possible when using similar batteries, except if one was defective. But this isn't the case. The toy will always kill the battery on the left.
Any thoughts on this?
(Edit)
I thought the above was self-explanatory, sorry if not.
The three batteries sit side by side, but in serial on the circuit. One of the batteries depletes really fast. "Battery on the left" is only a visual reference, in practical means, it only represents that the battery that suffers the issue is always the one sitting on that specific slot.
I'll try to add some photos, maybe later today if I have the chance.
@Frog I thought that a short in one battery would affect them all. But maybe not, now I see. After examining the plates and springs, it doesn't seem possible to have o short here as they seem to be very far from each other. A short makes sense, but it should burn out the battery in less than a day. And I've re-examined the toy inside and can't seem any clue of a short.
@Kyle B I've replaced one single cell, because this one was 0 volt and and the other two looked ok. So, by replacing only this dead one by a new one, leaving the other two, and after a week, the new battery was dead and the other two not, it was the proof that the fault was not on the battery.
I've disassembled it again and I just can't find any clues on any damaged wire, pinched stuff, short anywhere, any damage on the board, anything.
Thank you for the help.


texts: Lets say I have a critical device, which requires almost no ripple in voltage and draws a very high current. What are some ways, other than a simple capacitor which take out the ripple from the full-wave rectified ac voltage?


texts: 18650 Li-ion cells for the laptop battery: with protection circuit or not?

texts:
My laptop battery died and I've took it apart to replace the cells inside.
Do I have to buy new cells with protection circuit or without it?

Googling the existing cells part number LGABC11865, I've found numerous Alibaba pages where it says

  top:  flat | Bottom:  unprotected

But I wonder does it mean cells don't have a protection circuit?

Here are photos of my existing cells:


texts: How does inductance of armature winding response to changing load in motor?

texts:
Think of a 3-phase BLDC motor like above in the picture. L1, L2 and L3 are the armature windings and there is a rotor in the center. As you know when sequentially magnetize the armature windings with a certain phase difference, it causes to eddy currents in the rotor and it causes to move.

Armature windings are basically inductances when you think them standalone. But when you magnetize them they act like transformers since they induce current in rotor. So here is my question:

When you increase or decrease the motor load, how would it effect the armature windings inductance? For instance, would they increase in higher motor loads?

Or, the inductance remains the same but the current flow increases only?


texts: How can I use an IO ports on Digilent Genesys Virtex 5 to drive 6 external leds?

texts:
I have a project which requires led output.  Right now I'm using the onboard leds, but I would like to use 6 external LEDs instead.

Which IO pins should I use, and how should this be done?

I'm guessing that it's as simple as finding six output ports, wiring each led in series with a resistor, and connecting each path to ground, and then editing the ucf file to map the entity output port names to the io ports.  Is it that simple?  Will someone give me a detailed explanation?  Thank you.


texts: Question about Bluetooth Version 5.0 and Version 4.1 hardware backwards compatibility

texts:
I am reading some general information about Bluetooth 5.0 improvements here:

https://www.itechtics.com/bluetooth-4-vs-bluetooth-5-feature-comparison/

It says clearly that Bluetooth 5.0 is not backwards compatible and needs new hardware

If we look at the firmware release notes for Qualcomm ADK 4.0.1 for the CSR8675 bluetooth chip, it says that Bluetooth v4.2 is supported

However, if we look at the firmware release notes for Qualcomm ADK 4.2 (a newer version of their ADK, Audio Development Kit) for the CSR8675 bluetooth chip, it says it supports Bluetooth v5.0

The ADK is just software you install on the computer (IDE, library files, source code) and you can use the same CSR8675 development board and PC-to-board communication modules to download your programs, whether written in ADK 4.0.1 or ADK 4.2

If Bluetooth v5.0 requires new hardware, how is it that the same CSR8675 chip supports both v4.2(ADK 4.0.1) and v5.0(ADK 4.2)? Both ADK 4.0.1 and 4.2 come with their respective firmwares for the CSR8675 chip, and it's the firmware release note documents that state the bluetooth compatibility, but if I understand correctly this firmware is just software and the underlying CSR8675 hardware is still the same

How does the CSR chip do this if Bluetooth v5.0 and v4.2 are hardware incompatible?


texts:
I have a 5 HP three phase motor.
I am going to install a variable frequency drive (VFD) for speed control.
I know that VFDs are used to soft start motors.
How do VFDs limit the starting current of the motor? Is the input current to the motor the same as the motor current?


texts: How are state machines used in electronics?

texts: It seems to me the use of state machines is just in logic circuits, is that correct? If not do they have other uses, such as say in microcontroller programming? I'm quite new to the subject and wonder if there are programs to create state machines or is it just a matter of understanding how they work and taking things from there?


texts: Shared Voltmeter for 2 DC Circuits at Different Voltages (battery & solar)

texts:
I want to use one panel mount voltmeter (Powerwerx PanelDVM) for measuring both my 12VDC Battery output and the input voltage from a Solar panel ,which has a higher DC Voltage. This all is hooked to a battery charge controller (shown below). I will be using a SPDT switch (on-off-on) to switch between voltages and would hook both the solar and battery grounds together at the switch, but I am not sure if this would cause a issue. Such as: damage to the solar panel. It may be better to buy 2 voltmeters

update: I agree with everyone that said: "Use a DPDT Switch".  I only went this route because I had a hard time finding a round, center off, Panel mount, DPDT switch, but it really isn't worth risking damage to the Solar panel.


texts: Charging a 5 cell 18v lithium battery with single charger?

texts:
I want to charge a 18v cordless drill lithium battery, which is basically 5 Panasonic INR18650-20R 3.7v cells connected in series.

the battery pins are BATTERY+, BATTERY- and 4 pins marked BATTERY1, BATTERY2, BATTERY3 and BATTERY4 which are connected between + and - of batteries (probably used for balanced charging)
I searched for a way to charge this thing, but all i found was about using a balanced charger.

However, is it possible to charge each cell individually using a single tp4056 charger? like, connecting BATTERY- and BATTERY1 to charger and, after finished proceed to BATTERY1 and BATTERY2 and so on?


texts:
I recently bought two 3300uf 100v capacitors and have connected them in parallel. I charge them up to 100v and discharge them. I then hook up a multimeter and notice the voltage going up very slowly, about .01 volts every 20-40 seconds. So I discharge the capacitors and the voltage goes back to zero. When I woke up this morning, I checked the capacitors and it had gone up to 5 volts! And I am able to power an LED with them. What is going on here?

Edit:

Thanks to Robert's comment in one of the answers, I think he's right. This is probably dielectric Absorption.


texts: Reverse voltage protection circuit explanation

texts:
Considering this circuit :
(The complete schematic can be found following this link - page 23)

It is connected on the return path of an IC to provide reverse-voltage protection.

I understand that D11 zener diode set Vgs to 7.5V when Vdd is positive (24VDC) so Q1 nMOSFET is ON and when Vdd becomes negative with respect to the supply ground, Q1 is turned OFF and disconnect the return path.

But what is the D2 Schottky diode for ?


texts: Multiple Arduinos toasted, could it be the ground?

texts:
I've managed to render 3 different Arduino boards inoperable over the past few days and I'm trying to isolate where I'm going wrong.  My current suspicion is that the grounds in my home are incorrectly wired and when I connect my Arduino's ground up to that third wall prong (via whatever device, see next), it's toast.
The recurring scenario is:

Connect Arduino via USB to laptop.  It's a Mac laptop with a 2-prong connector, i.e. no mains ground connection.
Load a trivial program into the board.  Works like a charm.
Program loads a number of times without problems, make some tweaks, all is well so far.
During my fiddling I also have a battery powered multimeter, and an oscilloscope (this one: https://www.amazon.com/Hantek-DSO5102P-Digital-Storage-Oscilloscope/dp/B01EJLZYN8), which I'm using to verify things are as I think they are.  I'm pretty sure this scope, like most, has the ground clip connected to mains ground.
All of a sudden, I go to try loading the next iteration of my program, and it doesn't load.  Error says it cannot find the USB port.  (Arduino is SAMD21G powered, with USB connected directly to the MCU.)
That board never works again ever.  Pull another board fresh out of the box and it works fine.

I have verified that:

It is not a problem with the USB port.  As above, another board works correctly using the same port.
I'm pretty sure I didn't make a silly mistake like plugging 5v or more into something expecting 3.3v, at least not three times in a row.

As above, I think the common denominator is the ground connection from the oscilloscope.  (It's hard to pinpoint exactly because each time I was doing a lot of poking around and there's no smoke or even change in LEDs, etc., the board seems to continue executing code correctly - the only time I find out that it went bad is the next time I try to load code onto it and it doesn't work.)
I then remembered that a house inspection done earlier on this home revealed this:

(This is physically located on the other side of the property but it's the same overall electrical system.)
Okay, so with all that, my question is: Is it possible that this (or some other) incorrect wiring situation could result in the use of my (mains-grounded) oscilloscope causing permanent damage to these Arduino boards?
This is probably a silly question for someone with a lot of electrical experience and education, but with what I know so far, I haven't been able to wrap my wits around what the effect of connecting neutral and ground together on a sub-panel would be in this situation.
UPDATE: I did some other measurements:

First, I measured bench power set to the 4.5v knob shows 5v on the oscilloscope.  Then, removing the ground and measuring + on the 4.5v bench terminal vs disconnected/mains ground:

That's pretty clearly following the regular main power of the building.  Not sure why it's 94v, but otherwise it looks very much like wall power to me.

Scope's ground clip connected to mains (scope coax shield) and probe connected to USB shield of laptop with laptop plugged in:

Same thing with laptop unplugged (battery power only):

So... maybe the problem is me connecting/disconnecting the scope's ground to/from the USB shield (Arduino's ground) while everything is connected and running - creating a momentary ~100v difference and causing damage?  Which would lead me to believe that if I need to use the scope, then I should first connect the scope ground to the USB shield's ground before doing anything else(?)


texts: How can I scale a 0-5v signal down to both a 0.5-4.5v signal and a 0.5-2.0 signal simultaneously?

texts:
I need to split a 0-5v signal into a 0.5v-4.5v signal and a 0.5-2.0v signal. How can I achieve this?

I can achieve this with a single board computer -- but that seems inelegant and overkill.


texts:
As a student, when I needed to make a PCB, I just placed the components & auto-routed on ARES, and they usually worked well. However, now a fresh graduate & novice engineer, I found that this method is not suitable for all designs.
I checked through some application notes on low EMI PCB design, like these:
PCB Design Guidelines For Reduced EMI - Texas Instruments
AVR186: Best Practices for the PCB Layout of Oscillators
I understood the logic behind the tips in the notes. However, I am having a hard time applying these, because when I try to comply to a tip, I am contradicting with some other...
To sum up, I kindly request steps necessary - perhaps a flow chart - for low EMI PCB design from a relatively more experienced designer than me.


texts: How this circuit with diodes can be solved?

texts:
Solve: $$U_1=?\ ,U_2=-U_3=?,U=?$$

I tried to solve this circuit with Shockley Diode Equation : $$I_{\mathrm{D}}=I_{\mathrm{SAT}}\left(e^{\frac{U_{\mathrm{D}}}{\eta^{U_{\mathrm{T}}}}}-1\right)$$

and also with equation  for dynamic resistance(for this example its conductance, inverse of dynamic resistance) : $$G=\frac{I_D+I_S}{I_S}$$

Correct me if I'm wrong:

$$from \ picture \ we \ see \ that \ : I_{D1}=I_{D2}+I_{D3} $$
$$from \ picture \ we \ see \ that \ : U_2=U_3$$

Results are: $$U_1=0.182(V)\ ,U_2=-U_3=0.2(V),U=-0.382(V)$$

How can be this circuit solved?


texts: Power small microcontroller from motherboard RJ45 ethernet port

texts:
I'm wondering if it's possible to power a microcontroller (e.g. ATmega328) from a Ethernet RJ45 motherboard port. Unlike USB, there is no power line, all pins/lines seem to be data only.

I am guessing I don't have much hope?

Thanks


texts: I need to control several 5V single coil latching relays. The specific part has a coil current of ~20mA. The ATMega's datasheet claims a maximum pin current of 40mA. Is there a reason I cannot simply connect 2 pins from the AVR to the 2 sides of the coil and fire whichever one I need (on or off) to control it? I understand I'll need to play with the on/off timing a bit, but is this likely to damage the AVR in any way? Do I need a protection diode here? Thanks.


texts: LED burnt out with 2x AA (or AAA) in series

texts:
Why does a LED burn out with 2x AA (or AAA) in parallel series, without resistor, but not with a single CR2032?
Both are practically the same voltage, right?

The led is a yellow from the Arduino Starter Kit.


texts: Input resistance of a BJT common-emitter amplifer

texts:
What's the input resistance of the circuit below?

I think it is \$R_{in}=R_B || r_\pi\$, but I am not sure


texts: Interpreting the ripple curve of a half wave rectifier

texts:
While reading about how a half wave rectified output is filtered using a capacitor, I came across the following waveforms:

corresponding to the circuit:

In the interval from 0 to , the diode is forward biased, and hence, conducts. This causes the capacitor to be charged up to the peak voltage.
In the interval from  to , the diode is reverse biased, and therefore, does not conduct. So the capacitor discharges through the load resistance at a rate longer than that of the input.
That much is clear to me. However, I am not exactly sure about what happens in the interval from  to . According to me, the input voltage is simply decreasing here, so the diode should remain forward biased, and hence conduct. But the above waveform shows otherwise. So, is the capacitor discharging in this interval ? If yes, then is it different from the discharge in the interval from  to  ?


texts:
I'm trying to interface an Arduino Mega to an Intel 8255 and it doesn't seem to work, here's my setup:

I'm using as LS245 IC to connect 4 LEDs. The CS, RESET pins are connected to GND.
I'm trying to use Port B to send data to switch ON/OFF individual LEDS. My code just sets control register to I/O mode, and port B is set as OUTPUT. Any pointers as to what can be wrong?

My code:

#define CS 22
#define RD 23
#define WR 24
#define A_1 27
#define A_0 26
#define RESET 8

char buffer[8] = {0, 0, 0, 0, 0, 0, 0, 1} ;

void setup()
{
  pinMode(CS, OUTPUT) ;
  pinMode(A_0, OUTPUT) ;
  pinMode(A_1, OUTPUT) ;
  pinMode(WR, OUTPUT) ;
  pinMode(RD, OUTPUT) ;
  int i=0, p=0 ;
  for (i=32; i <=39; i++)
  {
    pinMode(i, OUTPUT) ;
  }
  digitalWrite(CS, LOW) ;
  digitalWrite(WR, LOW) ;
  digitalWrite(RD, HIGH) ;
  digitalWrite(A_0, HIGH) ;
  digitalWrite(A_1, HIGH) ;
  for (i=32; i <=39; i++)
  {
    if (buffer[p])
    {
      digitalWrite(i, HIGH) ;
    }
    else
   {
     digitalWrite(i, LOW) ;
   }
    p++ ;
  }
}

void loop()
{
  digitalWrite(A_0, HIGH) ;
  digitalWrite(A_1, LOW) ;
  digitalWrite(WR, LOW) ;
  digitalWrite(RD, HIGH) ;
  int i=0 ;
  for (i=32; i <= 39; i++)
  {
     digitalWrite(i, HIGH) ;
  }
  delay(2000) ;
}


texts: Why the voltage at Source terminal in MOST device in pass transistor logic is given by: Min(Vgs-Vt,Vdd). How we arrive at this expression.


texts: Achieve an output of 0-5v using 2 hall sensors as the inputs

texts:
I am modifying a kids ride-on car to use brushless motors with VESCs, but I wish to use 1 hall sensor pedal for accelerator and a 2nd identical pedal for regenerative braking.
I have seen that a server tester can be used between a hall sensor accelerator and an ESC or VESC where the server tester can convert the hall sensor 1-4v signal to PWM for the ESC quite easily, as can be seen here:
https://www.youtube.com/watch?fbclid=IwAR3_tVIt20qbNBgBcchpa_ioEIgs-w6Vu9u-UVrzC7BLmhRJMzwLWKs_U_Q&v=cceUTv6tAaA
I want to have an accelerator pedal, when released leaves the motor just coasting and no regenerative braking enabled yet, but when the brake pedal is pressed regenerative braking starts to come into effect. I would also like the accelerator pedal signal to be ignored when the brake pedal starts to be depressed, so the brake pedal overrides the accelerator pedal when both are depressed.
I was thinking this could possibly be done with some op amps, but as it has been around 40 years since I did any electronic theory I have no idea to design such a circuit now.
I will start doing some research meanwhile, but some suggestions would be greatly appreciated. Thanks in advance.
Any help in the way of example circuitry would be greatly appreciated


texts:
I'm a student that is trying to learn hardware by building various devices, in this case a barcode reader from scratch. I bought a barcode scanning engine that has a 14 pin ZIF, pitch 0.5 mm (0.2 in) and am just trying to connect it to an arduino. I've spent hours trying to find a cable, compatible breakout board or similar tutorial to help me figure out how to proceed. I've done a fair amount with serial/PWM devices, so if I can just figure out how to physically connect the device, I shouldn't have any problems...I'm just lost on how to actually connect it???

Device Spec Sheet