texts: Need a sensor for detecting the presence of someone like a door sensor we have in lifts/elevators

texts:
Door sensors used in elevators/lifts are very expensive and my budget is not that much. But I need a similar mechanism or solution to detect the presence of someone if he/she is standing in the given line where the elevator door closes.

I can't use a PIR sensor as it checks proximity and the range is very small and I need it to be around 5-6 meters. This means that the transmitter and the receiver will be 5-6 meters away from each other in a straight line so that whenever there is some individual standing at the given line, the receiver will not receive the light from the light source(transmitter) because of the obstacle between the transmitter and the receiver.

For eg, I can use infrared transmitter or laser source at one end and light-dependent resistor or light or any photovoltaic sensor to detect the given source light at the other end. So, when there is no obstacle the LDR reading in the range of 0-255 will be around 200 due to illumination from the laser source, but when there is some obstacle (the presence of some human/objects between the transmitter and the receiver), the light source will not be able to reach to the LDR side and the reading will be around 80-100. Hence, I can apply some logic or some LDR range to distinguish between the two situations - one without any obstacle and other with an obstacle in between.

I hope you are getting what I am trying to say. I really need help here as I am not able to get any long distance infrared source/detector. I want it to be invisible at nights as well ((means no humans could feel that there are sensors at either side of the walls/doors), so I can't use laser source. Any solution would be appreciated and any other approach to accomplish the same thing of detecting objects between the transmitter and the receiver will be a big help as well. Please let me know if you need any other information about the project.


texts:
Is it possible to use a parallel port (a real one, not an USB converter) as a TTL serial port equivalent, for a maximum speed of 115200 baud ?

I'd like to talk to a router's serial port but I don't have any TTL level converter, and buying one is not an option (I can't afford to "waste" 20 bucks on a stupid "hey let's reverse engineer this router!" idea).


texts:
After posting: Programming/Debugging with ICD3 and PIC16F819-I/P

I'm still getting the MPLAB error:
ICD3Err0045 - You must connect a target device to use MPLAB ICD 3

My Setup (pinout and wireup):

MPLAB Screen (You may need to zoom in a bit):

I did notice that under Programmer > Settings > Status:

Target Vdd seems wrong (0.02 persist even after clicking 'refresh').
"Allow ICD 3 to select memories and ranges" is set
"Power target circuit from MPLAB ICD3" is unchecked.
Voltage between PIC pins 5 and 14 is 5.14, but once I try to connect to ICD3 and
click "Reconnect" this voltage drops to 3.4
My voltage supply is an AC to DC adapter from a wireless mic receiver (SHURE PS21US,
output 12V, 400 mah) put through a voltage divider L7805CV to give me   5.08 volts.
The datasheet for the PIC16F819 can be found here.

EDIT: I added a 5V voltage regulator, and a .01uF cap across Vdd and GND (before it even goes to the regulator), and a 2.6k resistor in series with !MCLR. Still getting the same error (Programmer status remains unchanged even after refresh - it's like ICD3 isn't grounded...just guessing though).

What am I doing wrong?


texts: Mystery bug while programming Atmel micro

texts:
I'm programming an ATSAME51J20 micro on a custom board with a J-link Plus compact programmer using the SWD protocol. It is successful for small programs, but fails more frequently for larger programs. Here is a screen capture of the SWD in action.

The clock signal is in blue, and data is in yellow.

It looks like data is getting clocked in when the data line is in a floating state (as can be seen just to the right of the middle of the screen), which could account for programming the board being unsuccessful. I tried programming a dev board via SWD and didn't see any similar behavior there (and the dev board was programmed successfully every time).

The hardware connection on the custom board is the same as on the SAME54 Xplained Pro dev board, which uses a 1k pullup on the clock line and nothing on the data line.

I'm trying to think of things that could be causing the clock to be clocking in data when the data line isn't being driven high or low.

In the curved signal to the right of the middle of the screen, it seems like something is attempting to drive the data line high curing one of the clock cycles, but it is unsuccessful. Maybe whatever peripheral is responsible for driving the data line on the micro side isn't configured correctly, and thus isn't able to drive the data fully high or fully low?

Anyone have an idea as to what could be causing this?

EDIT:
The J-link datasheet states that a 100k pull up is required on the SWDIO line. However the ATSAME datasheet makes not mention of this so I assume it's internal to the chip. It seems like this is supported by the fact that the SWDIO line floats up when it's not being driven, and the fact that the dev board doesn't have an external pull-up, and that one programs successfully.


texts: CANopen transmission to multiple IDs at the same time

texts:
I am asking myself, whether it is possible that I simultaneously send multiple signals to my robot via CANopen.

Edit:

I am trying to build a CANopen connection with my robot. I can turn the motor up by sending a message (8A 00 0A 00 00 00 00 FB) to ID 181h. Now, I am trying to control the movement of the robot via CANopen. However, it does not repond at all.

Here is what I did:

I first move the robot with my control module. Since I have to press down two buttons at the same time to move the robot, I checked how the data values of each IDs changed for each button press.

For example, when I press down the button A, the data value of ID 181h changed like 00 00 00 00 00 00 00 FB -> 00 00 00 FE 00 00 00 FB. When I press down the button B, the data value of ID 301h changed like 00 00 00 00 00 00 00 FB -> 00 00 00 00 32 00 00 FB.

So now I tried to move the robot via the CAN connection as the one in the picture. I first wrote "00 00 00 FE 00 00 00 FB" to ID 181h and after that I wrote "00 00 00 00 32 00 00 FB" to ID 301h.

However, there isn't any response at whatsoever. Am I missing something?

EDIT:

Pressing button A changes the value of 181h to 0A 00 09 00 00 00 00 FB and pressing down button B changes 281h to 00 00 00 FA 6F BD 00 FB. So I sent those messages to the TPDOs 181h and 281h, respectively. However, still no response.


texts: How do the Capacitors get charged in a Half Bridge Inverter?

texts:
In half-bridge inverter, two capacitors are used to get two voltage sources, each of potentials V/2 from a single voltage source of potential V.

When either of the transistor conduct, the respective capacitor discharge through the load.

But after being discharged, how does the capacitors get charged back to potential V/2? What path does the charging current flow through? If the charging current flows through path Vs-C1-C2, then voltage of the other capacitor would also rise and go above V/2. Why doesn't it happen?


texts:
I've been told that using current sources in simulation programs may produce "too optimistic" results compared to using current mirrors.
Could someone please elaborate? I'm still a bit confused about this topic.


texts:
I'm learning electronics and I have an old C64 power supply which was made at our local electrical shop back in the 80s. I'm taking a look at it to try and understand how it works.

What I don't understand is why the DC ground is connected to mains earth. From what I gather this is to give a ground reference to the DC side but why would you do that?

Also the power LED anode is connected to +5V output on the 7805 and the cathode to the metal chassis. I can see how this works but does this mean current albeit small is flowing through the chassis to get to the regulator's GND?

Finally I would like to probe this with an oscilloscope to measure the ripple at various stages of the circuit. My assumption is that as all grounds are connected there's no problem probing anywhere on the low voltage side. Would I just put the probe crocodile clip on the chassis ground point?


texts:
We have a system in which is an HMI with a display. To test a system, I have to connect LCD to the board, and 6 more cables to the board. As LCD is having an FPC cable, it will take more time compared to other connectors. other connectors are like USB, HDMI and wire to board connectors. So for testing a system, we have an automated test software which will test all the boards in less than two minutes if all the cables are connected. In my case, I am taking more time to connect these cables and peripherals. So, can anyone suggest whether I can make any test jigs to reduce the test time?
But the system has many connectors, I don't know How I have to plan for test jig. If anyone has any experience in testing of single board computers, please help me.
If anyone has any suggestions, pleases suggest


texts: What is the definition of unsigned() function in VHDL?

texts: I am unable to find the function signature of unsigned() function in vhdl. what types does it accept as an argument?


texts: Relay control of AC motors, handling turn-off kickback

texts:
I've been researching how to control a smallish AC-motor using a relay, and more specifically, how to turn an AC motor off using a relay.

This is a subject that has been up many times at this site, but the answers given vary quite remarkably.

The fundamental problem is that an AC motor will "kick back" when an attempt is made to interrupt the current flowing to it. When the relay opens, the voltage across the motor will increase dramatically. If this is not dealt with, there will be arcing at the relay terminals, which increases wear and may also cause EMI problems.

This question: How to calculate resistor and capacitor size for snubber circuits has a very well written answer, including a calculation suggesting the use of a 40uF capacitor in series with a 160 ohm resistor, for a 220mA motor with 1H of inductance. The capacitor stores the energy in the "kickback", and while it does charge up to some voltage, this voltage is much much lower than the voltage caused by an unmanaged kickback.

This question: Relay protection with MOV and RC Snubber , has an answer suggesting a 0.1uF capacitor in series with a 100 ohm resistor, without having any details about the motor.

This question: How to design an RC snubber for a solenoid relay driving an inductive load?, has a an answer indirectly suggesting that 0.1uF and 120 ohm is reasonable for a 10A 1500W 230V motor.

In this question: Using an RC snubber with a triac. Is this design safe? (simulation included) , the author wonders why a 10nF cap in series with 39 ohm is recommended, when 100nF gives better results in a simulation, for a 0.3H 220V motor.

This question: Resistance and Inductance of a ceiling fan motor needed to spec snubber has an answer suggesting a 1uF cap without resistor for an unknown 230V ceiling fan.

The calculation in the answer to the first question above seems very reasonable. The cap should be sized so that it can hold all the energy stored by the inductance of the motor at max current. To do this sizing, it is necessary to know the motor inductance.

The answers suggesting a 0.1uF or even 10nF cap, usually don't contain any information about motor inductance. It seems to me that such a low capacitance would yield a very large voltage transient for most AC motors.

Could it be that the often cited 0.1uF or 10nF cap typically is way too small to protect a relay from arcing? And also that such a small cap would need a very high voltage rating (perhaps impracticably high) to have decent longevity of the cap itself?


texts: USB port and bench power supply ground difference

texts:
So I recently coughed up the $250 for a semi decent bench power supply, the thing that got me though is when powering a circuit from this unit and connecting the BusPirate via USB is that the ground levels aren't equal. Measuring the difference between the ground levels with a multimeter gives me a +-0.4V AC signal.

I ended up tying the ground levels together to prevent the BusPirate from putting out a voltage greater than 3.3V (relative to the power supply). This works but gives me a fair tingle when plugging out the USB connector and touching the ground sleeve as well as the circuit.

I have two questions:

Can AC signals this low cause any damage?
What precautions should I be taking to prevent damage to myself and components?

Here's some additional info:

The PSU ground is not connected to mains ground (It does have a mains ground but I'm not using it).
When touching the scope ground to the PSU ground (not mains ground) I can see a tiny little spark.
The PSU is powering a circuit on a breadboard, I'm using this ground as my one reference. The other reference is from the ground of a USB cable powering the BusPirate (A small piece of test equipment I'm using for USB <-> RS232 3.3V)
With the scope ground connected to the PSU ground (not mains ground) and the scope probe on the USB ground I get a 50Hz 3V p-p signal.
The USB cable is attached to my laptop which only has two leads. The resistance between the laptop ground at the laptop side and the plug mains ground pin is 800Ohms.


texts:
How can be perfect (ideal) diode use in 80V step up instead normal diode?

I mean something like this circuit:

I'm searched it on the internet and I find just something like synchronous step up, is that the same thing?

And what will happen with MOSFET transistor if it'll be exposed to 80V reverse voltage? (why it can handle reverse voltage in ideal diode but it can't when inductance load is turned off?)

EDIT: By step up (or boost conventer) I mean this circuit:


texts: Can I control a model train with a lighting dimmer pack?

texts:
I have an O-scale 3-rail track model train. I would like to be able to control this with a computer.

The normal model train transformer/controller goes from 0VAC at "stop" to 18VAC at "full speed".

My questions are:

1 - Could I technically control this with an electronic 120VAC dimmer pack, if I set a max level on the dimmer to 15% (thereby technically being 18VAC)?

2 - For safety and not frying components by accident, is there any sort of power supply that could 'scale down' the voltage, so 120VAC -> 18VAC and 60VAC -> 9VAC?

Thanks for any advice as to whether my thinking/approach is valid here, or if there are better ways of controlling this via a computer.


texts: line follower design with atmega328 and mosfet controlled motors

texts:
I made a design for my line follower. I am using an atmega328 from a duemilanove board. The motors of the line follower are connected to two mosfet transistors which are pulse width modulated from the pins 5 and 6. I also have 5 infrared sensors. the sensors and the atmega are being powered by a lm7805 and the motors directly from the battery.

The problem is that when I put the atmega on the board it doesn't run the motors, but if the atmega is on the arduino duemilanove and just the pins 5 and 6 are connected it works. I did not connect all the pins from the atmega just those which I am using that means pins 0-4 for the sensors the vcc and gnd pin, pins 5 and 6 for the motors and the two pins which are connected to the crystal and the 22pF capacitors.

Do I need to connect some more pins, or is it consuming to much current so that the lm cannot give so much (I also did not put the two capacitors to the lm7805) or is it some other problem?

Edit: Added Schematic and Board:


texts: How do we calculate the input impedance of an op-amp?

texts:
Question:

1.3

1.4

How would I calculate the input impedance in the diagrams above?

This is what I have tried in my exam, however I got this wrong, and my teacher had told me not to take into account the 2 10k resistors.


texts:
I designed a boost LED driver based on TPS92691. It drives 56V 5A COB LED from 22-50V input. It works ok.

Oscilloscope shows small spikes on input (100mV), but large spikes on output (3V). The spikes are from switching (400 kHz).

I started with 4.7uF X7R output capacitor. Then added one more, spikes were reduced. Then added one more, which reduced spikes little more, but adding more capacitance does not change anything anymore.

I mesure with probe with wire coiled around it.

The switcher is powered by separate 12V power, it has 10uF and 1uF caps right next to Vin pin. Every IC has caps near them. Output caps are close to LED wires.

As I understand it, the spike (ringing) happens when MOSFET starts conducting, then when it opens, second, smaller one happens.

Can the spikes be reduced somehow? Also, is it bad, will it harm anything?

The datasheet

Schematic


texts: Controlling Power LEDs through multiplexer

texts:
I'm working on a circuit to control some number of 1W Power LEDs with Arduino. I used the constant current driver with MOSFET from here: http://www.pcbheaven.com/userpages/LED_driving_and_controlling_methods/ but connected the MOSFET gate to Arduino output pin - and it worked like a charm.

But because I need to control more LEDs than Arduino output pins, I added multiplexers in-between. The complete circuit looks like this:

The control logic on Arduino is straightforward and simply outputs HIGH to the common output and appropriate address to A/B/C pins. The problem is that when switching between LEDs they don't turn off completely. They behave as if the the output from the multiplexer was left floating, even though the tech sheet (http://www.ti.com/lit/ds/symlink/cd4051b.pdf) says that inactive pins should get '0'.

It seemed like a reasonable idea to put a resistor between the MOSFET gate and the ground to pull it down, like this:

and it does work just fine, but I have two questions:

why didn't it work properly without it? which part of the multiplexer tech sheet actually indicates that I need that resistor?
what should be the value of R3? I had 100kOhm at hand, so I just put them in, but I would much rather have something chosen based on R1/R2/Q1/M1/V1. Same question for R2 actually - what does it influence? just the switching time for M1?


texts:
I'm new to Arduino and spent shockingly long on an RFID code variant. Unfortunately someone then snuck into my flat and nicked my laptop. The sketch however is still on my Arduino UNO, is there a practical way to recover it in a format that would be useful? Or would my time be better spent trying to recreate it from scratch?
I've come across some references to bootloaders/HEX/temp files but I'm not sure how that would work or if it would result in anything useful at the end of the day.
Thank you for your help!


texts: How do I modify this working circuit to work with a single 0 - 5 V rail?

texts: I want to build a sine wave generator, but I have just +5 V and 0 V. I build the schematic in LTSpice. If I try with +5 V and -5 V it works very well, but when I try with +5 V and 0 V it doesn't works and I don't know why? Can somebody help me? Also I need 2.5 V offset and 1 V peak to peak amplitude.


texts:
simulate this circuit – Schematic created using CircuitLab

The circuit above is that of a buck regulator that has an efficiency of approx 85%. The input and output voltages are 10V and 3.3V resp. The output wattage is 0.2W.

So, the output current is Iout = Power/Voltage = 0.2/3.3 = 60mAmps.

Now, my doubt pertains to the current drawn from the battery or bench supply that gives/supplies the 10V.

Now, since the Pout=0.2W, Pin=0.23W (due to the 85% efficiency value). So, 0.03W is lost or dissipated in heat.

Now, Pin = 0.23W. So, I = 0.23/10 = 0.023Amps = 23mAmps.
Is my deduction and understanding correct ?


texts: Meaning of "per digit" for a sensor reading

texts:
I'm using an LSM9DS0 IMU and looking at the data sheet here: www.st.com/resource/en/datasheet/lsm9ds0.pdf.

In table 3 p13, it lists the sensitivities of the 3 main measurements in:

mg/LSB "milli gees per least significant bit"
mgauss/LSB "milli gauss per least significant bit"
mdps/digit "milli degrees per second per digit"

What does "per digit" mean?

There are good answers already about the meaning of "per least significant bit."

Looking at other places where this component is used is seems to mean nothing different from "per LSB". I.e., "per count of the encoder" But why is it spelled differently?


texts:
I am a fresher to Mplab. I wanted to know how to fire RCREG. I have tried many internet searches and still not successful. Please help me out with this. I just wanted to input, let's say "A" into RCREG. How do I do this using Stimulus in MPLAB?

thanks,
Phani Anne


texts: Capacitor Value in Bass amplifier to speaker circuit

texts:
Replacing electrolytics in a 30+ year old Ampeg BT-15 bass amplifier. The PS filter caps are \$ 2500 \mu F/80V\$ which are rare to be found; I know that 3300/100 would be okay for the filter. There's also a \$0.1 \mu F\$ in parallel which I asked about earlier and got helpful answers.

There is also a \$ 2500 \mu F/80V\$ electrolytic in parallel with a \$0.1 \mu F\$ just in front of the speaker connection, after the power transistor network. I know that it is in poor condition because pushing on it causes all kinds of static and popping. The replacement needs to be a through hole mount, preferably radial leads based on the configuration of PCB. I can't find that specific capacitor: the largest 80V cap is \$1800\mu F\$, and going to 100 V gives me either a \$2200\mu F\$ or \$3300\mu F\$ as options. Does it matter whether the replacement is higher or lower in capacitance? What effect on tone might either of these choichave?

simulate this circuit – Schematic created using CircuitLab


texts: In many power supplies, there's CV & CC indicators. What does they mean?


texts: Resetting Li-Ion battery protection PCB without disconnecting the load

texts:
Given is an 18650 Li-ion battery with built-in protection PCB. It is used to power an electrical load and can be charged by a dedicated Li-ion battery charger. In the schematics below, the battery is charged when the switch is closed which corresponds to connecting the charger to the battery.
As the Li-ion battery features a protection PCB, it will detect if the battery gets shorted and will cut-off the current flow. Usually, the battery protection PCB can be resetted by connecting the charger to the battery. However, I found out that for my case the battery protection PCB does not reset when connecting the charger to the battery unless the electrical load is disconnected from the battery. That makes sense as the battery protection PCB seems to monitor if the electrical load that caused the short is still there and only resets if it is removed. However, is there any way to reset the battery protection PCB without disconnecting the load? Because in my case, the electrical load cannot be easily disconnected and it's not the electrical load where the actual short of the battery might occur, but it might occur externally, directly shortening the battery for some milliseconds. I tested this for different batteries with protection PCBs with the same result (Keeppower and Panasonic). I know that it's the safest solution to avoid external shorts in the first place. But I'm also curious about this question from a technical point of view.

simulate this circuit – Schematic created using CircuitLab


texts:
I have the following circuit:

I am asked to choose values for the different components such that at the end, the amplifier meets certain requirements.

In the solutions, I am told that to minimise the effect of emitter degeneration, I should choose the impedance of the capacitor to be significantly smaller than that of 1/gm1. As an explanation the following circuit is given:

There are 2 logic steps that I cannot follow:

If we consider the impedance when looking into the emitter of the BJT (which is just 1/gm1 in the hand-drawn circuit) shouldn't it be 1/gm1 + (R1//R2)/(Beta+1) as the base doesn't go directly to an ac-ground.
Why would we consider v_in to drop over the node impedance looking into the emitter? Intuitively I'd assume we'd consider a potential divider between r_pi and the total emitter impedance divided by (Beta + 1)

This is why I don't follow step 1


texts:
I am learning basic electronics by repairing a series of broken devices in my home lab/workshop. My first repair is a very common problem: some defective LEDs on a Style Selections 15-in Adjustable Brushed Steel Casual/Transitional Integrated Desk Lamp with Metal Shade Model # 17794-000 from Evolution Lighting (www.evolutionlightingllc.com). The company doesn't seem to respond to parts requests for components, and my searches on the internet haven't turned up a part number or supplier for a few replacement LED's.

The LED's appear to be 5mm bright white straw hat with a forward voltage of 3.2 volts. I have attached photos in case someone can help me with component identification, manufacturer/supplier and a part number. (This is a simple repair that should keep a useful item out of the landfill - and help me perfect my soldering/desoldering skills.)

Many thanks to anyone who can guide me to a solution.


texts:
I have the following two questions in the derivation of current in a diode.

1) In forward bias, an assumption "abrupt junction" is made and field is equal to 0 is also made. But then we still use built in potential. How is this okay?

2) In most semiconductor classes and also in Millman and Halkias they have left reverse bias case as similar. But can anyone help me out with the actual derivation? Because i don't see how the exponential decrease in hole concentration with distance occurs if the field is non zero in the continuity equation

Any help would be appreciated. Thanks


texts:
I'm developing a set of boards that will all be listening to a single 3.3V 38400 baud UART (single TX device, my boards all listen to this line, no "RX" line). They are designed such that there are two RJ12 jacks per-board, and the signal and ground is just passed between the RJ12, with the signal going to the uC on each board. The idea is to daisy chain up to max 5 of these boards, with less than a foot of cable between boards.

Here's what the signal looks like after 1x 6" cable, a board, and another 6" cable.

How far can I reasonably expect this setup to work? I'm considering scrapping the whole thing and using RS-422 or RS-485 drivers, but that feels silly when these boards will have a 6" cable between them.

On a broader scale, how do you predict usable cable length given a baud rate and voltage level?


texts:
I know that many questions on operation of dc-dc buck converters have been asked in the forum. I'm really confused with the exact operation of the circuit. I've been reading about the converters and I am unable to find clear explanation.

I understand that buck converters provide regulated output whose value is controlled by the on and off periods of the switch. From what I've read, the inductor and capacitor form a low pass filter and reduce the output voltage ripple. (This supposedly happens because inductor opposes changing current and capacitor opposes changing voltage)

But a Low Pass filter is the one that attenuates frequencies higher than a desired frequency and passes the lower frequencies. So How does this definition fit in this case?

The analysis of the circuit begins with the assumption that output voltage remains constant and hence during the on-time of switch, voltage across inductor is constant resulting in ramp current through inductor. But how is the output voltage maintained at constant level?

What exactly is the need of inductor? As in case of rectifier only a filter capacitor, provides almost constant output voltage.

I've some other questions regarding the analysis of current and voltage waveforms that would not fit into this question. I'd really appreciate some help.

**
https://electronics.stackexchange.com/users/20218/andy-aka

I've been reading your answers on questions related to buck converters.

https://electronics.stackexchange.com/a/80096/53331

"you are using an inductor and capacitor to form a low pass circuit and providing the inductor's internal resistance isn't too big then there won't be too much of a dc volt drop across L1 and you'll still get 3.3V at the output."

Could you please explain this clearly? What is the filtering action here?


texts: Frequency dependent impedance calculation for microstrip

texts:
I need a hint. I'm stuck on outer layer impedance calculation for high speed design. Other PCB designers route high speed tracks on inner layers because of not controlled plating thickness on outer layers, which causes impedance variation. I went deeper and jumped into theory but can't find out if thickness at all matters (in case: skin depth < mictostrip thickness)?

Stackup:

copper 36um
substrate 100um
copper 17um (plane)
...

For example at frequency of 2GHz the skin effect depth will be \$\tilde{}1.41\mu m\$

What copper thickness should be used for impedance calculations? \$36\mu m\$ or \$1.41\mu m\$?


texts: For "Fast Arbiters for On-Chip Network Switches", what is the difference between Proposed-I and Proposed-II topologies?


texts: Converting a sprinkler system's 24V AC outputs to 3.3V DC logic inputs

texts:
I am working on a system that can detect which of the AC outputs on a sprinkler box is on and for how long. The sprinkler box has one common wire and then 18 connections that output 24V to open sprinkler valves. My plan is to use several full bridge rectifiers which connect to some transistors. The Base of the transistor connects to the positive end of the bridge rectifier, the collector connects to a 3.3V line, and then the emitter is connected to ground so that when one of the sprinkler leads turns on it grounds the corresponding transistor. I then have a micro controller looking at the voltage of the collector side of the transistor to see which lead is on.

The problem I am having is that when one of leads from the sprinkler box turns on it flip on all of the transistors and grounds all of the logical leads to the micro controller. I did some tests with a multi-meter and when one of the leads of from the sprinkler leads turns on it is at 24Vrms and all of the other outputs are at about 1.4Vrms. The Voltage after being rectified is 35V on the input which is currently on, and then 34V across the all of the other rectifiers.

I don't know much about rectifying AC current to DC current but I am thinking the issue is with the common wire. I think the common wire may be creating essentially a half bridge rectifier and outputting a lower voltage that is still causing the transistor to ground the input. Anyone have any ideas of either how to fix this problem, or of what is actually happening?


texts: Designing an instruction set for a homebrew computer

texts:
I'm going to begin the adventure of building an 8-bit homebrew computer.
Right now, I'm considering the instruction set. SAP-1 seems a bit too sparse, so I'm designing my own.
Some facts:

My primary goal is to learn. I'll be building this on breadboards.
I plan on using 4 bit addresses (so 16 bytes of RAM).
The computer will have a 7-segment display for its output.
I want to be able to easily write simple math programs (addition, subtraction,
multiplication, division). Do I have enough RAM for this?
I plan on using an ALU with zero, sign and carry status bits.
The system will have two registers for computation (A and B).
I'll have additional registers for current instruction and output.
Each machine code instruction will use the 4 highest bits for operation codes and the 4 lowest bits for data.

Here is the instruction set I'm thinking about. Does this make sense? Are any of these redundant/unnecessary? Is anything missing?
0000 | NOP | No-op
0001 | LIA | Immediately load data into A register
0010 | LDA | Load contents of memory address into A register
0011 | STA | Store contents of A register into memory address
0100 | CAB | Copy contents of A register into B register
0101 | CBA | Copy contents of B register into A register
0110 | ADD | Add contents of memory address to A register
0111 | SUB | Subtract contents of memory address from A register
1000 | INC | Increment contents of A register
1001 | DEC | Decrement contents of A register
1010 | JMP | Jump unconditionally
1011 | JEQ | Jump if ALU zero bit is expressed
1100 | JNG | Jump if ALU sign bit (negative) is expressed
1101 | JCA | Jump if ALU carry bit is expressed
1110 | OUT | Copy A register into output register
1111 | HLT | Halt

Also, please let me know of any good resources for instruction set design, or general homebrew computer design.
I'm currently working through The Elements of Computing Systems and Ben Eater's YouTube videos.


texts:
I bought a printed board online with components that I should solder. I had the map, and I soldered them, but when I tested the circuit with a 12 V battery it didn't work. The circuit is an audio frequency amplifier, with a mini microphone and speaker. Here is the link about it.

Is there any problem with the soldering part?


texts:
I have a development board for an STM32F2 (reference manual for the development board available here). I would like to solder on this SPI Flash chip on it.

Can I use any GPIO pin that I'm not currently using? (E.g. the LCD pins.) In terms of hardware, how should I prepare the pins I choose?

For example, page 22 of the reference manual says that "to disconnect with function block" pin PC14 I need to "remove R84". What does "disconnect with function block" mean? How should I remove resistors from the board? (Those are not detachable like the jumpers.)


texts:
This is something that happened recently.
I was casually using my laptop with the laptop placed on a table, charging and my feet on the marble floor below. Only one of my feet was in contact with the floor and that too was not completely in contact with it. Only my toes were actually in contact with the floor.
So, I accidentally touched the metallic case of the in-built speaker and it gave me a very hard electric shock. I think it's worth mentioning that my finger's still hurting from it. I also felt like the current was alternating. I felt a very fast vibration in my hand and that is how I assumed that.
I have experienced this earlier a few times as well, whenever I'm barefoot and my feet are in contact with the ground. We went to a repair shop and the employee there said that it's normal for the metallic parts to shock you and it's just 12 volts DC, so it won't be fatal.
Is it normal or something is seriously wrong?


texts:
I'm getting to know the Freescale Kinetis L microcontroller. It's ADC has a lot of options, but long story short, it seems like I should be able to get 16-bit resolution in either single ended or differential mode.

The sensors I want to read vary their resistance, so I was going to just hook them up in a voltage divider to determine the resistance:

simulate this circuit – Schematic created using CircuitLab

Is there any benefit to using the differential inputs in this scenario? I was thinking maybe it would have better common mode noise rejection in this mode. Am I over-thinking it? The sub-family datasheet certainly makes me think I get better resolution (effective number of bits) in Figure 7 and Figure 8... So when is it appropriate to use the Differential Inputs?


texts:
I have been assigned a task to design an adjustable audio amplifier. the circuit should be able to tune into the edge frequencies fl and fh as well as A1, and A2 as seen in the attached file below. Furthermore, it is anticipated that I need to design various filters for different frequency bands ( eg. high pass filter for f ≥ fh).

A


texts: I want to control a 12V heater coil with 5KHz 5V PWM using the below circuit, but the load voltage does not goes higher than 5V. I made a similar circuit with a MOSFET and the result does not changed. What's wrong with my circuit? How can I fix it?


texts:
To design a PCIe*8 carrier board for a XC7K160T module, what is the requirement for the PCB?

The 16 pairs are all adjacent to each other on the 0.6mm pitch B2B connector of the module with ~20mm span , the signals on the card edge span ~40mm. The module is planed to be placed as close to the PCIe connector as possible. But *8 still means some horizontal routing and vertical spaces for routing.

For example the vertical space is 20mm, then all signals are in a (20-40mm)*20mm area, then trace length on the carrier board won't be longer than 40mm, suppose the signal rise time is 100ps, then the trace length is several times the rise length, then impedance should matter even on this small area, and I'm not sure whether will this be a "work by luck" design with such many connections (chip to module to carrier to motherboard to chipsets).

It is said PCIe3.0 works on FR4 but is at the upper limit of FR4 https://www.intel.com/content/dam/doc/guide/pci-express3-phy-implementation-considerations-idf2009-presentation.pdf, even 10GT/s's eye won't open well.

FR4 also may have many grades, what is the requirement and what to tell the PCB manufacture?

The carrier board is very simple, can very low cost 4 layer board from small vendors be used (can they even replace FR4 with some lower grade material)?


texts: \$V_{BE}\$ decreasing with \$V_{CE}\$ at constant \$I_B\$ in a BJT common emitter?

texts:
I took measurements on a TIP31 common emitter BJT transistor. The circuit was the one in picture

I observed a fact which seems quite unusual.
Keeping \$I_B\$ constant, for different values  of \$V_{CE}\$ I measured the corresponding \$V_{BE}\$.

Plotting  \$V_{BE}\$ vs. \$V_{CE}\$ it is clear that \$V_{BE}\$ decreases if \$V_{CE}\$ increases.

This fact should be in contrast with input characteristics I found, like this one

Also using Multisim for a simulation, I find that \$V_{CE}\$ should increase with \$V_{BE}\$ at \$I_B\$ constant.

Is this behaviour really unusual or could there be an explanation for it?


texts: Which instrument for arbitrary signal commutation (matrix)

texts:
I would like to test a bunch of sensors. Each sensor has a DB15 connector with mixed digital and analog signals (bw ~5MHz, Z ~120R).

I am looking for an instrument where I can control which couple of sensors I would like to interconnect to the measurement PC. I've seen commutation switch such as the Keithley 3706A, but these guys does not accept custom commutation board when I can populate my own connectors and my own relays.

So I am thinking to make my own commutation system with a MCU, a FTDI and a bunch of analog switch and relays.

I feel this is a very common need in the testing area and I would like to know what commercial solution can be used in my case.


texts: Why is voltage level affected by low temperature?

texts:
I have designed a circuit that uses this low-battery-indicator:
http://www.homemade-circuits.com/2013/05/low-battery-indicator-circuit-using-two.html

I use 4xAA Lithium batteries to drive an Arduino Pro Mini, some LEDs, a buzzer and a solenoid. The circuit diagram below shows the complete circuit.

The circuit will be used in a buzz wire game that is placed outside. When the player completes the game the solenoid is activated to reveal some treats behind a trap door.

The solenoid is activated in three short 80ms bursts to make sure that the trap door mechanism is released. It fails to release one time of twenty but that is probably a mechanical issue.

The game is turned off while not in use and is activated by a switch when a lid is opened.

The game might be visited approx 5 times each week. Initially more frequently.

The target operating temperature range is from approx. +25°C in summer down to approx. -25°C in winter

Parts list:

4 PCS of 2V 15 mA standard indicator LEDs
1000uF 10V electrolytic capacitor
Arduino Pro Mini Processor
1N4007 fallback diodes
1% 1/4W metal film resistors of various values (see schematics)
3V 15mA buzzer, operating voltage 2-5V
HK 19F 5 V relay, 125 Ohm coil resistance
JF-0530B 6V 300mA solenoid

Some current measurements:

Arduino and one LED: 36 mA
Arduino and two LEDs: 53 mA
Arduino, one LED and the buzzer: 56 mA
Arduino, two LEDs, the relay and the solenoid: 1.57 A

I set the low battery threshold indoors so that the low-battery-LED lights up at around 5.8 V.
The initial battery voltage reading with the circuit off is 6.5 V.
With a 53mA load the voltage stabilizes at 6.1 V indoors.

But when I place the circuit outdoors for a while in approx 0°C the low-battery LED turns on even if the rest of the circuit works as intended. I measured the voltage outside and it reads 5.8V

When I take the circuit indoors again with the exact same batteries the low-power LED turns off and the Voltage level is back to 6.1 V

Is this a normal behavior?
The circuit is meant to operate at -20°C. Will the voltage level be even lower at that temperature?
Is there a way to prevent this from happening?


texts: Why can't I measure resistance when there is current on the potentiometer?

texts:
Probably a very basic question but I have no idea why this happens.

I have a 1K potentiometer. When I measure the resistance over its legs when it is not connected to anything, the results are as expected and alter expectedly when I move the knob.

However, when I connect the pot to a 9V battery and try to measure the pot's resistance, I don't get any readings.

What is the reason for this behavior?


texts: What does [WEAK] mean in STM32 startup assembly code?

texts:
I was reading the STM32F407 startup file in Keil software to gather some information. I faced this problem: What is the [WEAK] symbol used for?

A part of the code that this symbol has been used in is:

Reset_Handler    PROC
                 EXPORT  Reset_Handler             [WEAK]
        IMPORT  SystemInit
        IMPORT  __main

                 LDR     R0, =SystemInit
                 BLX     R0
                 LDR     R0, =__main
                 BX      R0
                 END


texts: Mistake in calculating the last time of battery (Ampere hour problem)

texts:
I've a question about the mAh rating of batteries. At the Dutch Wiki page of Ampère-uur which is the Dutch word for Ampere hour, they say for example a \$100\$ Ah battery can supply 5 A for 20 hours by a temperature of 20 degrees Celsius. So, in my case I have a battery of 1 Ah and it can deliver \$\frac{1}{20}\$ A for 20 hours by a temperature of 20 degrees Celsius. So when my battery has to deliver \$0.088\$ A it will last for:

$$\frac{20\space\text{h}\times0.088\space\text{A}}{\frac{1}{20}\space\text{A}}\approx35.4\space\text{h}\tag1$$

But this seems wrong, because when I decreas the current comsumption to \$0.2\$ A the battery will last for \$80\$ hours which is higher then when I use the \$0.088\$ A.

Where is my mistake?


texts: Need help producing triangular waveforms

texts:
I've recently started using pspice and just created my circuit but don't understand how to do step 3 on procedures. I've created my circuit based on the second picture shown below (ignore my 10V). I've also made sure to show the waveforms I got by following all procedures except for step 3. I just don't understand how to do step 3.

Thanks.


texts:
Is it possible for some reason I can be able to safely connect two charge controllers (who draw their solar power from the same solar panel array) to charge separate/independent batteries?

(It is to be noted that the batteries each discharges independent of one another at different times). Thanks for your time.


texts: Smallest Footprint Source Only (No Sink) Buffer Solution

texts:
I'm currently in the process of designing a cable snake cable tester for recording studios that involves testing for connectivity between a large number of inputs. This involves using a microcontroller + shift register to toggle between a large number of output pins, and testing to see if the voltage from this is present on the input pins. This works well, except that in the case that a large number of pins are shorted, in which case the output resistors between the high and low pins act as a voltage divider and lead to false readings / undetected connections.
For this purpose I need some kind of buffer that will source current, but not sink it. Basically I need the outputs to source voltage when logic high, and be in a neutral high impedance state when logic low. I'm thinking if worse comes to worse I can do this with a BJT transistor array and a resistor array, but I'd prefer to find a single IC solution as this project already has an extremely large footprint. Basically something like the reverse version of the ULN2803 Darlington transistor arrays, that can source current rather than sinking it. Can y'all recommend anything I should check out for this application?


texts: flow power around button laser module circuit

texts:
I have a red laser pen module:
http://space-linker.com/Uploadfiles/UploadFile/2010178127739.jpg
I want to be able to have it always on.
How can I short the button, without having to glue or tape it down.
Is there a circuit I can cut across with the power?

Button:
https://cdn.sparkfun.com//assets/parts/9/0/00097-03-L.jpg

Thanks


texts:
link

In the above link, in the end it says

"If you replace the VOUT in the equation for V− by this value you'll find

V−=0V"

Does anyone understand what it means? If so, please explain it to me.


texts: Reading and interpreting output sensitivity of a load cell from data sheet

texts:
I'm given these ratings /spec for load cell / sensor:

Range: 0-200kg
Output sensitivity: 0.7 ± 0.15mV / V
Nonlinear: 0.05% F.S
Hysteresis: 0.05% F.S
Repeatability: 0.05% F.S
Creep: 0.05% F.S/3min
Zero output: ±0.1mV/V
Input impedance: 1050±10Ω/1050±10Ω (self-compensation) Output
impedance: 1050 ± 10Ω
Operating temperature: -10~+45°C
Wiring method: red (power positive), black (power negative), green
(signal positive), white (signal negative)
Zero temperature drift: 0.05% F.S/10°C
Temperature sensitivity drift: 0.05% F.S/10°C
Insulation resistance: ≥2000MΩ
Excitation voltage: 3~10VDC
Overload capability: 150% F.S
Four-corner error: ±0.05% F.S

I know this is likely dumb question, but is the sensitivity there 0.7V +/- 0.15mV, or is this 0.7mV +/- ..? Probably 700mV/V is too much, but 0.7mV/V sounds too little .. ? (or does it..)

If 0.7mV/V, if I'm applying 5V input - that's my plan - this will be output range 0 - 3.5mV, which seems too low ?


texts: I'm learning Altium at job. Just curious what is the difference between the yellow rectangle and the white ones on the schematic symbols?


texts: Pass device selection for bench DC power supply

texts:
I'm designing a DC Bench Power Supply. This one will be 0-30V, 0-300mA, but I expect I'll try some heftier models once I've gotten this one worked out.

I'm following the general design procedure described by Christophe Basso in his
book Designing Control Loops for Linear and Switching Power Supplies: A Tutorial Guide. In particular, the following aspect:

Think of the overall circuit as a power stage (plant) with transfer function
\$H(s)\$, and a compensator with transfer function \$G(s)\$.
Determine the transfer function of the power stage. (Experimentally is
recommended, to capture effects of actual parasitics.)
Design the transfer function of the compensator, specifically its
gain/frequency breakpoints, to compensate for the deficiencies of the
power stage, producing the overall frequency response desired. This
essentially conditions the loop gain transfer function for optimum
performance vs. stability.

I'm using a power NPN BJT as the heart of the power stage. I've chosen
a 2N3055, mostly because I have one on hand and its TO-3 case fits nicely into
the enclosure I plan to use (a vintage HP 721A power supply).

I've managed to get a nicely stable circuit for the constant voltage aspect with the schematic below. (constant current, metering, etc. to follow)

The loop gain Bode plot looks like this. Things shift around a bit based on the programmed voltage and load, but this roughly represents the center point, with \$\phi_m\$ of 64° and gain margin of 27dB:

However, the bandwidth I'm able to achieve is relatively low (roughly 1-2kHz),
and that limit is driven by the low-frequency pole of the 2N3055 (about 9kHz).
That pole is the "right-hand" pole for my phase boost, which puts the peak of
the boost in the neighborhood of 1.5kHz.

So my question is: Is this just the best bandwidth I can expect from
a BJT-based power stage? Or can a clever selection of a different power device
allow me to get an order of magnitude or more bandwidth improvement?


texts: I am having trouble making this gyroscope to work. I can sort of get Z axis readings from it. If I don't move it, the X and Y axises constantly display -1. When I move the gyro, the X and Y would jump a little bit (a few hundred) but as soon as I stop, they go back to -1. Any suggestion is appreciated. Thanks!!


texts: What circuit simulators can also simulate ESP8266 and/or ATmega328?

texts:
I'm going to start soon some ESP8266 and Arduino Nano projects. I've used some simulators in the past, but none of them simulated these ICs.

Dou you know if there is any simulator, that would also include basic passive components?
Clarification: ideally, the simulator will take and run the Arduino/ESP code.

Can be online or desktop (Win/Linux/Mac), free or paid.


texts:
Based on a very closely related question: Choosing the right transistor for a switching circuit I have managed to create a working circuit, but I need the correct transistor.

Some context: I am trying to power and switch on/off an 12V, 4.8W LED strip from an arduino.

I have done the same calculations as in the question above, and arrived at

$$h_{FE(minimum)} = 5 \times \frac{0.4}{0.04} = 50$$

The only transistor I have is a BC413B, which has a maximum collector current of 0.1A. Since my LED strip is 0.4A, based on my limited knowledge, I gather this is not sufficient. Currently, with a 1KOhm resistor at the base, I get very little light out of the LEDs.

My question is:

Which transistor and resistor should I be using instead of the BC413B and the 1KOhm resistor to achieve the full effect of the LED and without destroying the components over time?


texts:
I have a simple Wien Bridge Oscillator (with JFET gain control) circuit pictured below. This circuit works as expected at lower voltages (+/-9 V), but I am running into some problems with higher voltage supplies (+/-16 V). I believe the JFET (2N3819) is burning out early in operation from some kind of transient voltage spike.

I have a supply voltage of 32 volts DC, which is then split with a virtual ground Op Amp circuit to create the +/- 16 V. From the schematic, I thought that the 25 V JFET should be fine since the greatest possible potential over it would be only 16 V. Is there an effect that might cause that transistor to exceed that voltage, or am I missing something here? Perhaps the voltage splitter allows this kind of transient?

Unfortunately, I do not have the equipment to test and record the time history of the circuit to verify the problem. I have successfully simulated the circuit in LTSpice, where the max potential developed at the gate of the JFET is within only -3 V.

If the problem is indeed with the JFET at higher voltages, what JFET might perform similarly at higher voltages? By similarly, I mean a resistance profile that allows for gain control in the Wien Bridge Oscillator.


texts: I fried an ESP8266 Wemos Mini with a simple circuit, what am I doing wrong?

texts:
I'm pretty new to electronics, I'm more of a computer guy.
I followed this tutorial to build a vibration sensor. My circuit looks like below.
When I turned it on everything worked, but within a few minutes I noticed a burning smell and my microcontroller stopped working ever since. I suspect I fried the onboard voltage regulator. I tried providing 3.3V to 3.3V pin, now the ESP8266 module is heating up.
I am afraid to use a new microcontroller to fry it again with the same circuit.
What am I doing wrong? I checked for a short circuit, my soldering looks okay. Do I need a resistor to D0 of SW420?


texts: Non-trivial logic function to CMOS schematic

texts:
I wanted to implement the function:

$$Y = \neg (A \land (B \lor C))$$

This is what I came up with, it looks correct to me but I would like  a second opinion on that.

simulate this circuit – Schematic created using CircuitLab


texts: Could a lamp plugged into an outlet be dimmed using a variable resistor?

texts:
If you had a variable resistor connected between a lamp and the wall, could it be dimmed with a variable resistor?

Would it be practical, i.e. would it waste much energy? And would it affect both current and voltage or only one?


texts: How to add additional I2C sensor module on Arduino

texts: I have tried the GY-521 sensor on Arduino by using the guide from (http://playground.arduino.cc/Main/MPU-6050). It worked well. Can anyone guide me on how can I add another GY-521 module please? I am planning to use a total of four of them connected to my Arduino Uno. How do I define the additional sensor modules in the program?


texts: How to amplify a signal to trigger a function generator?

texts:
I have two digital signals, I perform a AND operation on these two signal with an AND gate (TI SN74LS08N), and want to use the output signal to trigger a function generator which will generate another signal.

So I did get the AND signal from the gate, and when I connect the output signal from AND gate to the oscilloscope, the signal looks good and have 0 and 5V for low and high. But when I connect this signal to the function generator, and put the generator to external trigger mode, the function generator is not triggered. I used the oscilloscope to check this signal, and found when the function generator is connected, the output signal from the AND gate dropped to 0 and 500mV for low and high, which is absolutely not enough to trigger the function generator.

So my question is how to amplify this output signal from AND gate so that it is enough to trigger the function generator? Can I use an op-amp to amplify the signal?

If so, how can I do it? One thing I am thinking is if I use the op-amp, how should I choose the resistor ratio to get the proper gain? I mean, before I connect the output from AND gate to the function generator, the signal is 5V for high, only after I connect it to the function generator, it drops, so should I use the dropped signal, for example, 500mV to calculate the gain, which will be 10?

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

Update:

The function generator is a DEI PDG-2515, the data sheet can be found here.


texts:
I was wondering how does the protocol mapping work between the USB side and the UART side when dealing with the Microchip MCP2200?

What sort of USB transfer type is used?

bulk?
isochronous?
interrupt?

Thanks for any clues!

update: I found a bit more info Virtual COM port.


texts: How to make transistor stay in saturation region and proper Rc value caluculation

texts:
In order to stay in the saturation, the voltage between collector and emitter has to be exactly equal to Vce in the char above, is that right?
But when the transistor is working at Vce and 0 < Ib < (Ic/beta), meaning Ic is not at the maximum capability for the transistor. The voltage drop between collector and emitter is a fixed value for the transistor made of certain material (0.7V for silicon and 0.2V for germanium). Is that right?
And, Rc, the resistor in serial with collector takes the remaining of the voltage from power supply. E.g., 5V power supply Vce is 0.7V, as long as the transistor is open. And, the voltage left for resistors in serial with collector is 5V - 0.7V = 4.3V. Is that right?
So, the value for Rc to limit the current Ic from its maximum, say 0.6A, would be 4.3V / 0.6A = 7.17 Ohm?
When using voltage divider(two resistors in series) to control the Ub, voltage at base, making Ub higher than the 0.7V voltage drop required for Ube to open the transistor, why could the Ub be higher than 0.7v? I thought Ub would always stay at 0.7V for silicon knots and 0.2V for germanium knots.
As I'm still waiting for my NPN transistors to arrive to do experiment, my breadboard experiment with PNP transistor BC557 B shows, when Ub is lower than Ue, which is required to open the transistor, it seems Ub is decided by Uc minus the voltage drop between c and b, instead of the voltage divider for base pin.
Thanks!


texts: Transistors as switch and amplifier to control LED strip

texts:
I am controlling an LED strip based on audio input from my phone. I am having some good results, but not exactly what I want, and my ignorance of transistors is holding me back. (I'm a mechanial engineering major rather than electrical.)
I have my phone connected to an amplifier which then outputs an AC audio signal through a bridge rectifier and then that DC signal is sent through an NPN transistor (TIP 121) acting as a switch to control an LED strip. I've got the lights to choreograph to music and it looks great, however, it only works when the volume is very loud. As I increase the volume, the LED strip gets brighter, and as I decrease it, the LED dims.
My first question is why does this happen? I have the strip connected to 6V so shouldn't the input from the amplifier to the transistor only switch on and off the 6V supply?
And if I want the lights to work at low volume (when there is too of low current from the amp to switch the transistor,) can I add a second transistor to act as an amplifier (based on a common collector/emitter follower circuit?) Should that second transistor go before or after the bridge rectifier?


texts: Read Data from Temperature Controller using MATLAB, Need Help

texts:
I am trying to read data from a temperature controller called ATR-401 using MATLAB's tool box called Instrument Control Toolbox but every time i try to read data from it i get an error "A timeout occurred before the Terminator was reached". I have attached 2 images below ,First one is the configurations i used to connect to the device and the second image is the reading data from the device :

As it can be seen, i get an error while reading, i have set it according to the datasheet for the device but i am still not sure why it is not able to read.


texts: Driving a high power (200mA) LED with a GPIO and NPN transistor

texts:
I'm trying to get my head around how to properly use NPN transistors to limit the needed current from my Raspberry PI GPIO.

I want to drive a Luxeon Rebel LED from Phillips (https://www.sparkfun.com/products/9637), and I have drawn up this kind of circuit for it:

I'm not that experienced with transistors, so I might be doing something very foolish here. But my thinking was that if I have a 9V battery, and I would like to use GPIO pin on my raspi, something like this might work.

I calculated the resistor value for the LED1 with the information from the sparkfun website information (typical forward voltage of ~3V) -> R = (9V - 3V) / 0.2A. So I got 30 Ohms from there.

The battery and raspi ground would be connected. Is there something I am doing in a stupid or even dangerous way ?
I want to understand how properly use NPN transistor for this kind of purpose..


texts: How to determine the decoupling capacitor values for the power bus of an RF device?

texts:
While trying to implement an IoT solution using a quad-band mobile network module, supporting GSM,UMTS,LTE (2/3/4G), I advised to add all the following capacitor values to the modules power bus.

I have read several EE-SE answers on the subject and now understand that they are used for decoupling and evening out both LF and HF noise variations on the power bus.

Some relevant posts include:

What's the purpose of two capacitors in parallel?
Decoupling capacitors: what size and how many?
Multiple identical parallel capacitors
How to know exact Decoupling Capacitor values for supply voltages?
how can i calculate decoupling capacitor value?
How to choose capacitor for an IC
Calculating the value of bypass capacitors for an amplifier
Is there a formula to determine the size of decoupling capacitors?

To summarize briefly:

Large Capacitors handles low frequency noise and output load changes.
Small capacitors handle noise and fast transients.
Parallel capacitors results in a lower Equivalent Series Resistance (ESR) than a single capacitor of larger value.
LF capacitors (with higher ESR) have good performance in a wider range of frequency.
Using multiple capacitors would not only reduce reduce the heat generated (by ESR), but would also help spread the heat.
A decoupling capacitor is not only chosen by its Capacitance, but also by its ESR (Equivalent Series Resistance) and its ESL (Equivalent Series Inductance).

Q: (a) How are these values determined?

Q: (b) Why does small capacitors handle transient noise better than larger ones?


texts:
This is the code. I'm using stm32f103c8t6 and I want to communicate with a Bluetooth module (Hc-05).

I'm new with STM and I'm using registers and want to send just 65 for a test but it doesn't work and nothing is received.

#include <stm32f10x.h>

int main()
{
 RCC->APB2ENR |= RCC_APB2ENR_IOPAEN | RCC_APB2ENR_USART1EN | RCC_APB2ENR_AFIOEN;

 GPIOA->CRH &= ~GPIO_CRH_CNF9;
 GPIOA->CRH |= GPIO_CRH_CNF9_1;
 GPIOA->CRH |= GPIO_CRH_MODE9_1;

 USART1->BRR =833;
 USART1->CR1 |= USART_CR1_TE | USART_CR1_RE | USART_CR1_UE;

 USART1->DR  = 65;
}


texts: Finding desired closed-loop poles from root locus

texts:
I am trying to design a P controller (proportional constant only) to satisfy certain overshoot and settling time requirements for my plant. My values for \$\zeta\$ and \$w_n\$ which would satisfy the requirements are 0.86 and 0.52 respectively. So I went ahead and made a root locus of the plant's transfer function showing the lines for \$\zeta\$ and \$w_n\$ using the sgrid command. This would help me find the value of K.

As seen in the plot, the root locus does not lie within the desired location (in between the two dotted lines and outside the semi-circle). I am not sure how I can select the desired pole locations in this case. I might be doing something wrong, or not fully understanding what needs to be done. Could someone please guide me here?

EDIT:
My plant transfer function is \$\frac{8.25}{6.6s^2+s}\$
I need a proportional controller for my plant which would meet my requirements of \$<0.5\%\$ overshoot and \$<8s\$ settling time


texts:
I'm designing a circuit that is going to sense the existence of high voltage DC(400V+) via microcontroller. I've already designed it for AC voltage using an optocoupler; however, I will  not able to use an isolation component for DC detection. I'm planning to use a resistor and high voltage diode pair at the input level, and open collector npn transistor for the microcontroller end; but, I don't have an idea how to convert that high voltage to TTL level.

I appreciate any help or guidance to this problem.

edit: As requested, I add schematics of my AC detection circuit.


texts: Connection of IR 2110 for grid connected flyback inverter

texts:
I hope you all are fine. Before i proceed to my question please refer to the diagram shown below.

The circuit is basically the unfolding stage of the conventional flyback inverter. There are two switches S1 and S2 that work during positive and negative half cycle of the grid respectively. I am switching both of them at 6o Hz line frequency. Two separate gate drivers IR2110 are used for this purpose. Here are my questions:

The gate pulse of S1 is applied with respect to source, which is connected to 110 Vac. In this case, what should be the connection of IR 2110 ground ?
For S2 the source is connected with the so called ground of ac source, so should we join it with the IR 2110 ground ?
Is it necessary to use isolated power supplies for the biasing of both IR 2110 or we can use one single biasing source for both of them.


texts:
Im trying to build a little solar charger for a Li-po battery using

2 solar panels rated at 6V/120mA
a linear charger based on the TP4056 chip

The idea is to connect the two panels in paralel so it can get the most current at 5V at best (since its a variable source), the charger module has an overcharge/overdischarge protection (the DWO1A), so in theory,

Its enough to hook the lipo battery to the charger?
Its needed a diode at the Vin pin?
Supposing a constant value of light (ie. in the case the cells are providing the 120mA) how much time it does take to charge a 2000mA?
Its worth to attach at the output of the charger a boost converter (based on AOD4184,SD1040CS and LTC1871 ), so it can be charged at least two battery on parallel?


texts:
I was searching, but was not able to find an answer which is helping me.
This is the first time I'm confronted with implementing something like this, so please excuse if this is a dumb question...
My question is as follows:
We have an existing PoE infrastructure, the task I'm facing is the wish to power some specialized devices from the PoE supply, but without utilizing Ethernet.
I was looking at the MAX5922 PSE controller, to extract the power.
Would it work even if there is no Ethernet controller communicating to the PoE switch?
Can maybe someone hint me into the right direction?
Thanks


texts: What will I see in oscilloscope when attempting to analyze Bluetooth or Wi-Fi signals?

texts: I would like to know what will show up if I put bluetooth or wifi carrier signal (2.4GHz family) in a say 50MHz oscilloscope? Am I going to see something like a rectangular block? And the only information I will get is the amplitude?


texts:
I simulated a miller integrator circuit on multisim online. When I did so I made sure that dc offset in the op amp and the source is zero and also bias and offset currents are zero. But in output to a sine signal (ac) input, the output cosine signal has a negative dc offset. What is causing this offset?
Here is the circuit simulated:

And here is the input and output waveform:


texts: Health considerations when disassembling consumer electronics

texts:
I'm doing some simple diy projects with my Arduino board so I buy various electronic parts (pretty much all the basics like resistors, capacitors, etc..) to experiment and see how things work.

Recently I thought that it could be a good idea to hunt for some details in an old electronic devices which are being thrown away (like hi fi systems, dvd players, etc..).
Regardless of what I can or cannot find there, is opening up and disassembling such equipment  considered safe? And I don't only mean electric shock. Maybe there are another health hazards? For example maybe some components may contain hazardous materials which must be handled properly (if at all)?

UPDATE:
I have found this article with a very detailed information related to health issues and considerations while working with electronics and electricity.


texts:
I bought a mcp73812 charging ic from digikey and I found a circuit online. I don't know much about electronics but I feel like there are issues with the circuit:

First of all it says the green led is powered when the battery is fully charged, but I see nothing controlling it, just goes straight to ground. Second of all I was going through the datasheet and found that when pin 1 is high the chip will charge and when low it won't charge.  So in the circuit it's tied straight to 5v, does this mean that it will not stop charging until pin 1 is low?  If so how do I do this because I don't want to stand by the battery until it's done charging? And lastly it looks like a pretty simple circuit for charging a battery.  Will this circuit safely charge the battery? Thank.

I'm using 1000 mah 3.7v lipo battery

IC datasheet


texts:
I'm having trouble trying to simulate my NMOS (FDG6301N) on LTSpice.
I have a permanent error telling me

x1:ed: unknown circuit node: "nc_01". requested in behavioral source

I took the model from On semiconductor website.

You can find the model, symbol and part of my schematic here.

The full schematic can be found here.

If you need more data I can post them here.

I'm simulating this NMOS to see its linear behavior. If you know a good NMOS with a huge linear operating range you also can advise me some parts.

Thank you for your help.


texts: Is there a way to not have to poll the UART of an AVR?

texts: I'm receiving data over UART from another AVR. However I'm doing other stuff so don't want to have constantly keep polling the UART. I know there are interrupts but I can only see one for receive complete, which I assume still requires me to poll to complete the transfer.


texts: A 19 v dc supply is switched to an IC amplifier. A 12 V dc, 100mA pilot lamp,(nonLED)is wired in parallel with the switch to indicate an active circuit. What size resistor is needed to support the pilot lamp ? My research indicates 70 ohm, but I am a newb.


texts: High density wireless -- pros and cons of different wireless systems?

texts: I am working on an arduino-based robot that might be used in a classroom environment, in which case there could be forty of them in a single room. If I want them to be wireless, what problems might arise that I wouldn't find with just a few systems (e.g. interference)? On the single robot level we were thinking of playing around with nrf, bluetooth, and xbee off-the-shelf systems. What would be the pros and cons of these (and other?) systems in this sort of high density environment?


texts: Proper term for waveform correction -- demodulation or undistortion

texts:
I have a measured a periodic signal waveform \$v(t)\$ that can be modeled as:

\$v(t) = f(\phi) A \sin(2\pi ft + \psi)\$

where \$A\$ is a constant amplitude, \$f\$ is signal frequency, \$t\$ is time and \$\psi\$ is a constant phase.

Let say \$f(\phi)\$ is \$ f = k \cos(\phi)\$, where \$k\$ is a constant and \$\phi\$ is a function of time \$t\$.

Now I can correct the signal \$v(t)\$ by removing the dependency to \$
\phi\$ factor i.e. \$v'(t)\$ = \$v(t)/f(\phi)\$.

My question: is the process getting \$v'(t)\$ from \$v(t)\$ considered signal waveform demodulation ? or undistortion ?

The generic term I can think safely would be signal waveform correction but it would be better if there is a precise terminology.


texts: Series and Parallel outputs simultaneously

texts:
So I'm fairly certain that this is impossible, but regardless- I was spending some time designing circuits based on transistor logic when I saw a suggestion that it would be possible to design similar circuits (or at least basic individual gates) using wires, batteries and globes alone. The gates that operate based on negation work by forcing a short circuit using the principle that electricity takes the path of least resistance.

I got a little caught up in expanding these designs, because unlike with transistor logic, the ones and zeroes in these kinds of circuits are in the form of closed or open spst switches- and with no form of manipulating signals, combining gates becomes very hard very quickly.
The part I got stuck on was an application of this system to a XOR gate. Such a gate would be simpler if series and parallel circuits would be easy to implement simultaneously- but after a bit of playing around with designs, I've realized it's not as easy as the rest.

simulate this circuit – Schematic created using CircuitLab
(Sorry for the messy diagram)
The first figure shows a load, which takes the result of A AND B. The second figure shows the load which takes the result of A OR B. My question is, is it possible to make a simple circuit with only 2 spdt switches and 2 loads, with 1 load taking switch A AND B and the other taking A OR B. Resistors aren't allowed, multiple power sources are, and forcing a short circuit is allowed too.
Many thanks.


texts: Connecting powered digital IC to unpowered

texts:
I have Atmega328 MCU and MAX7219 connected to each other. However, they have diode separated power sources. There is a case, when MCU will get power, but MAX7219 will not.

Would it damage MAX7219? While in the application having the knowledge that only MCU will be powered on, I will try to pull down 3 MAX input pins, but there may be some short period during MCU bootup when logical 1 may reach MAX.

Is it safe for MAX to keep it that way, considering that this situation may happen occasionally?


texts: Why does my capacitor explode in this circuit simulator?

texts:
I'm new to electronics and I would like to understand why my simulator shows the capacitor exploding after I turn the switch off.

I am trying to watch the simulated voltage slowly going down from the multimeter after I turn the Slider Switch off

am I missing something obvious here? I can't see it

Update 1:  after HandyHowie comment

Removed the black cable from the switch and it worked.


texts: How to conclude the nature of interference for such scenarios?

texts:
This is abit a hypothetical question. Imagine a signal chain where a AC-DC power supply is powering a transducer and the transducer output is coupled to a data acquisition input by a BNC cable.
Or I can illustrate the chain like:

AC mains->PSU->Transducer---------------->DAQ.

And the DAQ is single ended as well. I tried to simplify this by the drawing below:

Now Vsig represents the transducer; Vcm represents the common-mode voltage.
X and Y are the output terminals of the transducer.
Rs is the output impedance, Rw is the BNC resistance.
A and B are the terminals of the coax cable right at the DAQ side where signal is BNC coupled to the DAQ.
Rin is the input impedance of the data acquisition board.

Now assuming inside the dotted line is a black box to us and we don't know initially what we measure as noise is CM interference originated or not.
And our aim to make a quick test to verify if the noise is originated due to a CM interference.
After that premise my two questions are as follows:

1-) If I short the terminal Y with a wire to the power supply ground, and if in that case the noise disappears does that reveal the existence of Vcm?

2-) If I only have access to A and B terminals, is there any way to reveal the existence of Vcm? Can this be done by a multimeter between the terminal B and DAQ ground(when the BNC to DAQ is decoupled)?


texts:
I am building a realtime based audio processing system that needs to sample 48KHz, 16bit audio, preferably with <0.5ms (the lower, the better) latency (Measured from analog signal -> data sampled and ready to be transferred to host). I will not need to do any DSP processing.

The question I have, is this: How do I go about calculating the latency introduced by an ADC circuit?

I've looked through several datasheets and don't see any information that suggests the total delay of the ADC (makes sense, because it kinda depends on the sampling frequency). I'm not considering the latency of the host processor, that's been figured out.

Here's the approach I was thinking... This could be completely wrong.

Intrinsic delay of the circuit (typically negligible, usually in ns)
Group delay of the decimation filter used for sampling
Total 'size' (in time) of the buffer where samples are stored.

For example:

Circuit Delay: (Negligible)
Decimation Filter Group Delay: (200us)
Buffer size: 30 samples
Sample Frequency: 1/48000 (period of 20us)

Assuming the decimation filter's group delay is 200us, would the total delay be 200us + (30 samples * 20us) = 800us?

Here is the datasheet for an ADC I was looking at:
TI TLV320ADC3101

Please, feel free to share any additional information, advice, or to correct me where I am wrong.


texts:
I am looking into a solid state relay to solve my problem here. I think I have found something that might work, but I am a little concerned as to weather it will work bidirectionally (I need DC current to flow in either direction).

The relay I am looking at is here. It has a maximum current of 9A (I need 6.5), and it also has a reasonable price tag.

Can someone please tell me if it could possibly be the solution that I am searching for, I have scoured the datasheet, but I cant find any mention of polarity on the switched side of things. If it isn't the right relay, can someone please point me in the right direction.


texts: Wire connector with hole only large enough for the conductor and not the insulation jacket

texts:
I am trying to find a connector for a PCB that has an aperture sized to allow only the conductor to pass through and not the insulation jacket.

I found a drawing here, see part B of drawing below that illustrates basically what I am searching for.

Does anyone know the name of this type of connector? The connection of the wire does not have to be solder, but could instead be a spring clamp for example.
Thank you


texts: Why is it safe to touch the chassis of a tube amplifier and something earth grounded simoultaneously?

texts:
I'm hoping this is not too much, originally thought it would be a simple question, but the more I thought about the matter, the more I could see this wouldn't happen. If it's too much I hope some of you will know some good books I can learn from.

I'm trying to understand why you won't get shocked by touching the chassis of a guitar amplifier for example, and a radiator. This discussion is about two-prong systems, but feel free to explain the differences had it been three prong, it would likely assist the understanding. :-)

Let's start with the power transformer. The primary winding is hooked up to positive and neutral mains leads. Is the neutral side grounded to chassis? As far as I understand, the neutral mains lead is also earth grounded. So when you're touching the chassis and something else that is earth grounded, you'd be adding the resistance of your body in parallel to the resistance of the neutral conductor, which of course results in  negligible (but existant!) current passing through you. Is this the case? And is this aspect of the system simply safe because of this arrangement? Ie. would it become deadly if a 10M resistor was placed in the neutral conductor after grounding it to the chassis? If mains neutral was not earth grounded, would that stop the electricity from seeking the path through the human body, since it can't reach the neutral lead through this path anymore? Or in other words, does all current coming out of the positive lead of the mains have to return to the neutral lead at some point, or can it simply disappear into earth ground? And is this true for all power sources, and therefore also the secondary high-voltage winding that will be filtered out to form the B+ supply? Cause then that would mean, that touching the chassis and a radiator would also have ever so slight current from this winding go through the body, into the radiator, down into the ground, up through the neutral lead, and back into the chassis. Is this basically what they refer to as ground loops?

Let's make up another scenario. Something terrible happens, and B+ is shorted to the chassis. Why is this dangerous? Wouldn't the filter caps basically just drain, from one pole to the other, through the low resistance conductor that is the chassis, and the parallel comparatively high resistance, that is our body, would not receive much current?

Where's the flaws in my understanding?

Have a good morning and thanks for reading!


texts: Electrical power in piezoelectric transducer

texts:
This question is from the book Diagnostic Ultrasound Imaging: Inside Out
By Thomas L. Szabo, regarding the power flowing into the piezoelectric ultrasound transducers.

In chapter 5 (transducers) page-124, it is mentioned that the total real electrical power flowing into the transducer for an applied voltage (V) and current (I) is:

$$W_E = II^*R_A/2 = I^2R_A/2$$

where current is: $$I = iωQ = iωC_0V$$.

The total transducer electrical impedance is given as: $$Z_T = Z_A+i(-1/ωC_0) = R_A + j(X_A -1/ωC_0)$$

where, $$Z_A: Radiation \ impedance\\ X_A: Imaginary \ part \ of \ radiaton \ impeadnce \ =  ωL \\ R_A: Real \ part \ of \ radiaton \ impeadnce $$

I am unable to understand why the power is given as: $$W_E = II^*R_A/2 = I^2R_A/2$$

why is I^2*R being divided by 2?


texts: How does this isolation transformer protect user from transients/mains?

texts:
I'm looking at a pretty simple overvoltage/transient protection circuit designed to protect users but I don't understand what the transformer is doing.

The circuit is designed to protect the output from seeing mains or transients generated by mains (2kV+) as the output is technically user accessible.

What I don't understand what the transformer does given its a 1:1 ratio. Surely the mains/transients will get to the output before the fuse blows?

simulate this circuit – Schematic created using CircuitLab

Extra: From my own reading online, it looks like it provides galvanic isolation, but I still don't understand the concept of this keeps a user safe.


texts: Eagle CAD Multiple individual parts in one device

texts:
Good day,

I am trying to place multiple parts in one device. My use case is a foot print for a XBee chip. The device has two identical 10 pin 2mm SMT headers (NPPN101BFLC-RC: digikey link). There is not a "package" that would allow the placement of two individual parts (export smt placements). Is there a way to achieve this design approach? Thank you ahead of time.


texts: protecting batteries from cross discharge

texts:
I am charging multiple batteries in parallel using a solar panel. The batteries are not meant to be used together and their voltages might be different when connected for charging. Another issue is that the panel might not be providing any voltage. So I have been using Schottky diodes to prevent one battery from discharging into another. Can I make this more efficient by using N-channel MOSFETs as shown in the diagram below? Is there a better setup?

If a battery tries to discharge, then the comparator should switch off the MOSFET. The body diode won't conduct either. If there's no input voltage then the result is the same.

If the panel is supplying enough voltage, the body diode will enable charging and then the MOSFET should turn on and the current should then use the conductance channel giving a very low voltage drop.

PS: Some sort of blocking mechanism is necessary. I have a panel for charging my phones and 18650's. It outputs more power than required by any single one of them. So I want to parallel charge them. I wired multiple female USB connectors in parallel. Panel output varies depending on time of day and cloud cover and I have noticed some time blocks where some of them are discharging while others are charging.

previous wrong circuit


texts: How do you initialize an LCD screen to be used with the MSP430

texts:
I have successfully wired everything together and the LCD powers up fine. Its a 16x2 display.
The one problem i see is that when the LCD gets power, one of the rows is visibly darker than the other one. Someone told me that i needed to initialize the LCD screen first in order for me to use it.

I have the datasheet available. In it it even tells me which hex codes i need to send to clear the display/turn on the cursor etc...

I feel dumb for asking because i feel like i should already know this but eactly how do i send these hex codes from the microcontroller? And where are they supposed to go? The datasheet assumes I should already know this. Heres an example of what i did to try and send these codes:

P1OUT = 0x38;
__delay_cycles(10000);
P1OUT = 0x38;
__delay_cycles(10000);
P1OUT = 0x38;
__delay_cycles(10000);
P1OUT = 0x38;
__delay_cycles(10000);
P1OUT = 0x06;
__delay_cycles(10000);
P1OUT = 0x0E;
__delay_cycles(10000);
P1OUT = 0x01;
__delay_cycles(10000);
P1OUT = 0x80;
__delay_cycles(10000);

I dont think I Am i doing this right. Nothing on the screen changes.

*Added Timing Diagrams


texts: What's the minimum electrical requirements to ac-ac conversion

texts:
I bought a 220VAC -> 12VAC (0.3A 3.6VA) cheap power source, and tried to do a simple conversion of the output voltage, with two coils, around a ferrite core, with different length of turns.

simulate this circuit – Schematic created using CircuitLab

I also tried with a resistance load:

simulate this circuit

I got 0V AC. I also tried with some coils, that I've got from some old electronics hardware like:

http://www.techtrans.com.tw/toroid_coils1-2-2.jpg
http://www.techtrans.com.tw/toroid_coils5-2.jpg

but also got 0V AC.

In both cases, I could get some voltage in the voltmeter, when I disconnected, or connected the coils, sometimes bigger than 12V AC if I did connect/disconnect many times.

My guess is that the inductance of those inductors, was not enough to store all the electromagnetic energy for each voltage cycle. All of the inductors were in the micro henry range.

So, my question is: what's the inductance both inductors have to have to hold this together, and if I should add some resistances to the circuit, or any electronic component, or is any other thing wrong.

Also, does the frequency of the output of the charger makes any difference?

I've ordered some cable of insulated copper wire, (0.6mm), and will try again with more inductance.

Edit: I've put "50/60 Hz" for the 12VAC signal but, in the power source stick, it says that frequency value for the MAINS input signal. It doesn't mention the frequency of the output signal.


texts: Rating loudness level with electret microphone

texts:
I would like to build a loudness sensor with an analogue output. It should provide an relatively stable DC voltage which draw conclusions about the loudness level. Therefor I use an electret microphone (CUI cma-4544pf-w).

The following circuit is IMO a step in the right direction, but as you can see in the simulation the output voltage just have a difference of about 0.5V from min to max.

It would be great if you could give me a hint how I can get an output voltage of about 1.5V - 5V. It can also be a smaller difference.

If possible use the BC547B and the 2N3906. The supply voltage is 5V. I generated the microphone output voltage by myself. The real micro will have an output voltage up to 30mV PP.

Thank you in advance for your answers!


texts: Step-up power module XL6009 converter and >4Amp power source!

texts:
I want to power up for an hour or two a 6W LED panel (17,8V at 200mAh) from a 12v 7Ah gel battery. I want to use a DC-DC step up convertor with XL6009 to increase the voltage (made in China, Ebay, Amazon), like this:

LINK EBAY HERE

This module only allows for a max of 4Amp input and my DC battery goes up to 7Ah and 120Amp peak. Can I still use the module given the low discharge rate (low LED panel power consumtion)? How can I make this safe to work and not burn in ashes?

Thankful in advance,
Sam


texts:
Maybe this is a big topic, I will explain my problem.

(Reworded)

If you want to adjust the distance IR communication can reach, you will face this problem: transmission power adjustment.

That means we need to control the current through the IR led - a tsal6100 for my example.
As a software engineer what I can think of is dc-dc switch power solution. I found AL8861 and composed the circuit based on datasheet info.
My question is: can this circuit work?

Why I asked this question?
According to my understanding, for the nature of switch power, there are ripples on the output,usually few handreds mA, this will lead to the transmission distance vary too?

（Appended on 5/1)

Transistor is right,we should use analog dimming instead of pwm dimming.for the programmable resister is a little expensive,I planned to create my own one:

The unit of resist is K , try to get a series of voltages allocated from 0.3 to 2.5V .(the analog dimming range of Vset defined in datasheet of AL8861.)

（Appended 5/1)

If build base on LDO (ZLDO1117),this is right?

In order to get rid of influence of resist from CD4052B,I should use big resister (in Ks), is that ok?


texts: ATSAME70Q21 at 1.8V -- cannot program flash memory

texts:
A recent revision of a board based on the ATSAME70Q21 (a Cortex-M7) is exhibiting problems.  The previous revision of the board had been working for quite a while.
[EDIT] The exact part number as it shows on the chip is:
ATSAME70Q21
    AN
     A

It shows like that, with the lines as I wrote them above.  The manufacturer part number of the part as we specified it in the BOM (which I guess was ordered from Digikey) is: ATSAME70Q21A-AN
[END EDIT]
In the new revision, the only thing that changed in the MCU functionality is the fact that I switched to 1.8V for the VDDIO, instead of the 3.3V that we had before.  The datasheet clearly indicates that this is possible (for the E70).
This is the relevant section of the schematic:

We already detected one mistake:  in the SWD connector, I connected the VTG to 3.3V, when it should have been connected to VDDMCU / 1.8V.  Presumably we fixed / got around that issue (for debugging purposes):  we cut the wire on pin 1 in the flat ribbon cable from the Atmel-ICE programmer, and connected it to a 1.8V test-point that luckily happened to be right next to the SWD connector.
From Atmel Studio 7, I can go to the programming dialog, I can read the device ID (it reads A1020E00) and the voltage (once I cut the trace and connected to the 1.8V test-point, it does read 1.8V).
However, it doesn't seem to work.  If I push the "Start without debugging" button, it looks like everything worked, except that the board does nothing (I'm trying a simple LED flashing test program, which does work when I connect the old board).  If I go to the Device programming window, section "Memories":  Erase Chip responds almost immediately;  if I click on PROGRAM (under the Flash section), it looks like it's programming, but then when verifying, it tells me that it fails.  If I do Debug → Attach to target to display the memory, under IFLASH, I see that all bytes are FF.  Under IRAM, I see whatever random contents and I can manually modify the bytes.
This is the relevant section of the schematic in the previous revision of the board (which has been working without any issues whatsoever):

Any ideas on why it's not working?


texts: How does a bi-directional TVS diode work during breakdown?

texts:
To protect the low voltage DC circuit (5 V) from receiving high AC voltage (230 V), I want to use the TVS diode, which closes the low voltage circuit to ground and blows the fuse. I hope this is a good option for protecting low voltage circuits with integrated circuits.

Since in normal mode the circuit operates on direct current, I can supply a unidirectional TVS diode. But we want to protect the circuit from AC, it uses a bi-directional TVS diode.

The diode will be located between the ground and the power line (5 V).

Question: A unidirectional diode should discharge excess voltage into the ground, but what will a bi-directional diode do? Could this translate the excess voltage into a low voltage circuit instead of ground?

Circuit:

From the left there is an output from the IO controller (5V). On the right is a solid state relay. If the solid-state relay trips and high voltage is supplied to the controller, the TVS diode closes to ground and the fuse blows. R4 should limit the current. High voltage should not reach the controller. The diode power, most likely, will be 600 watts, for it there is a place on the board.


texts: computing the parity of diagnostic requests' frame id

texts:
I am implementing a LIN master, developing all the aspects of the LIN protocol I need, using a UART device (capable to send break).
The question is about the doubt to compute the parity bits in order to send the protected identifier on the bus (as one does for any unconditional frame)
As LIN_Specification_Package_2.2A states:

2.3.1.3 Protected identifier field
A protected identifier field consists of two sub-fields; the frame identifier and the parity.
Bits 0 to 5 are the frame identifier and bits 6 and 7 are the parity.
Frame identifier
Six bits are reserved for the frame identifier, values in the range 0 to 63 can be used.
The frame identifiers are split in three categories:
• Values 0 to 59 (0x3B) are used for signal carrying frames,
• 60 (0x3C) and 61 (0x3D) are used to carry diagnostic and configuration data,
• 62 (0x3E) and 63 (0x3F) are reserved for future protocol enhancements.
Parity
The parity is calculated on the frame identifier bits as shown in equations (1) and (2):
P0 = ID0 ^ ID1 ^ ID2 ^ ID4   (1)
P1 = ~(ID1 ^ ID3 ^ ID4 ^ ID5) (2)

How do I compute the protected id in case of diagnostic requests, as I couldn't find any evidence in the official documentation?
In case of diagnostic master request, the frame id is 0x3C: the protected ID to be sent is still 0x3C (P0 = 0, P1 = 0).
In case of diagnostic slave response, the frame id is 0x3D: the protected ID computed should be 0x7D (P0 = 1, P1 = 0).
So, in short, as a LIN master should I send 0x7D as protected identifier (raw value on the bus line) to let the slave reply?

LIN specification package V2.1 & V2.0  & V2.2A
LIN Protocol and Physical Layer Requirements
LIN Message Frame


texts:
I'm trying to understand what happens at various points in a circuit during drive-coast operation (and also drive-brake, but haven't got there yet). Imagine Q1 and Q3 are on, and Q2 and Q4 are off, such that current flows left to right in the motor. If Q1 and Q3 are now shut off, point B would jump to 10V + Vf (forward voltage of diode) and A would jump down to -Vf. Current would flow from point B through D4 into positive side of the power supply. Current would also flow from ground, through D2, to point A.

Once some of the energy has dissipated point B would be just below 10V + Vf, and so current would no longer flow through D4, and similar situation with D, because the diode is no longer in the forward bias region. What happens after this? Does B just remain at that particular voltage? At this instance let's say the motor is still spinning freely (with only little deceleration due to friction), close to what is was when being driven. Would the back EMF cause A to increase and B to decrease? Basically I'm confused on what the voltages at points A and B are at various time points after Q1 and Q3 have been shut off.

simulate this circuit – Schematic created using CircuitLab


texts: Output type of incremental rotary encoder

texts:
I have been trying to choose incremental rotary encoder for speed control of
three phase induction motor. My problem is that I am not sure what type of
output should I choose. There is following quadrature encoder interface
(please see the enclosure - signals from encoder are connected to terminals 1,2,3 in J9) on my control board. I don't know whether this
interface is intended only for incremental rotary encoder with open collector
output or it is possible to use different output types. Can somebody give me
an advice. Thanks in advance.

I have found an encoder which is sufficient in terms of shaft diameter, supply voltage and output type. There are two parameters that are confusing for me in datasheet. The first one is maximum current requirements 180 mA. I suppose that this current is the maximum current that can be sink by the encoder's output transistor. In my case the transistor must sink \$\frac{5\,V}{4.7\,k\Omega}=1.06\,mA\$. Could this be a problem? The second confusing parameter is output load \$50\,mA\$ (including \$3.3\,k\Omega\$). What does this parameter mean? (\$\frac{5\,V}{3.3\,k\Omega}\neq50\,mA\$). Here is the datasheet of chosen encoder: enter link description here


texts: switch status indicator with parallel port

texts:
I have put together the circuit below. If the switch is closed the LED should turn off and the parallel port should read the change. The status of the port can be read. But every time the circuit is closed the LED lights brighter.
Why does it do this and how do I have to adjust the circuit?


texts:
I'm very new to the world of EE and PCB design.

A friend and I decided to make an LED matrix as an easy stepping stone into these areas. We breadboarded the entire circuit and copied the design over to fritzing and I worked on putting the PCB design together (shown below,) however, I had a few questions about connecting all my grounds.

I read that using a ground plane and vias to connect all the chip GNDs wouldn't hurt, and I was wondering how that is achieved. I'm not sure I entirely understand the ground fill as it leaves spacing around traces and leaves them disconnected. How would I specify which vias to attach to my GND plane?

Additionally, if someone much smarter could let me know if there's something horribly wrong on specifically the PCB design (all components and wiring has been tested and works correctly) it would be greatly appreciated as I'd like to actually order a PCB of this design and would like to do it with minimal iterations! (I ran the DRC and it said there were no issues it saw.)


texts: Will it harm a PWM fan controller to be backfed full fan voltage?

texts:
I want to install a PWM controller to a small 12 volt furnace fan in a camper. I want the fan to run slowly after furnace shutdown, to quietly stir the air for more even heating.

My thought is to install the PWM controller parallel to the furnace's own fan circuitry, so the fan will run full speed while heating and will continue to run slowly after shutdown. This arrangement would backfeed the PWM controller with full fan voltage while the furnace is heating.

Is this a problem? I could isolate the PWM controller with a diode if necessary. Will this work? Is it dangerous? Can these systems live together side by side? Any help would be great appreciated.


texts:
I am trying to drive a 350 watt, 3 phase, BLDC motor (DGW07-20j model) with stm32 micro controller. But I have problem with hall sensors because their outputs are not similar to the hall sensors which I have seen on the internet.

I connected the sensor supply to +5v dc (according to the sensor pcb guide). Then I connected two of hall sensor outputs (2of3) to the oscilloscope channels which is shown in the following picture.

Unfortunately, I couldn't find the model number of hall sensor or related data-sheet. But I connected the supply and outputs based on printed pinout guide on pcb. You can see these connections in this picture...
The motor was working while I captured the hall sensor outputs but clearly not not in a good way because the switching phase timing should be adjusted using hall sensor outputs.

many thanks