texts:
I want to build a little LED indicator for my bathroom door. The basic idea is that when a person sits or stands next to the toilet, a little transmitter signals it wirelessly to the LED diode which is mounted on the front side of the door. The LED turns on so the next person who wants to come in knows that the toiled is occupied. When the guest comes out of the bathroom, the transmitter yet again signals that the LED should turn off.
I came up with a plan to connect the LED to a little battery. The circuit has to work as a On/Off switch. Next to the toiled will be a circuit with a photoresistor (?) which can help in detecting someone next to the toilet. The change in its current/voltage triggers the little transmitter which sends a simple pulse (or another simple signal), which the LED circuit will be able to receive, and then changes its state.

But I have a few questions. Is using the photoresistor a good plan? Maybe there is a better solution of which I have no idea? What kind of signal should the transmitter produce? What would be best to use as a switch circuit on the LED side?

I would be happy to read some suggestions that may help me with this project.


texts:
I'm not sure how to convert or correctly compare gasoline/alcohol to batteries in terms of weight and volume.  For example in the following link Specific Energy and Energy Density of Fuels I can find the following information:

Specific Energy

$$E_{8} = \frac{E}{m}$$

Energy Density

$$E_{d} = \frac{E}{V} $$

                   Specific  Energy
Fuel      Density   Energy   Density
           kg/m3    MJ/kg     MJ/m3
Gasoline    716     -47.3    -33,867
Ethanol     784     -29.7    -23,278

And the information I've found on Li-ion batery from What's the Best Battery:

Li-ion - Gravimetric Energy Density (\$\frac{Wh}{kg}\$): 110-160

I have no idea how to compare/convert \$\frac{wh}{kg}\$ from/to \$\frac{kg}{m3}\$ nor \$\frac{MJ}{kg}\$.

(Most likely it's more complicated then even this, as a combustion engine isn't that efficient in changing potential energy into kinetic energy.  I'm not concerned with that at the moment, just trying to figure from a storage point of view how to compare these energy sources).


texts:
I am currently using boost converter so I made all the calculation to make it work.
My question is not about calculation it is about how physically is a boost converter working.

Here it is : the output voltage is depending on the duty cycle D.
If we ignore the efficiency D=1-Vin/Vout
then Vout = Vin/1-D. which means that when the duty cycle increase, the output votage increase.

The functionment of the converter is as follow:

when the inside switch S is on there is a current charging the inductor
when the inside switch S is off the inductor L oppose the variation of current and then a voltage in series with Vin is created so Vout > Vin

The only thing I don't understand is : why is the voltage increase with the duty cycle?

If the duty cycle increase ILmax will be higher but for an inductor U = L*di/dt. Then the voltage across the inductor depends on the decreasing of the current and not on ILmax.
Since the load (C and R) is the same the decreasing of current should be the same and then VL should be the same no?

Then, physically why is VL depending on duty cycle?


texts:
I have application which has 3 UARTS (GSM / Debug / GPS) and will be developed under FreeRTOS (not the matter here but STM32F1 will be used).

What would be the pattern to use with this setup regarding:

GSM: Will be used to receive message commands and send feedback from sensors.
GPS: Will be processed to get new location ASAP.
Debug: Will output information on the status of the system.

My thoughts:

4 Tasks should be implemented;

GPS Receive
GSM communication
Debug output
Application task

GPS will get location and put it into global buffer then signal via semaphore that location is available. If semaphore has not been taken (either put that new location into circular buffer or discard it).

GSM will receive data into queueRX and queueTX and send when possible to the server.

Debug output will also receive in queueRX and queueTX and send to dedicated UART.

Application task will coordinate all of the main algorithm (take location, acquire sensor info and send output to GSM and debug).

Now comes the question, because there is 3 UARTS in the same time (two at 115200 and GPS at 9600) what would be the best / pattern approach of handling that Tx/Rx.

I have made some tests for GPS and tried to put every RX char into queue but that generates too much Interrupts, also using DMA has issue because you can easily miss ending \r\n and then you are in wait.

Tnx in advance.


texts: Inversely proportional current controlled voltage source

texts:
I need a circuit that senses a current and outputs a voltage, but in inverse proportion.

In my case:
When the current is around 0A, the voltage source should be around 18V (my Vcc).
And when the current is around 8mA, the voltage source should be 5V.

Can this be done ?
Opamps ?
Transistors ?

It's just for a simulation. No worry about part count. But generic parts are preferred.

Is it even possible ?

All I can do is thanks. No reputation to upvote.

The following is a directly proportional current controlled voltage source. A small illustration of the idea. All I need is to reverse the proportion.

Edit 1:
To make this thread short, I removed the part where I explain the impedance requirements. This can still be seen in the edit history.

The user Transistor understood correctly my necessities.

Edit 2:

I "ommitted" the following information to make the opening thread short, but that choice is creating gaps:

This whole circuit is a brief and partial model of the LM7805.

This IC has a quiescent current (as the datasheet calls) of 8mA leaving the control pin towards the GND. In this scenario, the regulator does its job and outputs clean 5V.

Now, if I interrupt this control current, the output approaches the Vcc of the supply.

I intend to control this current with a transistor, and this control should take into account the output voltage (so not to break the closed loop).

A voltage divider quite does the job, but the output
voltage is much below the input Vcc.
I know that a transistor will increase the minimum voltage much above 5V, but that's not a problem.

I don't have available LM317, by the way.

To "generate" this 8mA in the simulator I'll not use a current source, but a Vcc and a resistor.


texts: Signal Period of each stage in a ring oscillator

texts:
Considering the following ring oscillator:

I know that the Frequency at \$Q\$ is given by
$$f=\frac{1}{2*t_{PD}*3}$$
Yet I want to calculate the period of each signal at \$V_{1}\$,\$V_{2}\$, and \$V_{3}\$. Is there a formula to do so or am I just missing something?


texts: Why encapsuled ultrasonic sensors have bigger dead zone than not encapsuled sensor?

texts:
Searching on the Internet, I found that sensor like HC-SR04 can measure from 2 to 300 cm.
Other ultrasonic sensors like this starts from 30 cm. Why this difference? ì


texts:
This is about the seemingly controversial shield to ground connection. The system is basically a body-worn intel-based computer, powered by a battery. Two USB 3.0 (or 3.1 Gen1) cables come out to a PCB that contains two USB 3.0 hub chips (TUSB8020B). Two external cameras plug in to this usb hub PCB (one camera for each hub). So the usb hub PCB has 4 usb connectors (2 upstream and 2 downstream).

The question is, what to do with each of the usb connector shields? The main directive is USB connection robustness.

I have seen many recommendations. For example:

Recommendation 1

TI's TUSB8020B hub reference design TIDA-00287 ties all shells directly to ground.

Intel's EMI Design Guidelines for USB components also recommends to tie to ground (although this was written for USB 2.0).

Recommendation 2

TI's TUSB8020B EVM (and datasheet) connect shields together, and to ground using RC filter:

Microchip's EVB-USB5534 also ties shields together and uses an RC filter, but a 3 orders of magnitude smaller R:

Recommendation 3

Cypess SuperSpeed Explorer Kit ties each shield independently to ground using either LC or L filter (chokes really):

The cameras themselves (off the shelf) use Cypress recommendation (LC to ground). The embedded computer seems to tie to ground from visual inspection and checking continuity to ground, but I'm not 100% sure (schematics are not available).

Now we face the shield dilemma with the hub PCB (which by the way currently does not have a metallic enclosure, it is a 3d printed plastic enclosure).

What is your say?


texts: Understanding pci address in lspci/dmesg

texts:
When looking for the pci devices on the host machine, I have seen something like this in lspci:

....
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller (rev 06)
....
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 04)
....
04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)

and something like this in dmesg:

....
[    0.617223] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window]
[    0.624701] pci_bus 0000:00: root bus resource [mem 0xbfa00000-0xfeafffff window]
[    0.632182] pci_bus 0000:00: root bus resource [bus 00-3e]
[    0.637685] pci 0000:00:00.0: [8086:0c00] type 00 class 0x060000
[    0.637887] pci 0000:00:01.0: [8086:0c01] type 01 class 0x060400
[    0.637938] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    0.638163] pci 0000:00:01.0: System wakeup disabled by ACPI
[    0.643883] pci 0000:00:01.1: [8086:0c05] type 01 class 0x060400
[    0.643934] pci 0000:00:01.1: PME# supported from D0 D3hot D3cold
....

In lspci, the addresses seem to have 3 parts and in dmesg they seem to have 4 parts. What all can I understand by looking at it?


texts: why the supply voltage of dc motor decreases when the motor load increases?

texts:
When I plot the supply voltage of a one-cell LiPo battery during the working period, I found that the supply voltage would drop dramatically when the motor is commanded to speed up.

I think this is somehow against the model of DC motor. If the discharging rate of battery increases in order to generate more torque in the DC motor side, the supply voltage should increase instead of decrease. Because the motor can be regarded as a inducter.

Following is the plot,

Y-axis is the supply voltage of the battery, X-axis is the time. There are five dropping peaks when the motor is commanded to speed up.

Thanks.


texts: How to extract energy from an alternating electric field?

texts:
Given an alternating electric field E inside e.g. a big parallel plates capacitor, how can you make use of the field's energy to power an electronic device?

So far I thought of putting two smaller unconnected parallel plates inside the field.

This however did not seem to work in a small experimental setup with ~230V / 50Hz yielding (theoretical) capacitor field strengths of roughly 11.5 kV/m and resulting in 0 V measurements across the smaller parallel plates.

Edit: Actual dimensions and values added

\$A_1 = 0.25m * 0.25m = 0.0625 m^2\$

\$A_2 = 0.1m * 0.1m = 0.01 m^2\$

\$d_1 = 0.02m\$

\$d_2 = 0.0016m\$

Peak electric field strength: \$\hat{E} = \frac{230V}{0,02m} = 11.5 \frac{kV}{m}\$

Big plate capacitance: \$C_1 = \frac{\varepsilon_{0}*A_1}{d_1} \approx 27 pF\$

\$X_{C_1} = \frac{1}{2\pi fC_{1}} \approx 115 M\Omega \$

Big to small plate capacitance (if small plates are centered): \$C_{1,2} = \frac{\varepsilon_{0}*A_2}{\frac{d_1 - d_2}{2}} \approx 9.6pF\$

\$X_{C_{1,2}} = \frac{1}{2\pi fC_{1,2}} \approx 330M\Omega \$

I have the feeling that I am missing something very basic here which results in those 0.00 V measurements.

Edit

Following these calculations, even at higher frequencies in the MHz range, the extracted energy would be waaay to small to power even small microcontrollers.

What else can I do to extract energy inside a parallel plates capacitor with an alternating electric field?


texts: TRIAC Firing angle vs power delivered to load, how calculate?

texts:
I'm building a phase control system for simple power control to a given load (heater for example.)
I need an equation to find the relationship between angle of TRIAC firing vs power delivered to load (in percent.)
Let's say that my AC mains frequency is 60Hz. If I need to deliver 50% of power to the load I need to fire the TRIAC every half half wave of the AC (every 4.16ms after the zero-crossing.) Since, as you all know, the power line is not linear but a sine function, I cannot get a simple rule of three to find the power x time relationship.
What I need is an equation that solves for a given power (eg. 35%) I get the time after zero-crossing that the TRIAC needs to be fired.
Any ideas?


texts: Identify two National semiconductor transistors 506 220-0075, 452 220-0076

texts:
I am trouble shooting a power window amplifier circuit board for a Nissan Quest.

The circuit board is relatively small, it has a few active component, most of which can be identified by simply googling the markings.

However, there are these two transistors with National Semiconductor logos, but for the life of me I can't find any useful information about them:

and


texts: Connecting LCD Display with I2C USB Connector

texts:
I have a qapass 1602a LCD display connected to an I2C 1602 LCD Controller which is connected to a UMFT201XB I2C USB Connector which is connected to a linux box.

My Question is: How and where do I get started to sending data to the display?

I installed the D2XX driver from ftdichip on the linux box and the output of the example EEPROM ./read command looks like this:

All the tutorials and infos I can find are for the Arduino, but I can't find anything on how to use the USB connector.

Here a picture of the setup:


texts: Constant resistance mode in electronic load

texts:
I have this DC electronic load.
I am setting this electronic load to a constant resistance mode option  - say 100 ohms - and turning the output ON.
When I measure the resistance across the electronic load terminals using a multimeter, I am not able to read the value as 100 ohms. I am getting high resistance values and it is showing as open circuit.
However, if I connect a power supply to the electronic load and ask it to consume a current equivalent of 100 ohms, the electronic load is consuming the required current from the power supply as if it was connected to a 100 ohm resistance across it.

Power supply was set to 10V.
DC constant resistance was set to 100 ohms.
Current consumption to the power supply was 100mA.

So, actually, the electronic load seems to be setting a constant resistance of 100 ohms when I set it as such, but I am not able to measure using the multimeter. Why is that?


texts: It is quite easy to flash a light in say, 0.5 seconds on, 0.5 seconds off. But what if I wanted to flash it say 0.5 on, 0.5 off, 1.0 on, 0.5 off? Are there any IC's that would allow that?


texts:
I was reading the datasheet of ADS1115.  It has an input capacitor stage which it continuously charges and discharges to measure the voltage between AINp and AINn.

It is written in the datasheet that the capacitor used in the input stage are small and to external circuitry, the average loading is resistive. How it can be resistive?
Once the capacitor is charged and S1 is closed and S2 is opened, it discharges to 0.7V. Why does the  capacitor discharge to 0.7V?


texts: How to Hardware Write Protect Flash SPI, Setting WP# pin signal low stage [Asus P5Q Pro + MX25L8005 SPI]

texts:
As a pen testing & security experiment and feature I want to enable write protect on my SPI Flash MX25L8005 module on my motherboard to protect the SMM modules, AML, ACPI and other areas of the BIOS that could potentially be overwritten or modified by malware.

Page 11 of the Datasheet

  "The Status Register Write Disable (SRWD) bit, non-volatile bit, is
  operated together with Write Protection (WP#) pin for providing
  hardware protection mode. The hardware protection mode requires SRWD
  sets to 1 and WP# pin signal is low stage. In the hardware protection
  mode, the Write Status Register (WRSR) instruction is no longer
  accepted for execution and the SRWD bit and Block Protect bits (BP2,
  BP1, BP0) are read only."

  "A lot of SPI flash chips have a pin that, when connected to ground,
  disables writing. You'd have to read the datasheet for the flash chip
  you have. Locate the chip and read the text on it (which tells you the
  model), then look up its datasheet."

  You probably wouldn't want to set SRWD. You'd only want to use WP#.

  Do note that even with a read-only BIOS, PCI option ROMs can still be
  written.  I imagine the BIOS configuration, including the disabling of
  option ROMs, is not protected by WP#, in which case a malicious
  privileged process could modify an option ROM, change BIOS
  configuration, and then the BIOS would call the malicious ROM at next
  boot. Note that TPM-based SRTM defeats that attack.

I was told that I might need to use a pull-down resistor if one isn't built in internally, otherwise I can cause a short, and that relevant data should be in the datasheet. I am asking anyone in the know, with total confidence, to tell me what I need to do in order to accomplish write protections without damaging my hardware.

This will ensure protection against all forms of zero day malware that could modify, embed and remain persistent in flash devices, evading even the most sophisticated security protections. The simplicity and effectiveness of this is tried and tested.


texts: High voltage capacitor, in a low voltage system?

texts:
Quick question: is using a capacitor rated for high voltage (let's say 35V) in a system that let's say supplies 5V (like for LEDs or what have you) dangerous?

Since it can store up to 35V, will it like somehow store a bunch then release it at once damaging the system, or it is OK to use a higher rated capacitor than the voltage being supplied?


texts: DIY Solar lamp circuits with 5252F explained?

texts:
I have a bunch of solar panels, rechargeable batteries, 5252F circuits, inductors and LEDs and while reading https://artists.scitoys.com/three_volts that seems to be enough to make my own solar-powered night lamps. But as a software developer who is a complete Noob at electronics, I want to understand exactly what is going on in that circuit. And I like to know if there are a few more variants to this circuit.
The site is practical but I have various 5V solar panels and not a 2.5V panel. Would they be okay too? And while I understand what inductors do and why the 5252F is needed, I especially need some more understanding on how I can calculate how fast the battery charges and how many microhenries I would need for the various LEDs that I have. (All with different forward voltages.)
So can anyone expand the given explanation here, preferably with some useful formula's?


texts: Differential Amplifier, what is the purpose of extra emitter resistors?

texts:
I am curious about this differential amplifier circuit:

What is the purpose of the two R'E resistors? I know that the big RE acts as to help set up the current source for the DC Q-points, but I have also seen this circuit without the resistors R'E.

Can someone please explain why you would want to add these two resistors?


texts:
My understand of PCIe bit lock which is for Tx and Rx sync the clock and lock PLL clock at Rx side to latch data correctly. But how does it do it? Any protocol flow needed for bit lock to work?
Thanks!


texts: how to understand SMBus SDA line captured waveform

texts: I am using MCU (L476RG) with PMM240 (power management board) and RRC 2054-2(battery), I am figuring out why SMBus is always busy after sending command to slave, so I captured the waveform when I send command, but I am totally confused, the SMBus address is 0x16(already shifted 1 bit), I found whatever byte I sent(such as 0x01, 0x1c...), I always captured the same waveform as follows(blue line is SDA and yellow line is SCL), and SMBus stays in busy state, how to  understand it? many thanks


texts: Ground loop problem with Power over Ethernet

texts:
I am trying to build a weather station, powered using Power over Ethernet.
Originally I planned to use a Nanode as the microcontroller, but since the Raspberry Pi is so cheap, I decided it was much easier to use that instead.

I bought a TP-Link power over Ethernet splitter, made up some custom cables and after checking the voltages, connected it up to the Pi. All worked fine, until I tried plugging in the HDMI cable to my TV (for debugging). At which point the board kept turning off and then the switch cut out.

At that point I discovered that there was a 40 volt difference between -ve on the PoE output and the ground on the HDMI. I tried a couple of other PoE boards and found there was the same issue on them too.

Is there a solution? Although I don't really care about plugging it into my TV, I am a bit worried about plugging sensors in, that might be grounded and end up putting big voltages across them.

There is a photo here (click for full-size):


texts:
I'm working on a new design based on a Xilinx FPGA.

I'd like to use some eMMC devices but the FPGA controller supports JEDEC up to 4.51.

Nowadays, some eMMC devices are JEDEC 5.0 or 5.1 compliant and they add some great fonctionalities. But I'd like to know a eMMC 5.1 is backward compatible with a controller that supports 4.51 then I could use such a device with my FPGA.


texts:
I have ps4 stencils for ps4 APU. On the stencil it says 0.55.
Can I asume that the solder ball size is 0.55 or can I go with 0.5?

How can I determine the correct solder ball size for the bga chip? (Any chip)

Thanks! :)


texts: Using analog circuitry, is there a way to offset the phase angle of a single phase AC voltage while maintaining the same RMS voltage?


texts:
Is it possible to use 3-phase SSR for driving a single phase heater? The other two channels would be simply not connected. Is this going yo work as a single phase SSR?
The particular model of the SSR is LIRRD LRSSR-3DA.


texts: Does a ground strap protect my car from a lightning strike?

texts: I was wondering if the ground strap can also protect the electrical/electronic parts of a car when a lightning strikes it.


texts:
I think I have pretty newbie question but I couldn't find specific answer for that.

I have 7.4 V li-po pack. What I want to do is connect in parallel two dc loads. One will be motor drive which will be supplied with regulated voltage 6 V second will be Arduino supplied with 7.4 V.

Is it correct and safe to do such circuit with li-po pack?

Below I'm uploading how circuit would look like


texts: How to attach a jumper wire to rotary encoder pins?

texts:
I need to attach a rotary encoder to an arduino. The rotary encoder has 3 metal prongs that I need to attach wires to.

This picture explains exactly what I need:

What type of wire attachment is that? What should I search for to buy?


texts: Linking bit/rate to frequency in a USB protocol

texts:
I develop a USB protocol which transfer about 5 Mbits/s from the device to my PC. The mcu is  the tm4c123  from TI. The MCU clock is created by a 16 MHZ which is feed into a PPL resulting in a 80 MHZ system frequency.

I want to nail down what is the current bottleneck in my USB protocol because, I am far from the 12 Mbits/s Theoretical (9.5 Mbits/s practical) max rate for USB 2 full-speed. Is it the hardware or the software in a nutshell.

So my question, what is the maximal bitrate you can get on a USB protocol with a 80 Mhz system. I don't need a precise answer, a thumbs rule would certainly do the job.

Here you can find the USB apis from TI, I implement a bulk device.

Here you can find the LibUSBdotNET api used on window side.


texts: resistance range to voltage range with single op-amp

texts:
I have a resistive sensor, \$R_s\$ and I'd like to map the range \$700 \Omega - 1700 \Omega\$ to 0V-3.3V, ideally linearly.

Here's a circuit that does that (saturates slightly at low \$R_s\$ range):

simulate this circuit – Schematic created using CircuitLab

By applying ideal op-amp assumptions, the current through \$R_m\$ (and therefore \$R_s\$) is \$ \frac{V_{ref_1}}{R_m} \$

\$V_{o_1} = \frac{V_{ref_1}}{R_m} R_s + V_{ref_1} = V_{ref_1} (\frac{R_s}{R_m} + 1)\$

So the range at \$V_{o_1}\$ is 2.23V - 3.05V.

The second op-amp just scales this voltage range to approximately 0V-3.3V.

Other than using two op-amps, what are the downsides of this circuit?

Acoording to https://electronics.stackexchange.com/a/98395/2656, this task is possible with only one op-amp. Here is that circuit

simulate this circuit
(The component values correspond to a different range of voltages and resistances. Also assume that \$R_1=R_2=R_p\$. Call the sensor \$R_s\$, and instead of +5V, call it \$V_{dd}\$)

My question is: how do I analyze that circuit? I applied KCL to the two inputs of the op-amp, solved for the op-amp inputs' voltages, and set those two equal to each other, and through much messy algebra, arrived at

$$V_o = V_{dd} \frac{(R_4 R_6 - R_5 R_6 + R_4 R_5)R_s-R_4 R_5 R_6}{(R_4 R_6 - R_5 R_6 + R_p R_5)R_s-R_4 R_p R_6}$$

(V_o is not in general a linear function of R_s, however resistor values can be chosen so it is nearly linear. Perhaps there is better way to represent the transfer function so that this stands out.)

I'd like another way to reason through the circuit, perhaps relying on the symmetry of the two resistor networks at the op-amp inputs. Hopefully this way to reason about the circuit also elucidates how to choose the resistor values to map a certain resistance range to a voltage range.


texts: Two power supplies with different current in series

texts:
Does the schematic in the picture work with these powersupplies from China?
Both are rated with 5V but one with 20 amperes and the other with 2 amperes.

https://www.aliexpress.com/item/33042313383.html?spm=a2g0s.9042311.0.0.1efb4c4d8Buf0O

If it will not work what would make it work or what else would you recommend?

I need just a little current and at least +-2.3V for an op-amp which is R2 in the picture. For R1 I need high current with +5V.


texts: Flashing "GATE" on the Bel Merit FG-150 function generator

texts:
What does the flashing in the bottom left corner of the display "GATE" means on this generator? I could not find a manual high and low.

I found a discussion on GATE function here but it seems to imply that there would be a Gate button, but there is none on FG-150.


texts: How to remove the DC offset in a cascaded op-amp amplifier circuit?

texts:
I have 4 op-amps in cascade with a gain of 10 each to give a total gain of 10000. I noticed the circuit produces a DC offset which then gets amplified causing the amplified signal to clip asymmetrically.

I know op-amps have an offset pin but I have never used it before and I am looking for the simplest solution. I thought I might simply add a capacitor after each op-amp but I don't know how large it should be or if it would help. The signal I am amplifying is 40 kHz.

What is my best option?


texts:
I was reading theory that:

  A relay is an electrically operated switch. Many relays use an electromagnet to mechanically operate a switch, but other operating principles are also used, such as solid-state relays src

So in case they are electro-mechanically operated and the state of switch is to be monitered, for counting or some better reason, how is debounce achieved in EM relay?


texts: How is the H11AA1 ic working with AC mains voltage?

texts:
I am making an arduino controlled fan speed controller that would digitally control the speed of my ceiling fan working on 230 VAC and 50 Hz. I am using the following circuit which is designed for 110VAC and 60Hz

I took this circuit from this website:- http://playground.arduino.cc/Main/ACPhaseControl

Working:-
When the AC voltage goes from zero to peak, the optocoupler is active and activates the output side. The arduino pin connected to the output of the optocoupler senses a HIGH voltage. When the pin reads a low it means we are approaching at a zero crossing of the AC mains voltage and depending upon the timing, the arduino will activate the TRIAC driver that is optocoupler MOC3052 that will further activate the TRIAC providing the power to the ceiling fan.

My doubt is that, in the datasheet of H11AA1 optocoupler ic the absolute max forward voltage of the optocoupler is not mentioned. How is this ic working directly with AC. I understand that the current is low since there are two 15k Ohms resistors, but the voltage is still around 55VAC at the pins 1 and 2 of H11AA1. How is this IC not destroyed?? Also will the circuit work for 230VAC 50Hz??

Datasheet of H11AA1: - http://www.vishay.com/doc?83608


texts: Grounding unused leg of bussed resistor?

texts:
I've got a bussed resistor:

The package I'm using has 13 inputs and 1 output, tied to ground. I'm only using 11 of the inputs. Do I need to worry about the floating end of the two unused inputs? Should I tie them to ground?


texts: How to add decoupling capacitors to already mounted ICs

texts:
I have this board with three DIP ICs already mounted in their sockets.

The decoupling schematic is this:

So we have a sum of 8 ceramic caps and 2 electrolytic ones. So how do i solder them? Should i try soldering the tip of the capacitors tot he IC pin?


texts:
So I know what they both do. Yet I don't know when you'd choose to use one over the other. There was a similar question on here, but the answer didn't really make sense to me, an electronics newb.

I know caps are often used for smoothing, but then what are inductors mainly used for?


texts: Estimating the frequency at which your microcontroller is running

texts:
I have recently started programming an ATtiny85 microcontroller, which as per the datasheet runs at 10Mhz given 3v3 supply. So, to experiment, I have created a small program, as shown below.

#include <avr/io.h>

int main(void) {
    DDRB |= 8;
    while(1) {
        for(int i = 0; i < 1000; i++)
            for(int j = 0; j < 1000; j++)
                asm volatile("nop");
        PORTB ^= 8;
    }
}

As per documentation, each nop will take exactly one clock cycle to complete. Now, I have compiled this program using Atmel-Studio-7, and programmed the tiny using a usbasp clone and avrdude. As a side-note, the power supply jumper on usbasp is set to 3v3.

The programming worked fine, and I started looking at the blinking LED at pin-2 and it looked quite slow to me. When I measured the delay between LED toggles using a stop-watch, I could measure it to be exactly 5 seconds. As per my code, each time, 1000000 nops are executed before each toggle. By a simple calculation, it looks like my tiny could execute only 200000 nops per second, meaning it is running at 200Khz, which does not make any sense.

What could be the contributing factors to this error? How to estimate any microcontroller's clock speed by its output?


texts: Load Switch for controlling battery circuit power via MCU GPIO pin

texts:
I’m making a battery powered air quality sensor node using Adafruits Feather M0 LoRa MCU. I have a MH-Z19 carbon dioxide sensor that requires 5V (datasheet says 3.6 ~ 5.5 V DC, and average current draw < 18 mA). The M0 only provides 3.3V. There is a BAT pin which gives ~3.7V straight from the Li-Po battery, but it is apparently not enough for the MH-Z19. I also tried using a Pololu 5V step-up regulator (U1V10F5) after both the BAT and 3V pins on the MCU. It did not work at all with the 3V pin. It worked with the BAT pin, but only when the battery was pretty full. When the voltage dropped it first started making noises, and then stopped working.

So my current solution is using 3 AA batteries for just the MH-Z19. Now I want to shut the 3 AA battery and sensor circuit off when the MCU is in “sleep mode”. Shut it off like with a mechanical switch, except I want to control the switch using the MCU. Can I use load switches for this? Can they effectively stop the circuit so that the batteries power is not wasted. I guess I need something that defaults to not being shortened since the controller is going to sleep. Is this possible with a Load Switch?

I have been looking at these following Load Switches.

AP22802 from Diodes Inc.

TPD3S044DBVR from Texas Instruments

Would it be better to use something like a relay or a MOSFET?


texts: How do old school, electromechanical elevators work?

texts:
Today Scouting New York ran some photographs of the mechanicals of an old, working elevator that dates back to the 1920s.

I was especially intrigued by this amazing picture of the control system:

Can anybody explain what the heck is going on there?


texts: PWM to analog 1-10V converter: help to understand how it works

texts:
I am trying to understand how the circuit shown below works. It converts a PWM signal to a 1-10V analog signal. The circuit is from this link.

I want to understand how it works because I want to design a circuit that controls a LED driver (such as this one for example) using an analog signal 1-10v. I have several questions:

The operational amplifier is configured as a voltage follower. In the schematic, its supply voltage is not specified. To guarantee that the operational amplifier can provide a 10 V output, should it have a supply voltage of more than 10V?
The voltage at R8 is at least 9.6 V (when the optocoupler drives, it is in saturation, Ic=10mA). What is the correct way to dimension the low pass filter so that a duty cycle of 10% corresponds to 1V, 20% to 2V, etc?
I am also looking at the layout and would not it be necessary to connect the track that I marked in the image?

Thanks.


texts: I have a CPU board (NanoPI M1) which specifies it has a DVP 24-pin camera port. However many of the usual camera modules (like OV5647) says they have both DVP and MIPI support. How would it generally work to connect one of them to a DVP port?


texts: Can I use a 12v battery to power my 89W TV

texts: I want to use a DC 12V battery to power my 89 watts LED TV. Is it possible and how long will it last?


texts: Bypassing switch on electric drill. Which way to wire field coils

texts:
New to the forum. Electrical knowledge and skill is pretty basic.  My question or problem:
I want to bypass the switch on a cheap (HFT) drill to use as a stationary bench tool. I know that the power will feed the two field coils in series with the brushes. Unfortunately I have the four field coils wires disconnected without knowing where they were before. (all wires are black) Easy to identify the separate coils but dont know if there is polarity or synchronization of the two.
Does it matter which way the field coils are wired? I suspect that it does but not sure how to go about it. I would do trial and error but might short or burn something up.
Thanks for any help.


texts: FPGA encoder counter running away randomly

texts:
I am programming an Altera FPGA using Quartus II v9.0 to count encoder pulses and output that count to an external LabVIEW program (see diagram below). I was able to debug one issue with my code thanks to the StackExchange community, but now I am getting intermittent run-away in my encoder count.

As I move my encoder, my LabVIEW code is displaying the current count correctly. When I stop moving the encoder, the count stops about half the time, and the other half the count just runs away. I suspect that the encoder is getting stuck in an in-between state and one of my phases is fluttering. Is there a trick that I can use to filter this out, or a better method of counting encoder pulses that I can program into my Altera FPGA?

simulate this circuit – Schematic created using CircuitLab

The 4-input XOR block executes as:

(IN1 xor IN2) xor (IN3 xor IN4)

The Count enable and Count direction signals are going in to a 32-bit built-in counter function (LPM_COUNTER) on my Altera FPGA programmed using Quartus II v9.0. The output of this counter is stored in a buffer (LPM_BUSTRI) and read using a LabVIEW program whenever the LabVIEW code needs it. I have a similar LabVIEW code reading other buffers from the FPGA that is working fine, so I am fairly certain that the problem lies in my FPGA somewhere.

I have tried adding a trigger delay to the A and B signals that only registers a change in the signal if that signal has remained high or low for a certain number of clock cycles (I tried 2 and 4 so far). This seemed to make the problem worse. I also tried adding a fourth set of D-Q flip-flops, which did not have any obvious effect.

Thank you for your help!


texts: Battery Amp-Hours and C-rating (need clarification on formulas)

texts:
These formulas here are confusing me. I am not sure, exactly what some of the variables mean.

What is the "Max. Amps" exactly, in this formula?
What is the "discharge.C.value"?
What is the "Discharge.Current" exactly?
There is something i don’t understand about the discharge current formula. Why, in the formula when increase the discharge current, the discharge c value increases? Shouldn’t if i have a battery with 1Ah and i am pulling only 0.5A, the Discharge C should be 2hrs Instead of 0.5hrs? Since i am pulling less, not more?


texts:
I would like to find a chip that can do public key encryption/decryption, maybe RSA or DSA. Particularly the key needs to be securely stored on chip. Can anyone suggest some choices?

(Update) Since I am thinking of using it only for authentication and key exchange purpose, speed may not be an issue. Any time less than 1 second per encryption/decryption is acceptable. But security is of a high concern. I would want the key won't be read out  no matter how by a normal hacker (who may have access to the device). I am seeing the SHA chip ATSHA204 quite attracting in terms of security features. Is there a similar RSA/DSA counterpart?


texts:
I'm a beginner with electronics.

In the pictures below, you can see a hair straightener.
The orange and blue wires are for the 230V, AC .

What I can't understand is: Why is there a resistor (number 3 in the picture) while the PTC is already under the ceramic plates to heat the plates?

I also tried to put the circuit on paper to make it more clear.


texts: I have two Multimeteres that I'm using to measure resistance of a 10 Ohm resistor. Now, when i measure with the first one it's showing 10.2 Ohms while the other is constantly changing values from 9.9 to 10.8 Ohms. Which one is more reliable?


texts: Basic misunderstanding about dropping down voltage going in a TTL IC using resistors

texts:
I'm having serious problems figuring this out. Below is a part of an 8-bit computer schematic. The 62256-70 is a static ram chip. I understand these 8K2 resistors are there to provide a default value to the data bus.

Reading the specs, I see that LOW is considered < 0.8V and HIGH is considered > 2.2V.

What I'm trying to understand is: connecting a single resistor to a power rail will change its current. If I checked the voltage before and after the resistor, it would stay the same.

How then, is this dropping the voltage? Isn't the voltage going into D0 the same as the voltage at the other end of the resistor? Which is also equal to Vcc?

Thank you :)


texts:
I am designing a high voltage board, 10,000 VDC. I wish to use a suitably rated capacitor such as the DHR4E4A102K2BB. When I have been studying the IPC-2221 and IEC 61010 standards the conductor clearance should be in the order of 0.00305 mm/volt, therefore you would think that for a 10kV rated capacitor the lead spacing should be at least 30.5mm.

However, when looking at many datasheets they are around 9.5mm +/-2mm.

In my application one lead needs to be at 10kV and the other at 0V, so I would expect arcing/flash over to occur.

What am I missing?

EDIT TO SHOW PCB

Here is what I have so far with the PCB which shows the capacitor and slots (yellow line is board edge/routing)

EDIT TO SHOW SCHEMATIC

Schematic added to show that is I added DC grading resistors in parallel to the capacitor then it would create a potential divider network and my outputs would be less than 10kV. Hence the discussion about headroom. I have 10kV coming in and I need 10kV (or there abouts) going out.


texts: Is it OK to run a signal junction at a "do not use" pin on a solid state relay DIP package?

texts:
I am attempting to retrofit an LCA710 solid state relay into an exiting PCB that has a mechanical relay. I will need to cut some traces and run some fly wires, but there is one IO line that would "pass across" pin 3, marked "do not use".

Would this pin be a dead pin inside the IC package?  Or, is it likely connected to something that would cause problems?  Does anyone have any idea if it would be OK to use this pin as a junction point?


texts: Very small camera or endoscope like device with minimal electromagnetic noise generation

texts:
I need to be able to visually monitor movements of a recording electrode inside an electromagnetically shielded chamber. This is a cylindrical chamber of 1" X 1" and is in absolutely dark environment (I can use a light source when the camera is on).

One of the concerns is introduction of noise into the recording electrode by the cameras body (acting as an arial, or by its power source or control circuit). This is why a device like and endoscope with a fiberoptic tube might be better (to put a distance and allow for shielding around the camera).

My question is, is there any camera that best fits this use case? I hope question is clear.

To make it a bit more clear, this is biological signal recording setup, that amplifies and  filters signals in the microvolt range.


texts:
I'm calculating the parasitic fringe capacitance between METAL1 line and substrate in a VLSI circuit. I'm using the equation for a cylindric capacitor:

\$ C = \dfrac{2 \pi \cdot \epsilon \cdot l}{log (\frac{t}{h})} \$ (where t is dielectric thickness, and h is the metal height)

My questions:

Is the log in the equation natural, or base 10?
When I calculate the parasitic capacitance between two metal lines in VLSI, can I use the equation for parallel plates: \$ C = \dfrac{\epsilon \cdot  h \cdot l}{d} \$ (where d is the distance between the two metals)?
How does the applied voltage to one line influence the second line?


texts: How do I choose component values when designing a Low/High pass RC filter?

texts:
The cut-off frequency of a RC filter is obtained from the well known equation,
$$1\over(2 \pi RC)$$
This is one equation with two variables. For example, R=100, C=10 has the same result as R=10, C=100.
Based on what should I prefer one over the other?


texts: What is a reasonable way to connect small wires?

texts:
These wires will carry up to 1.5A at 5V outdoors in clear weather. Would it be reasonable to connect them by simply taping them together with electrical tape?

I'm new to electronics outside of embedded programming and simple Arduino prototyping, so I wanted to check that I'm not running into any safety issues. Hope this is on topic and not too basic.


texts:
So when a capacitor is being charged, it is connected to a voltage source and a current flows through it (for a time).

Now, high-school physics says that when a capacitor made of 2 large parallel plates charges, one plate collects an excess of electrons, which makes it more negative. But... the electrons (in this model) are also circulating in the circuit, so they also "pass" through the capacitor, until "something happens" and they cannot pass anymore (i.e. a charged capacitor blocks DC). What is this thing which happens?

As far as I understand it, the high-school model is actually too simplistic, but where does it break down? I have a vague idea that the electrons are too slow to carry current (especially if it changes with high frequency such as in RF circuits) and electrical current is actually an EM field which is propagating, similar to how light (and the entirety of the RF spectrum) behaves, only localised to the wire (a conductor, like glass is for light). So, how does that model explain capacitors?

Can anyone point to a good explanation of the physics involved here?


texts: What happens if LEDs do not get enough current?

texts:
I'm building a lighting fixture using big led panels.

The LED panel says it requires 7 amps @ 12 volts, but the power supply I have is only rated to 4 amps @12 volts.

What will happen? Will it damage the power supply, or just not light up all the way?


texts: Boundary Conditions for dielectric-conductor interface

texts:
I have been given a college assignment and there is this objective type question which asks for a boundary condition that is not satisfied by the dielectric-conductor interface. The following options are given;

$$ E_{t1} = E_{t2} $$
$$ D_{n1} = 0 $$
$$ H_{t1} = H_{t2} $$
$$ B_{n1} = B_{n2} $$

Where $$ E_{ti} $$ is tangential component of the electric field in the ith medium and $$H_{ti}$$ is the tangential component of the magnetic field intensity in the ith medium.

$$ D_{n1} $$ is the normal component of the electric flux density in medium one and $$ B_{ni} $$ is the normal component of the magnetic field in medium i.

Medium 1 is dielectric and medium 2 is conductor here.

I think that second option is correct because in conductor there is always some free charge, thus;
$$ D_{n1} = \rho_{s}$$.

Am I correct??
Please help!!


texts: Pair of single test lead wires to solder type barrel plug: how do I strain relief the connection?

texts:
My plans for power supply test leads have me wanting to have at least one set of leads that has 2x bananas on one end and a barrel plug on the other to allow me to plug in prototype PCBs without having to fuss around with finding the right wall wart and plugging it in instead.  I'm debating between individual test lead wires (silicone insulated) and parallel-lead low-voltage "zip cord" of the type used for the outputs of wall-wart type DC supplies for the wiring material for these leads, but that's a bit out of scope for this question, as I have a more specific problem with the single-wires approach.

In particular, I am wanting to use this barrel plug:

in conjunction with a pair of these test lead wires in appropriate colors:

Terminating the actual wires is simple: the Switchcraft 767 plug has holes in the contacts that I can put the wires through then solder.  However, how can I strain-relieve this connector to the pair of wires exiting it?  Is the included boot useful for this purpose, or should I ditch it and go with a different strain relief approach?


texts: Linking amplifier to sound organ causes fault

texts:
I have put together the Chaney Sound Organ (http://www.electronickitsbychaneyelectronics.com/prodinfo.asp?number=C7025) and replaced the microphone input with a rca plug.

I tested this with a sansa audio player (battery operated) and it worked fine.

However, when I use a splitter with the audio player -- and have the other side of the splitter going to an amplifier, I trip the reset in the power strip that is powering both the amplifier and the sound organ.  Is this some sort of ground loop, or some sort of feedback? And if so, do I isolate the two systems?

Thanks in advance


texts: PCB Design - Do I need a power plane, if only one component uses the power rail?

texts:
I'm designing a 4 layer PCB. The two outer layers are going to be routing layers, the 2nd layer a ground layer, and the 3rd layer a split power plane layer.
I have a negative and positive power supply, split on layer 3. These two supplies power three different voltage regulators. Two of these 3, create different bias voltages (to reverse bias photodiodes), and one one is used to create a 3.3V rail for an IC RF amp. Does it make sense to make the 3.3V rail a split power plane on the third layer? It only powers one IC, and since I'm amplyfing analogue RF signals, it needs to be as low noise as possible. What about making split planes for the bias voltages?
I guess more generally, when does it make sense to have a plane, vs a trace for a net?


texts: What is the difference between the terms wave, waveform, and signal?

texts: What is the difference between wave, waveform, and signal? Or do they have the same meaning? Can they be used in place of one another?


texts:
I am looking at ordering this lcd https://www.sparkfun.com/products/255, however when looking at the picture it seems that there are some extra pins on the right side not described in the hd4470 datasheet.  I was hoping someone could explain their use to me.  Here is the picture

I would assume that the LCD would act normally if I left these pins unconnected, but please correct me if i am wrong.


texts:
My electricity knowledge is about high-school level or so. Just about enough to be dangerous...

Back when I was a kid I used to play around with 4.5V DC power sources, buttons, switches, relays and tiny 3V incandescent bulbs. Was pretty fun. But I didn't pursue this interest and instead went into computers.

Today while goofing around at the office I played a bit with a colleague's toys: a bread board, a resistor, some LEDs and a 9V DC power source. And I noticed something very odd (well, for me anyway):

It didn't matter if I put 1, 2 or 3 LEDs in series, they always shone at the same brightness. Add a 4th one though and they all became really dim. On the other hand, putting them in parallel also didn't affect them... much, but one did shine a bit brighter than the others (which was as my colleague predicted, albeit the effect was far less than he thought it would be).

This... doesn't add up to me. Incandescent bulbs were VERY sensitive to voltage. Add more and you get a brighter light but the bulb burns out sooner. Adding 9V to a 3V bulb would be shiny, but probably not for more than a few minutes. These LEDs however don't seem to care.

I always lived under the impression that most electronics components are meant to be operated at a set voltage (or at least a fairly narrow range), and going above/below that usually comes with some unpleasant side-effects, such as the smell of burnt plastic.

Now, I suppose these LEDs can't tolerate anything either - if I give them 1000V they'll probably smoke anyway - but it seems that there's a pretty wide range where they operate just the same?

How does this work? How does the current/voltage/resistance play out when putting multiple LEDs in series (and when changing the count of these LEDs)?


texts:
I am still fairly new to programming,  so I'm sorry in advance if my terminology/formatting isn't up to scratch.

I am currently working on an element of a musical instrument that will allow me to actuate a button multiple times with a varying time delay between presses, record this and loop the pattern.

I currently have an array for recording the timings of the button presses, I am using USB-UART/terra term to check my values are being recorded correctly but I am finding the array being populated with seemingly nonsensical values. I am wondering where this data is coming from.

Highlighted in red in the image below are the values that I expect to be retained in the T0, T1..etc values. In short - Mtapi is the int used in selecting what location in the array I want to store the current milliTAP value (T0, T1 etc..). But as you can see from the following data lines they are being replaced by 10 digit numbers.

Basically, I am wondering what those numbers are, why I am seeing them and how to stop them populating my array!

I did think they maybe something to do with data locations of the array instances? but honestly this is all new to me and I have no idea. That and how they are changing at what seems to be random to me.

Any help or direction to further reading is much appreciated.

you can see the code on GigHub here

for quick reference (shortened for posting here):-

if ((Mtapi==0)&&(MTap[0]>0)&&(MTapBtnCHK==0))
{
     int i;
     for (int i=0; i<63; i++)
     {
         MTap[i]=0;
     }
}

if (MTapBtn_Read()==0)
{
    MultiTapTempo();
}
if (MTapBtn_Read()==1)
{
    MTapBtnCHK=0;
}

//gap in code posted here, then:

void MultiTapTempo(void)
{
    if (MTapBtnCHK==0)
    {
        Mtapi++;
        MTapBtnCHK=1;

        if(Mtapi==0){}
        if(Mtapi==1){MTap[0]=millisMTAP;}
        if(Mtapi==2){MTap[1]=millisMTAP;}
        if(Mtapi==3){MTap[2]=millisMTAP;}
        if(Mtapi==4){MTap[3]=millisMTAP;}
        if(Mtapi==5){MTap[4]=millisMTAP;}
        if(Mtapi==6){MTap[5]=millisMTAP;}
        if(Mtapi==7){MTap[6]=millisMTAP;}
        if(Mtapi==8){MTap[7]=millisMTAP;}
        if(Mtapi==9){MTap[8]=millisMTAP;}
     }


texts: Can I connect two OPA541 (or similar power amplifiers) in parallel to get higher current output?

texts:
I have a requirement for current sourcing about 30A and need to use a power amplifier for other reasons. Is it possible to club two OPA541 (each with 10A max) devices in parallel to achieve this? What considerations should be taken? Any gotchas?

The output of the two amplifiers is going to be a 50Hz sine wave. Inputs for both come from the same source. What's the best design to achieve this?


texts:
If I have an inductive coil generating AC voltage due to an oscillating magnetic field, is there a way to determine the current (or energy) being generated in the coil?  Further, if a capacitor were placed in parallel, would the energy get transferred to the capacitor and create a decaying oscillation?

I know that the coil will generate a voltage to resist the changing magnetic field, but does that mean a current flows through the coil equal to the voltage divided by coil resistance?  If so, would that current be in phase with the voltage, or 90 degrees out of phase?

I see a lot of high-level discussion of this topic related to tank circuits, LC oscillators, and inductive charging, but I am not sure where to find a more physics/electron-level explanation of this phenomenon.


texts:
My imac 2009 205W power supply is over and I want to repair my self but I need your advice what to start with. After I replaced my cpu and attached the v-sync flex band for display, this band accidentally touched the transformer pins from the power supply board(my mistake)
First time I've tested the T fuse T6.3A 250 V, I got OL and no beep but when the power supply is  plugged in on my socket, the home socket fuse turns off automatically.
Can you please help me or give some advice how to proceed further and what is the next electronic part to test?


texts: Op-amp based over-current protection circuit not operating as expected

texts:
I am trying to make an over-current protection circuit using an LM358 opamp and an N-type Mosfet. I have only done it on Proteus simulation, not in real life.

The problem I am having is that the voltage at the inverting input of the comparator is following the voltage at the non-inverting input of comparator (reference voltage.)

I am trying to make the circuit as described in this link.   The circuit  from that site is attached in the second picture, probably they have used the erong symbol for the IRF540N.

What should I do?


texts:
I have the following system consisting of a known voltage source \$Vin\$, two resistors to ground \$R1\$ and \$R2\$ and two unknown y-capacitors \$C1\$ and \$C2\$ to ground (The values for the capacitors are just for reference). How I determine the values of the capacitors?
My idea would be to connect a known measurement resistor of e.g. 1kOhm from B+ to GND and measure the time constant with an oscilloscope. This however will only give me the total capacitance \$C1 + C2\$ of the system.


texts: How my ac-dc adapter gives constant voltage and current?

texts:
I have multiple ac-dc adapters, one with variable voltage and the others for electronic devices. written on them they give specific voltage and current, How come? Doesn't the current change with the applied resistor?

For those adapters of electronic devices may be the resistance of the device is constant. but for that adapter I bought with variable voltages how it says it gives specific current? It says

OUTPUT: 1.5-3-4.5....V
CURRENT: 500 mA


texts: A cheap experiment to demonstrate the relationship between resistivity and heat output

texts:
I'm trying to design a cheap experiment that will demonstrate relationship between resistivity and temperature change under current. Optimally I would

Find some relatively resistive substance
Run some current through it.
See how much it heated up

Any suggestions from either the practical angle (choice of material, range of current) or the math (temp change <>watts) would be a big big help

Thanks much in advance

Joe


texts:
I've done a day of research and haven't found a clear path to my problem. I thank you for taking the time to help!

Retrofit application in 1985 VW Jetta (MKII). My instrument cluster lights, the ones that actually shed light onto the gauges, are stock incandescent. Marked 12v and 1.2 watts Everything is in DC.

simulate this circuit – Schematic created using CircuitLab

Ok, in the schematic, I couldn't find a symbol identical to what is in my manual, but I believe them to be the same. To understand the Bently wiring diagram/manual: thin lines are internal connections with in components, I believe the wiper and one post of the integrated dimmer pot are internally connected. Bold lines are actual wires. VW's part number for the switch unit is 191941531A

Second part of understanding the manual is terminal I.D.'s.
--Terminal 30 is 12v+ coming into switch,

--Terminal 58b is output from pot to dash illumination lights,

--Terminal 58 is output power to parking lights, more importantly it is internally supplying 12v+ to pot when the switch is turned on,

--The remaining terminals should not be of concern in this project.

I've tested the pot with my meter and ranges from 0.002 ohms up to 25 ohms, so it tests to be 25ohm pot.

I want to replace the incandescent bulbs with plain-Jane, oldschool, 20mA 5mm Red LEDs. I can simply plop in my LEDS, 3 in series, with a 470ohm resistor at the tail to ground. I can then supply 12v and have lights, easy peasy. I've factored a max voltage in choosing 470 resistor of about 14.5-15v. That should provide a safe buffer, and I don't mind if the LED isn't at "FULL" power since after all they aren't linear devices and I can't physically detect a difference between said voltages. Even if at 12v, it was slightly dimmer, so be it.

To complicate matters, I want to be able to dim these 3 small LEDS, ideally using the stock dimmer pot, which is part of the main headlight switch. But I am well aware that LEDs need their current limited, where as incandescent's can be controlled by a pot(voltage i think), and that trying to control and LED with a pot(voltage) is not the way to go. Yes, a pot, if used with an LED, will create a "hard to use" curve, where it's either on, or has an extremely low travel to get to dimming; among other problems. It doesn't work with what I have since I've tried it, where in my case they just stay on no matter what I dim the pot to.

How do I take some of the ways to limit current, control the LEDs with the stock pot, and get the desired result? I'm not sure I follow how to use buck drivers, or PVM, or other ways to tackle this. Can a 555, opamp, or LM/Txxx regulator work, and basically make a small "relay" that is controlled by the stock pot?

What I have worked out so far, but doesn't dim as desired:

simulate this circuit

simulate this circuit

I'm looking for simple. I'm not trying to "save power", or go to any extremes, just want to design something simple, easy, and that I can plop into place w/o redesigning the wheel. Thank you again!

:EDIT:

Arrow 1 is pointing out the old bulb sockets. Unfortunately the bulbs that fit in only made contact to the old style circuit foil, and not to any connector and wires. So I can't use the old bulbs,e tc. Arrow 2 is pointing out the LED bar I'm only using for testing and playing around, but the 3 red LEDs I plan to use will fit in a similar manner. Arrow 3 is showing it nicely fitted into where it needs to go. You can get a glimpse of where the wire is running to

Arrow 4 shows the position of the board that will supply power to the LEDs, and a close up of the spot where I will place a screw terminal for the two wires that will power the LEDs. One may notice the spot for the resistor that will tie the LED neg to ground (through a trace on the back side that isn't visible).


texts: Can you identify the name of this battery discharging plug (photo attached)?

texts: I am trying to source the male/female sides of this connector that fits on a 48V Lithium Ion battery. Can you please identify the name of this type of connector?


texts: How do I learn OpAmp? Do I need to know the internal circuit? Are they works the same way?

texts:
I am learning OpAmp. I watched many good teachings on YouTube. Some teachings mentioned the OpAmp type/series he/she is explaining, such as uA741. But many other teachings without any explanation, like is in here and here. The fact, there are many type OpAmp mentioned, even in the CircuitLab which the software attached to this SE, there are many type of OpAmp included. Then my question:

How do I learn OpAmp? Can I just think that they work the same way?
Do I need to know the internal circuit and treat that every type is working specific based on their own design?


texts: Difference between Open Loop and Closed Loop Hall Effect Current Sensor

texts: I think the title says it all, but in any case, I want to know the difference between the open loop, and closed loop, hall effect current sensors, such as the LEM HAIS 200-P.


texts: Closed-form solution for capacitor charged with current source and discharged through resistor

texts:
It has been ages since I last did circuit analysis by hand and I am stuck with a simple circuit:

simulate this circuit – Schematic created using CircuitLab
I am looking for the closed-form solution of the voltage at node V as a function of time, in response to a step-function input of I. I.e. I = 0 for t<0 and I = I for t>=0.
I am stuck with what seems to be a non-separable integration problem:
C*dV/dt + (V-V1)/R = I
Can somebody help me with this integration? Or can this only be solved numerically?


texts:
Can we use 125VAC 20A switch in place of 12VDC 20A switch?
I have searched my local market and found 125VAC 20A switch. Can i use this AC switch in place of 12V 20A switch as it is not available in market?


texts:
I am working on a tesla coil, but I did not use any equations until now, and I am trying to get it to work without redoing the whole thing.

All of my formulas are from the teslacoildesign.com site.

The secondary coil is what we do not want to re-do. This took hours and hours of winding. Here are the values that we calculated. We used fishing line with 24awg wire to space out the coil:

  Secondary Coil

  Height= 46.5 inches

  Diameter = 12 inches

  Wire = 24 AWG = .0201 inch Dia.

  Fishing line (for spacing) diameter = .56mm =.02204 inch

$$Turns = \frac{1}{(Fishing\,line\,Diameter + Wire\,Diameter + .000001)}
  \times 46.5 \times .97$$

$$=\frac{1}{.0201+.02204+.000001}\times 46.5 \times .97 = 1070.335 \,turns$$

That is very close to our estimate of 1062.9 turns by measuring a small portion of the coil, and multiplying. Will use average.

  Secondary Turns = 1066.6

Secondary Capacitance (pF) =

$$= 0.29 \times Winding\,Height + 0.41 \times \frac{Secondary\,Form\,diameter}{2} +$$
$$+ 1.94 \times \frac{\sqrt{\bigg(\dfrac{Secondary\,Form\,Diameter}{2}\bigg)^3}}
   {Secondary\,Wire\,Winding\,Height}$$

$$= 0.29 \times 46.5 + 0.41 \times \frac{12}{2}
  + 1.94 \times \sqrt{\Big(\frac{12}{2}\Big)^3}/46.5 = 20.126pF$$

  Secondary Coil Capacitance = 20.126 picoFarads

  Secondary Height to Width Ratio = 46.5:12 = 3.875:1

$$Secondary\,Coil\,wire\,length = $$
$$= \frac{secondary\,coil\,turns \times secondary\,form\,diameter \times \pi}{12}$$

$$=\frac{ 1066.6 \times 12 \pi}{12} = 3350.82\, feet$$

  Secondary Coil wire length = 3350.82 feet

All Above Looks good, but here is where I start running into problems

$$Secondary\,wire\,weight\,(lb) = $$
$$= \pi \times \Big(\frac{Secondary\,bare\,wire\,diameter}{2}\Big)^2
  \times Secondary\,coil\,wire\,length \times 3.86$$

So, I enter the values \$\pi \big(\dfrac{0.0201}{2}\big)^2 \times 46.5 \times 3.866\$

And I get .05704 Pounds, which is obviously not the weight of my wire.

Then, I get very confused here, where they state:

Secondary Inductance = ((((Secondary Coil Turns 2) × ((Secondary Form Diameter ∕ 2) 2)) ∕ ((9 × (Secondary Form Diameter ∕ 2)) + (10 × Secondary Wire Winding Height))))

What Value is the inductance? when I calculated it with my values, I got 78822.3815

  " Secondary Coil Inductance " = 78822.3815

After this, I am confused with all of the values, because they do not state the units.

For starters, I have a 6 inch ring diameter by 19 inch overall diameter Toroid for the top load.

Here is an image of my current setup. I have a primary coil already setup, but I am assuming it is not correct.

I have a primary capacitor of 10-15 NanoFarads, calculated for a good Larger Than Resonant cap. I am designing it for a 30ma 15k NST although all I have is Microwave transformers, I plan to get an NST.

So, how can I figure out how to design the primary for resonance, and am I on the right track?

And no, we do not want to rewind the whole coil!, so if anything to change, it will be everything but the secondary


texts: How many MOSFETs can we safely parallel in condition of very high currents? I had problems with a motor application at 48V 1600A

texts:
I tried with some configurations in which 16+16 MOSfets of 240A each (really they are case limited to 80-90A because of source terminal, but i doubled this termminal with a very thick copper wire for each of them.) were configured in a very symetrical arrangement, 16 MOSFETS in transistor position and 16 in synchronous rectifier configuration, and they still seems to fail at some points and I can't figure out how to avoid failure.

They were attacked all with a IR21094S as driver, and each 2 transistors were driven by a MOSFET totem-pole TC4422 driver. The motor is a 10kW dc compound motor, that is 200A nominal and take probably 1600A at start. The inductance seems to be 50uH, the rising current speed in pulses is = 1 A/µs at 50V Frequency chosen is 1kHz, PWM buck with synchronous rectification configuration

I can't figure out why, even the circuit was carefully made, with 4 modules symetrically supplied and with separate output conductors up to motor, and with independent snubbers, and with a motor snubber, transistors still fails. The circuit seems to work fine but, after some time, like tens of minutes (temperatures are normal, some 45 C) usually at accelerations, usually synchronous diodes fails, followed by all the transistors

I initially tried to sense current on MOSfets using a small mosfet in parallel (drain-drain, gate/gate through a zenner, source of small mos to a 22 ohms resistor and after to a voltage amplifier to activate a fast-shutdown protection circuit), but because of faster commutation time the small mosfet entered always before the main transistor, disturbing the protection circuit and making it unusable...

There is not shot-through, i used 2us gap through driver, i only suspect assimetry in the parasitic inductances . How many MOSFETs did you guys paralleled succesfully and in what conditions?

One of the 8 power modules

All power modules

Some of the drivers

Half of the assembly

All stack, without capacitors

Output signal

Falling edge, output yellow, 48V supply blue
Supply is sustained only by some sporadically distributed 100uF and 100nF ceramic capacitors, to avoid MOSFET burns by initial tests mishandling

Rising edge; you can see the overshoot is very small, only 5 volts. transistors are at 75v rating


texts: why wouldn't a 9-60DCV 20A PWM motor control work to control a 12v 20A wiper motor

texts:
I have a question regarding controlling the speed of a wiper motor with a PWM vs wiring in a rheostat in the positive side. I have a 110ACV-12DCV 20A converter going to a 9-60DCV 20A PWM motor controller, which is connected to a 12v 20A wiper motor.

I hooked up a multimeter to the potentiometer that came with the MC and theres a 2.5v change in the pot itself but no change in the motor output that goes to the wiper motor, any ideas as to why it wouldn't work, Im using the proper gauge wire going from converter to MC and researched this a lot and everything I've read is to use a PWM rather than using a rheostat in the circuit. Any help is appreciated, thank you


texts: Is there a stride setting for PIC32MX DMA?

texts: I'm reading the registers in the user guide for the DMA and I don't see one, but I wanted to make sure.   I was hoping that in addition to cell size there was a stride size as well.  So for instance if I had 1000 bytes but I only want the DMA to transfer every other byte.  With another DMA I could set my transfer cell size as 1, my stride as say 2, and my length as 1000.   Then I'd end up with 500bytes, or every other byte from the source, at my destination.


texts:
;)

I want to use an amplifier circuit powered by a +/-15V supply (DC-DC converter IC with one or two Watts) to interface an ADC. I want to use clamping diodes to prevent the ADC input from leaving the voltage range 0 ... 3.3V. For that purpose I need an additional 3.3V rail generated by a supply that is also capable of sinking current. I already read on the internet that I cannot use LDOs (to step down from +15V to +3.3V) because they are usually not capable of sinking current.
My simple question: Which supply topology can I use in order to source AND sink current? The datasheets only mention maximum values of current that shall not be exceeded, but not a hint about the direction of current flow.
Can someone maybe provide further/additional information about supply topologies (ICs for board supply) and their properties so that I can read a bit about the topic?

Best regards!

EDIT: Most of the answers referred to voltage regulators, such as LDOs. But what about DC-DC converters? Can any of those converters sink current?


texts:
Objective:
A device to prevent automatic restart of a motor (or pump) after power failure.
Background:
It is well known that aquarium fish are curious and will explore items in the tank.  In the hobby, pumps called circulation pumps are often used to simulate natural water currents.  Some of these pumps have finer plastic screening on the flow exit side to prevent fish from entering them when they are stopped.  There are more than a few stories about fish being killed by the impeller of a circulation pump because the owner did not know a fish was in there...  I also have thought that this same situation could arise from the following scenario: 1) power goes out during the night or any other time the owner is not around; 2) fish explore inside of impeller area of pump; 3) power comes back on; 4) 1 or more fish are dead..
In speaking with someone from a local industrial controls distributor, he discussed simple solutions such as screening over the flow exit of the pump.  While I can do that, aesthetically it won't look good and it may decrease the flow from the pump.
My own research has revealed that I need a device known as a "automatic restart preventer" or "undervoltage release with manual reset". Basically, think of what I need as an "inverse circuit breaker". These are commonly sold for industrial motors, machines, and tooling where the auto restart after a power failure/power restore could pose a huge safety hazard.  However, checking online, those devices are well beyond the budget I am willing to spend for this project.
The guy from the controls company said that I could easily accomplish my goal with an AC DPDT relay and he sent me a schematic to use.  Although he sent me a BOM for parts I could buy at his company, I decided to go to local RadioShack and was able to build the circuit since they have all the parts.
Circuit:
Relay is a DPDT, 120Vac coil; 10A contact rating
Neon lamp is a 120vac
pushbutton is 120Vac momentary
Motor is the pump motor (2.8W power consumption)

He explained that the relay would function such that it would only be continually energized if the pushbutton was first actuated.  And that if the power went out, there would be no way for the motor to come back on without the button first being pushed.
I built the circuit above and tested it, but it doesn't seem to be working.... When I push the button, I can hear the relay click, so I know the coil is being energized, but nothing else happens.  The relay seems to be working in that there is continuity between the NC pins on each respective side of the relay when the coil is off and there is none when the coil is energized.  However, I am not detecting any AC voltage on the output pins from the relay for the NO contacts....


texts: If the Sense Amplifiers structure is the same as an SRAM cell's, why the differential voltage on the bit line gets amplified?

texts:
source

How you can see the structure with 6 transistors of a Sense Amplifier (SA) is the same as a SRAM cell, but this latter causes a little variation on the bitline voltage that the SA will amplify. My question is: then why this does not occur when the SA is activated, but instead it returns a full logic value? I hope I've been clear. Thanks for answering


texts: Specs for the 54622D oscilloscope expansion bus

texts: Just bought a used HP/Agilent/Keysight 54622D oscilloscope. There is an expansion bus connector on the back. I've been looking around for the specs on the bus such as connector type, electrical specification, and interfacing protocol, but have come up empty.  Anyone have references?


texts:
While searching for fuse holders in the web, I found an infinity of pages like this, where the rating of the fuse holder is e.g.:
"10A/250V AC, 15A/125V AC" (it is an example, values do not matter).
I can't figure out what is the meaning these ratings: For the current rating, I can understand that the fuse holder can support at most e.g. 10A, since the contact between the fuse and the fuse holder has a small resistance that generates heat when crossed by big currents. But in this case, this rating should depend only on the current and not on the potential, so why a potential of 125V in the example above allows the larger current 15A?
Moreover, the spec "AC" for the fuse holder is rather strange: what has a fuse holder to do with AC or DC ?


texts: Choosing right trimmer and capacitor in LM317 circuit

texts: I am working on stable, low ripple +22V power supply for TLC5940 IC. I am working a circuit based on the model of Texas Instrument's LM371 circuit . Now, what kind of R2 and CADJ should I use for this circuit. Is Bourn's 3362 Potentiometer right choice for this task and how should I connect it to circuit, since it has three terminals. And, what kind of capacitor should I use for CADJ. I am working in Eagle.


texts: How does peer-to-peer energy trading work?

texts:
I am relatively new to the topic, with not the greatest electrical engineering background, so these questions may sound simple, but I still cannot figure out how certain platforms such as piclo, vandebron and others manage to trade electricity between households?

Doesn't this introduce concerns for the utility grid, such as overload, feeding the grid with electricity not in phase, etc.? And how can one even use the utility grid to transmit electricity to another household of choice? (how does one get an easy access?)

As, I mentioned, those questions may be simple and redundant, but I do not seem to find answers anywhere.


texts:
im trying to make c++ project using atmel asf.

the compiler have:

C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM4E_DFP\1.1.57\ic.sam4e\include\component\....

but in asf we have different files which are

src\ASF\sam\utils\cmsis\sam4e\include\component\

at beginning i thought they are the same. but now im confused. what is the difference?

is one of them came from standard cmsis stuff related to cortex-m0+ and the other is something defined by Atmel? and in c++ project they just give me the original cmsis? (if i dont make sense here then maybe i have big misunderstand of a lot of things)


texts: Segger J-Link GDB-Server / STM32100B-EVAL / Debugging hangs at first instruction

texts:
I'm using a J-Link and the corresponding Linux GDB-Server from Segger. When I start debugging with Eclipse the program is automatically halted at the first instruction in the startup assembler code. When I try to step i never get to the next line. Instead I see the GDB-Server output filling up with these messages.

Performing single step...
...Target halted (PC = 0x080005A4)
Reading all registers
Performing single step...
...Target halted (PC = 0x080005A4)
Reading all registers
Performing single step...
...Target halted (PC = 0x080005A4)
Reading all registers
Performing single step...
...Target halted (PC = 0x080005A4)
Reading all registers

Using the command line I have a similar issue. It seems that somehow the PC is not advanced after the instruction.

Any hints why I might be getting this kind of behavior?


texts: Can these small Hall-Effect Current Sensor Modules really handle 30A?

texts:
These don't look like the could reliably handle 30A to me. The terminal block is small, the chip is tiny.
Please help me understand what the considerations are when sizing components & traces for high currents.

https://www.amazon.com/Tolako-Hall-Effect-Current-Sensor-Module/dp/B01FA36DKC


texts: Controlling MAX31855 via SPI with Verilog from FPGA

texts:
I am trying to create an SPI between the MAX31855 - thermocouple to digital converter, and my FPGA - DE0.

I'm understanding the gist of SPI, and the timing requirements of the MAX31855. My problem is hashing it out in verilog.

BACKGROUND INFO MAX31855: When CS (slave select) is low, data is sent through MISO, for a full reading of temperature and reference junction temperature, 32 cc must pass. 14 cc are required for just the temperature reading.

DATASHEET
https://cdn-shop.adafruit.com/datasheets/MAX31855.pdf

My understanding is that to get a temperature reading, the control signal, CS, must be set low and which point the data will come in serially through the MISO.

My plan of attack was to have two clocks, one for SCK (5 mhz) and one for CS. CS would be 1/14th of SCK. The reason being is that the data for the temperature comes from the first 14 bits through MISO. So, I set CS low for 14 SCK clock cycles to get my temperature reading. The data coming through MISO would go into a 14-bit-serial-in-parallel-out shift register.

I made the clock dividers, and I made the shift register. I am having difficulty writing the verilog code... at least in my mind. I am suspicious of it working.

I am thinking that if at the negative edge of CS, I send zero bytes to the CS input of the MAX31855, that should do it.

I have this code, thoughts? I BELIEVE this is correct, but my intuition is saying no because everything I have read about SPI says I need a MASTER module AND a SLAVE module.

NOTE: any blanks you see in the module instances are for RESET, I am just not going to use it.

//MASTER module for seriel peripheral interface of MAX31855

module SPI_MASTER(CLOCK_50,GPIO0_D[21],GPIO0_D[19],GPIO0_D[15],Temperature);

input CLOCK_50;
input GPIO0_D[19]; //MISO
output reg [13:0] Temperature;
output GPIO0_D[21]; //SCK
output GPIO0_D[15]; //CS i.e. slave select
assign GPIO0_D[15] = 1'b1;

//##########################################################################//
//########################CLOCKS############################################//
//##########################################################################//

/*DE0 clock (CLOCK_50) goes into ADC_CLOCK. ADC_CLOCK outputs a 5 mhz clock
that goes to SCK, and to CS_CLOCK. CS_CLOCK outputs a clock, whose 1 cycle is
the length of 32 of ADC_CLOCK's.*/

ADC_CLOCK SCK_CLOCK(CLOCK_50,,SCK_WIRE);
wire SCK_WIRE;

assign GPIO0_D[21] = SCK_WIRE;

CS_CLOCK CS_SIGNAL(SCK_WIRE,,CS);
wire CS;

//##########################################################################//
//##########################MISO############################################//
//##########################################################################//

/*MISO takes the input from MAX31855 through GPIO0_D[19], goes into shift register
after 14 clock cycles the shift register outputs Temperature. Temperature  goes to
comparator of thermostat state machine, and state machine of LCD*/

SR Temp_Readings(GPIO0_D[19],SCK_WIRE,,Temperature);

/* @negedge of CS, send signal to GPIO0_D[15] (the slave select) for temperature to
be read and data be send through MISO*/

always @(negedge CS)
    begin
        GPIO0_D[15] => 1'b0;
    end
endmodule


texts: Figuring out pin configuration for a small SMD transistor

texts:
The data sheet of the dual transistor IMZ1A shows pin layout as:

But the chip I received looks like this:

There is a small dot on top left, but according to the datasheet, pin 1 should be on top RIGHT. Is there a way to make sure which is pin 1?


texts:
I had a PCB containing a micro usb and a 3 axes accelerometer LIS3DH. I put the PCB at fixed position and the value of Z vary between --77at -83. but when I touch the usb cable with my hand or with a material stuff and without changing the PCB position, I receive big glitches of the values of z (up to 700 on Z value).
is that really my hand which cause this fluctuation (knowing that if I dont touch the usb, the value would stay stable (-77 -83for hours)


texts: Safe line IR laser which will be seen from 15 meters by camera module

texts:
What characteristics (wavelength, mW) IR line laser should have to:

be seen by camera module from 15 meters outdoor in day-light too
safe for eyes
line as big as possible
thickness of line should be enough to see from 15 meters 1280×720 camera

Camera characteristics:

1280×720
60 fps
I don't know what lens characteristic should be (relative to laser?)
I will use interference filter of laser wavelength

Camera module itself

As I understand it should be combination of lens and laser. Blind zone should be as small as possible.


texts: Charging a mobile Tablet while communicating with a USB device at the same time

texts:
I have designed a product (small spectrometer) using FT234XD usb-to-uart bridge and it connects to any mobile phone via USB cable (90mA maximum current). My device acts as USB slave and can connect to any mobile phone which supports OTG. However, we are facing one problem. We are selling our product with lenovo tablet and user won't be able to disconnect the device and charge the tablet regularly.

I came across several links stating that most of the usb hardware in mobile phones and tablets have a mode in which mobile/tablet can act as USB master and still charge itself at the same time. So, we have tried several resistors across ID pin and ground of the usb connector but tablet either charge only or it detects the device.

Finally, I am considering one FT311D chips which may work for us but I am not sure if it will be possible with it. Can anyone help me with this problem? Should we try other things with existing hardware (FT234XD) or try this new FT311D chip?

EDIT:

My Tablet is Lenovo Tab 3 Essential Tablet. I am planning to try FT312D. Good news is that my team ran few software tests and get to know  Tab software supports Android usb accessory mode. In this mode, FT312D will be the host and I think I can charge the tab and communicate with it.  I think It will work because tab will be in slave mode and can charge itself while communicating with my device and only thing required support of accessory mode in software. Am I correct?

EDIT 2

My device has PIC24E 16-Bit microcontroller. There is no USB Protocol specific firmware in PIC24EP. PIC24EP just communicates with mobile application using string based commands. PIC sends commands over UART and FT234XD converts them to USB. Commands received from Android application is converted to commands over UART and is returned to PIC. So, I think changing USB part of my device doesn't require any change in firmware of my primary microcontroller.


texts: What's the first step to learn Verilog coding to sort values?

texts:
I do not know how to start working on this problem. Should I first design the digital circuit of sorting? I am poor on both topic. Suppose I have four numbers R0, R1, R2, R3... What is the digital circuit for arranging these numbers in ascending order? I found a sorter circuit on the internet, but I'm not able to relate it to my problem.

Can anyone give me a hint regarding this?


texts: Why does 10k ohm pull down resistor not work for pushbutton with NOT logic gate?

texts:
I made the following circuit on a breadboard using a 10k resistor, 100 ohm resistor, LED, and 74LS04 NOT gate.

I expected this to work since the input of the NOT gate is at 0 volts when the switch is not on. For some reason, this setup did not work on the breadboard but worked just fine in Multisim. When I measured the voltage at the input of the gate with a multimeter, I got around 1.3V when it should've been 0. I tried changing the value of the pulldown to 100 ohms and everything worked fine. What explains this strange behavior? Would a pullup be more appropriate in this scenario?


texts: MSP-EXP432 "Analog In" pin taking voltage from circuit

texts:
I am building a circuit consisting of a voltage divider (with a fixed resistor and a LDR or photoresistor) outputting voltage to an ADC.

I want to measure the voltage going to the ADC using an MSP-EXP432 ; however, the MSP-EXP432 "Analog In" pin is taking voltage from the circuit (i.e. the voltage going into the ADC drops when the "Analog In" pin is connected).

I set the pin as an input in the code shown below in Energia.

const int bitsOfADC = 14; // 14-bit ADC Launchpad
//int maxVal = 2^N -1;
// 2^14-1
int maxVal = 16383;
float FSV = 5.0; // Supply to 0804ADC
float LaunchPadResolution = FSV/maxVal;
int D7 = A13;
int D6 = A14;
int ADCInput = A6;
boolean D7_State = LOW;
boolean D6_State = LOW;
void setup()
{
  delay(1000);
  Serial.begin(9600);
  pinMode(D7, INPUT);
  pinMode(D6, INPUT);
  analogReadResolution(bitsOfADC);
  pinMode(ADCInput, INPUT);
}

Is there any way to fix this?


texts: Aren't pull-up / pull-down options documented for STM32F103?

texts:
While trying to configure the GPIOs using CMSIS on a NUCLEO-F103RB board, I couldn't seem to find in the reference manual how one is supposed to choose between internal pull-up and pull-down resistors.

Page 160 shows the configuration of the CNF and MODE bits and shows that the bits are the same for pull-up and pull-down. Searching the entire PDF file for "pull-up" and "pull-down" yields no results. The errata also has no mention of this.

Did ST seriously forget to put this information in the manual? If so, how come no one has noticed this? Or am I just being blind?

Anyway, looking at their standard peripheral library, it seems that writing a 1 to the corresponding bit in the GPIO BRR register activates the pull-down resistor, while writing a 1 to the BSRR actives the pull-up resistor:

    /* Reset the corresponding ODR bit */
    if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
    {
      GPIOx->BRR = (((uint32_t)0x01) << pinpos);
    }
    else
    {
      /* Set the corresponding ODR bit */
      if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
      {
        GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
      }
    }

This code can be found in the stm32f10x_gpio.c file.


texts:
I'm building a small project with LEDs and an Arduino Uno board. It runs well with .hex file but no LEDs light up on Proteus (see picture.)
Please tell me what's wrong.


texts:
I am currently involved in a photovoltaic systems engineering project at the University of Calgary and I am interested in purchasing around 30 solar panels of an irregular rhombus size:

Does anyone have any ideas for how I can order or construct custom solar panels which will be of this size?


texts: Using a reflective sensor to detect green-

texts:
I need to build a circuit that detects whether a green object is in front of it.

As I do not need to know which color is in front of the sensor, but only if there is a green object, I thought a color sensor might be a little overkill.

My idea was to use a reflective sensor (more specifically the Vishay CNY70), with a green filter in front of it.

Would this work, and would this also work for darker greens? What could be a possible filter?


texts: Time Delay Relay: output = HIGH until triggered, then return HIGH after interval?

texts:
My goal is for a button press to temporarily disrupt the input voltage (120VAC) for a specified interval (around 10 seconds).  Ideally, I'd like the interruption of voltage to coincide with the leading edge of the button press; I'm flexible about whether the delay would start at the leading or trailing edge.

I'm getting a headache trying to determine the proper configuration of components to achieve this.  I imagine I will need some type of time delay relay in tandem with some type of momentary push button (normally on? normally off?).  I've tracked down a few resources that summarize the various timing modes available with TDRs, but nothing seems to offer the functionality I describe above.

I'm a novice tinkerer, and it would not surprise me to learn I'm missing something quite obvious.  Any help greatly appreciated!

Edit: If at all possible, I would like to avoid dependence on a second DC source, such as is required in the circuits Samuel and miceuz have proposed.  Perhaps there's no getting around this?  In lieu of introducing an entirely separate voltage source, would anybody condone splicing into the 120 VAC supply, and then using a transformer to step down to the ~12VDC involved in the 555 / RC timer circuits?


texts: Meaning of the different ports in the XMEGA PR.PRPA and PR.PRPB power reduction registers?

texts:
What is the difference between the two power reduction registers PR.PRPA and PR.PRPB on the XMEGA B family chips?

They share a single entry in the data sheet...

...with the same defined bits... but they are, in fact, two separate registers each with their own addresses...

There is only one ADC and one AC on this chip, so what happens if I, say, set ADC the bit in only one of the two PR registers? Is the clock to the ADC stopped? Or do I have to set the bit in both registers?

Where is this documented?


texts: Why are OLEDs used in screens insted of LEDs?

texts: I was trying to google this question and couldn't find any information. And from reading some info on how they work i didn't find any significant difference asides from OLEDs being made out of organic elements. Also I would like to know if the tendency to burn out of OLEDs is also seen in LEDs? And the main question being that why would they develop a new type of LED and not just put the classical LED crystal on a flat piece of plastic or whatever they are using and make a display out of it?


texts: chinese wemos d1 board randomly connecting/disconnecting from USB

texts:
How can I find out why my wemos D1 mini board is randomly connecting and disconnecting from USB to PC?
I got three boards from a chinese retailer. When I plug them in a PC and check device manager, the board randomly pops in and out of existence.

I have tried these things so far:

tried on three different Windows 10 Systems. Two of which have the random connection, but funny enough: one of them has a stable connection.
I tried using about 12 different cables.
I unplugged all other USB devices from the PC's in question.
I tried using every USB port available on the systems.
I uninstalled every CH340 related driver from the system. (note: Windows seems to automatically install new CH340 drivers when plugging in the device).
I have even completely erased Windows and did a fresh install of the operating system on one of the systems.
I tried all three boards from the same batch I received.
I tried connecting to a Mac and it seems fine, but I am not 100% certain how to verify a stable connection on a mac.

Normally I would say the board if defect - but why is it connecting ok to one single PC? I am now out of ideas how to further trouble shoot this issue.
Any ideas how to find out whats wrong?


texts:
I am trying to make a charger circuit for a battery pack consisting of 6 lithium ion batteries (cells) in series. Many battery charger ICs support multi-cell charging but do not provide cell balancing or protection. How should I connect the charger IC, a balancer IC and a protection IC (the last 2 could be in one IC I guess) with the cells?

Also, is there a single IC that handles battery pack charging, balancing, and protection?


texts: Tilt compensation for yaw calculation from magnetometer and accelerometer

texts:
I am working on a project where i have to calculate the raw, pitch and yaw angle using an accelerometer and a magnetometer.
I calculate the pitch and roll angle through the accelerometer and I am trying to calculate the yaw using tha magnetometer with the following equation:
 xM2 = xM * cos(pitch) + zM * sin(pitch);
 yM2 = xM * sin(roll) * sin(pitch) + yM * cos(roll) - zM * sin(roll) * cos(pitch);
 compHeading = (atan2(yM2, xM2) * 180 / Pi);

I am trying to implement the tilt compensation, so no matter the position of the x and y axis the yaw angle can be calculated.
I can assure the roll and pitch angle from the accelerometer are right and the magnetometer compensation is correct. The pitch and roll are [-180 180]
The problem i am facing, is that i think i am using the equation wrong as the accelerometer and magnetometer axis are not exactly the same.
The following image show both axis.

Can anyone confirm if the equation is been used correctly?
Thanks!


texts:
I'm working on a project to use PIR sensor to save on electricity bill in a university, almost a fresh graduate in Electronics Eng.

Load is Fluorescent tubes 44w each via ballast,there will be between 16-36 lamps available per relay,
the idea is to control them using:

Micro-controller
inexpensive PIR sensor
Relay
5v Power supply,

Few problems occurred:
First, there will be a lot of wirings and bigger chance of something going wrong in the setup, especially since each room can have a separate power supply, or multiple rooms sharing a power supply.

Second, Fluorescent lamps as I read, can take up to 100 times the rated current at start, our relay for now is a 30A relay SLA-5vdc-SL-A module, current for some rooms is calculated to be 7A, I've read about SSR, it can solve the problem, but are they safe (I mean the ones made in China), what could go wrong?

Third, for the power supply, many options are available, but the place this will be installed is critical (a university), so safety is a huge concern, system running 24/7 but at low current, maximum per room 500mA, PS can be connected to up to four rooms together, or one per room.

Is the project on the right path at least? any suggestions?


texts:
When designing Aluminium enclosures (rack mounted units), I've previously used an Iridite NCP finish to ensure electrical conductivity between panels (i.e. no oxide). Does anyone have any papers or similar on whether this is in fact effective? EMC for Systems and Installations & EMC for Product Designers by Tim Williams seem to suggest so, but I don't see it being done by all engineers, which I'd expect so if it were effective.

This also led me to question something else that seems to be taken for granted. When using a gasket between two unfinished aluminium sheet metal parts, would the oxide coating which develops on the aluminium not prevent the conductivity between the aluminium and the gasket thereby rendering the gasket useless?

Please tell me if you think this belongs in a different stack site.


texts:
I apologize if a similar question to this have already been asked.

I am trying to find the voltage between points A and B.

I wanted to ask why is there no current flowing through the middle 2-ohm resistor?

And why does it have a voltage of 2.67 volts? From my understanding, it seems to have been based on the voltage drops on the right mesh. Why is that? Couldn't it have been based from the left mesh? The voltage between A and B seems to be 1.3333 volts either way. I just realized that I had put the ground on that side. So it may be the reason why, isn't it?

Thank you very much in advance!


texts: How to avoid Attiny84 being powered on by a pulled up data line?

texts:
I've developed a simple sensor board based on the Attiny84a microcontroller which is able to communicate over a serial connection. I'm using an arduino bootloader and the SoftwareSerial library on pins 5 (RX) and 3 (TX).
I would like to be able to keep the serial line attached while power cycling the sensor. But it seems that the Attiny84 is powered through the RX line of the Serial connection, which is pulled high by the other communication partner.

It seems the RX line is pulled to 3.4 volts when nothing is attached and I can measure 1.4V across the Attiny84's Vcc and GND pins when the serial line is attached. Apparently that is sufficient to turn it on, since my debug LED starts flashing dimly.

Is there a simple way to keep the Attiny84 off even when the serial cable is attached?


texts:
I've been working with fpgas for years, and always used synchronous resets for every parts (that need it) of my circuits. It helps the circuit to be globally reset at a given clock cycle.

However, I was told that in ASIC circuits, people tend to use asynchronous reset everywhere. I'm wondering why, and if it is the case in some fpga designs too. I would love to hear professional opinions.

Thanks


texts: Is there a need for a third transistor in a NAND gate?

texts:
I was attempting to create my "own" NAND-gate S/R latch using NPN transistors (I know there are ICs available for that)

From my own knowledge of how transistors work, I came up with this circuit for a NAND gate:

simulate this circuit – Schematic created using CircuitLab

I also encountered a different approach when looking for implementations on the Internet:

simulate this circuit

It seems to me that the 3 transistor variant could have its uses. I did recognize it as an open collector, so I assume it should be used when the output signal should be different from the voltage at SW1's collector.
In the example, both SW1 and SW3 use 5V at the collector, so it is not really necessary I think.

Is there another reason why I would need a third transistor?


texts: Bipolar Junction Transistor problem. Where did I go wrong?