texts: How to detect when DC motor stalls so that it can be turned off?

texts:
When a DC motor gets stuck and can't spin anymore, its current usage increases.  What I want to do is to detect that current increase and turn off the motor.

My motor current is 180 mA.

Is there any way to use Hall effect sensors for that?

Do I need arduino, or can I do it without programing?

If possible, please direct me to a example circuit or article to explore more about this.


texts: How to calculate the current in a PWM LED driver circuit?

texts:
I've been fascinated by the simplicity of the driver circuit based in the YX8018 in the prominent solar garden lights, they were able to simplify the circuit a lot in a simple boost topology by just running at fixed frequency and using the LED as the output rectifier. I was interested in building my own circuit using a 555 timer driving a small transistor, just to learn more about the topology, but in my research I was not able to find a equation, or at least a simpler explanation between the frequency, input voltage, and inductor value to be able to calculate the output current to the LED. Could someone help me understand how I can calculate the output current given these parameters?

The closer I got to an answer was by reading the SLVA372C App Note, in the equations section, the inductor ripple current:

$$
\Delta Il = \dfrac{Vin \times D}{f \times L}
$$

Plugging the values I tested on my solar light's circuit:

$$
\Delta Il = \dfrac{1.5 \times 0.5}{200000 \times 330 \times 10^{-6}} = 0.0107
$$

But when I measured the current to the LED using my DMM I got 6.3mA.


texts: LTspice - analyze current with varying resistance

texts: I would like to graph current from V1 over varying resistance instead of voltage.  Is there a way to do this?


texts: Smoke detectors replacing - why? Lifetime of components?

texts:
I often see that smoke detectors "should be replaced" every 5, 10 or 20 years. Like on this website for example: http://modernsurvivalblog.com/health/did-you-know-smoke-detectors-expire/

  The U.S. Fire Administration says most smoke detectors installed today have a life span of about 8-10 years. After this time, the entire unit should be replaced.

I wonder why? It probably has nothing to do with half-life of Americium 241(because it is 432 years), so what is the reason? I though about electrolytic caps, but mine for example has only one and its lifespan is often much higher than 10 years(if it is not piece of crap). I don't see any other electronic-related problems with the circuit in this things, it is pretty easy and hardly anything can break inside if it just sits on the ceiling doing nothing 99% of the time.
Is there logical reason or is it "just in case"?


texts: How does a filtering capacitor smoth a changing current?

texts:
Lets assume,in picture blow, the current be in its peak voltage moment. then when the current begins to fall (assume a moment after the peak moment) we know the current is blocked by diodes (actually two diodes) and then the cap discharge its stored charged to load. my question is why diodes block this current? Why the diode doesn't allow the rest of falling voltage current to go into the load?
Is this because of the fast rate of voltage chaining for this falling voltage current?


texts:
I have a current sense amplifier (TI INA303, the 50V/V gain version) that I want to read with a microcontroller. I've looked all over the place trying to find how to select the proper clamping diodes that will make sure the output of this doesn't get too high and destroy my microcontroller.
What type of diodes do I need to use to protect my microcontroller from getting fried? It is a Microchip SAMC21 running at 3.3V. I've seen differing opinions on Zener vs Schottky, and have no clue what voltage the zeners/schottky diodes need to be rated at.


texts:
I recently made a small board in eagle (my computer wasn't able to run circuit maker) and I sent the board to be manufactured. It was a simples 2 layer PCB.

I noticed that the vias connecting top and bottom were OK, there was connection, but when I tried to check for continuity between the jtag connector and the microcontroller there was none (the JTAG connector is through hole and the microcontroller SMD and I connected them viathe top layer)

As you can see this is bad because I can't program my board unless I do some ugly jumpers, is there a way in eagle to do plated through hole pads for the pins of a connector?


texts:
I'm currently using a dual-input AND gate similar to the Texas Instruments SN74LVC2G08.

I'm wondering if any manufacturers make an AND gate with internal pull-ups so the inputs would default to TRUE when the device driving them tri-states. If so, can anyone point me to an example?

Thanks.


texts: Connecting a 9V IC's I2C interface to 3.3v Arduino DUE

texts:
I need to connect a TDA7312 to Arduino DUE's I2C interface via SDA/SCL.

TDA7312 operates on 9V, Arduino DUE is 3.3v. Is it possible to safely connect it, without burning it? Or what should I use (level-shifting perhaps?), what's the correct way to do it?

I saw few schematics for 5V <-> 3.3V, but nothing for higher voltages.


texts: Using and Understanding Avalanche Photodiodes

texts:
I have a low light source that I would like to convert to an electrical signal. I have tried the pin silicon photodiodes without success. I believe I need an Avalanche Photodiode to make my project work. I am not an electrical engineer, so I need help and advice before I purchase. I would like the APD to collect light in the visible range.
I have noticed that the APD has three pins. Is the third pin and input? Will I need a special power source to supply the APD?
I have noticed that range finder APD are much cheaper than other APD. Do they have any value other than for range finders?


texts:
Is it possible to turn a laptop battery into a power bank?

I have seen video tutorials and articles on how to turn AA Batteries into power banks, however, no one has created a power bank using a laptop battery. Is it possible? Will it shorten considerably the battery life of the laptop battery?

I want to turn a laptop battery to a power bank, and when all of the power of the battery drains, charge it by inserting the battery back to the laptop, and plug the laptop into a charger.

Will it be possible? And if it will, how?


texts: Led charge indicator for small supercapacitor (1F x 5.5v)

texts: I have been playing around with a supercapacitor, 1F rated 5.5V. I charge it mostly through USB, which usually takes a couple of minutes to reach a good amount of energy. I have been thinking about a way to indicate when it is charged, and it doesn´t need to be super accurate. Anything with a transistor and a couple more components would do.


texts: Understanding asynchronous and synchronous in digital design

texts: Where's a good place to start in find any resources in understanding exactly how asynchronous and synchronous works in digital design?


texts: Electricity is "flow of electrons". My child asked me if this is so, then ultimately the copper wire should disappear/vanish/finish because the matter is moving from one place to the other. I am not electrical engineer, what should I tell him?


texts: How can I maintain a fix voltage until my battery is almost dead?

texts:
I am experimenting with a simple circuit. I have an Arduino board, a proto-board and an IR sensor (that uses electricity from the Arduino board). I use a 9V battery to feed the Arduino.

My problem is that when the voltage in the battery drops to about 6V, the sensor and the Arduino board don't work anymore. I suspect that is because the voltage used for the logic (since the sensor is fed from the Arduino board (3.3V pin)), is not enough for both components.

I'd like to be able to use an electronic component to stabilize the voltage coming out from the battery while preserving the same voltage for the board and the sensor, 'till the battery dies. Would a capacitor do that for me? If not, what should I use instead?

Thanks.


texts: Transformer vs. switched-mode power supply

texts: I'm working on making my own bench power supply, I want up to 7-8 amps. The switched mode power supplies are much cheaper than the transformers. Why would one choose a transformer instead of switched mode, if they're more expensive and heavier? Is longevity really the only reason? Is a 15v, 8 amp transformer better at pushing its 8 amps than a 15v, 8 amp switched-mode power supply?


texts:
I am trying to program an 815A HAL sensor made by Micronas. I read the datasheet and made the following bitbang to read a register value.
No success!
Has anybody here worked with this sensor?


texts: Key differences between solar-cells used for terrestrial and space applications

texts: I'm looking for some of the key differences in materials for solar panels used in terrestrial vs. space-based applications. I have read the GaAs is common for space applications due to its relatively high efficiency. I'm hoping a few people in the industry can comment on the analyses used to determine what type of panels are chosen for a particular mission, whether or not 'terrestrial' technologies are ever used, and what the relative efficiencies are between the materials we use on earth vs. in space.


texts: What is meant by "adjustment of the output gain and offset" of a Force Sensitive Resistor interface circuitry?

texts:
A FSR (Force Sensitive Resistor) is a sensor which lowers its resistance when there is force upon it. At idle state (no push force) it has a high resistance (~ MOhms)
Interlink Electronics has provided a guide for using FSRs and explains some interface circuitry there.
Suppose we use figure 9 (schematic below)  (Note 'g' actually means 100*N (source: Adafruit's FSR page):

Following the guide, there is a section titled "Adjustable Buffers". Here are my questions:
1- Why should we use an OpAmp? I guess buffer causes the sensor pin not to see Vout's impedance and vice versa. If sensor is in IDLE, R_FSR is ~MOhms and RM pulls the voltage to ground. So, high source impedance of FSR should not matter?

2- What is meant by "adjustments of the output offset and gain"? Exactly, what "offset" and "gain" are we adjusting?

3- In figure 11 (shown below) it is stated : "Typical cal for R5 and the pot are around 10kΩ.". Why R5 is put twice in the schematics? What does it even mean for a potentiometer to have a sigle resistance value?


texts: How can I multiply square wave circuits?

texts:
I would like to generate a signal that consists of a 1 kHz signal, which switches to a 100 kHz signal, flipping from one to the other at a rate of 10-100 Hz. I have access to signal generators to produce each of the three input signals.

How can I combine (mulitply?) the three signals to produce the desired product signal?


texts: Relationships between instruction execution and clock cycle in modern CPUs

texts:
I have some misunderstanding about what clock cycle really is. I generally understand a schema how CPU processes an instruction. Intel manual describes the schema for Intel NetBurst architecture as

• Prefetches instructions that are likely to be executed
• Fetches instructions that have not already been prefetched
• Decodes instructions into micro-operations
• Generates microcode for complex instructions and special-purpose code
• Delivers decoded instructions from the execution trace cache

So execution of single instruction involves pretty much of work from front end. Then goes uops executing by out of order backend and then instruction is being retired.
Looking at Agner Fog instruction latency https://www.agner.org/optimize/ we have that add x86 instruction requires 1 core clock cycle. I don't understand how all this front end, backend and retirement job fit in a single clock cycle.


texts: Peltier heat resistor temperature controller, schematic issue

texts:
I've been having a problem with the following schematic:

What I need to do:
Two temperature controllers in order to create a temperature gradient. The hot side is a a little above room temperature and is realized with a copper wire (about 5 to 10 ohms). The cold side is realized with a peltier element. Each temperature is measured with an NTC. A python script plots the temperature in real time (pretty much).
With my lab power supply I tried each temperature control separately. For the Peltier, it worked best with a voltage of about 3.2V (current would go up to about 1A at times). The Arduino PID-library does a bit of calculating and a PWM signal controls the MOSFET Q1. So far so good. (I know PWM is not the best option for a Peltier, but it works and since I don't need to cool down for much it's ok..). The heat resistor need something like 6 or 7 V to have enough power. Same here: PID, PWM to MOSFET.
My problem:
I need to operate everything from a 12V power supply (2.2A max). Since I have a couple of LM317 I though I would just use them to generate the 3.3V and the 7V from the 12V supply. But somehow this circuit is not working properly and I wonder if I missed something fundamentaly here.
It seems that the PID of the heat resistor doesn't somehow work anymore when Peltier and heat resistor are connected. It keeps getting warmer and warmer. Also, the peltier doesn't reach the desired temperature, although it is trying to. Why is that?
Also the LM317 are getting very hot. Is there a nicer way to do it?
My question:
Is this circuit supposed to work? Is there a better idea of how I can achieve my goal?

Edit:
Hm, instead of the LM317 I found another DC supply (2.4A/5V - Apple USB charger). Since the Peltier has a maximum rating of 7V that should work as well. I haven't received the inductance yet, so I still try to get things working as it did before (PWM).
Here is the new circuit:
Now, the Peltier cools down very very rapidly although the MOSFET should be blocking the current at some point. What is going on? also the heat resistor is just warming up super fast. I just don't get what's happening. It's like the MOSFETs don't work anymore..


texts: Smallest touch that can be detected on smartphone touchscreens

texts:
Not sure if this is the right place to ask this question, but what is the smallest touch (in terms of height and width) that can be detected on most smartphone screens (capacitive touchscreens found in typical high-end phones)?

In other words, what is the touch resolution of these screens?


texts: Can Thunderbolt be used to power the host device?

texts: Could the Thunderbolt interface be used to provide power to the PCIe host device? In this case, this would be a battery-powered mobile device, connecting to a range of peripherals. Thunderbolt here would serve as the extension connector, basically obviating the need for a dedicated docking solution, but the big question is whether the power can flow back to the mobile device without using a separate microUSB plug for that purpose. I'd be extremely grateful for some (preferably sourced) explanation of whether that is possible or not, as my own reading on both Thunderbolt and PCIe failed to give a definitive answer either way.


texts: How to switch an LED using logic 0 and 1

texts:
The PL2303HX is used to convert USB serial bridge controller.

I would like to connect an LED to TXD pin so that it lights when it is logic 1 and off when it is logic 0.

PL2303HX

PL2303HX datasheet

I would like to consider 5mm white LED (3.3v,20mA).

Can I directly connect the LED anode to TXD with a resistor and cathode to GND.

Does it affect the baud rate?

Is it safe to draw 20mA from TXD pin?

Is there a better way to light the LED using Vcc(5v) as power source and TXD as on and off like-

EDIT

I tried above circuit, but getting error.

I want the LED to turn off when logic 0 and turn on when logic 1. LED is powered by 5v separately. It should switch at the rate of 9600 baud rate.


texts: The relations of the value of the constant of integration is zero between a DC component

texts:
I've been may asking the really easy question.
The circuit which was made of the AC source and the coil exists.
\$L:=\$self inductance of the coil.
\$v(t):=v_0*\sin(\omega t)\$ (The voltage between the terminals of the coil.)
\$i(t):=?\$ (The current which flows through the coil.)
We want to know the current which flows through the coil.
\$v_L(t):=-L\frac{di}{dt}\$ (The induced EMF which arises at the coil)
\$-v_0*\sin(\omega t)+L\frac{di}{dt}=0\$ (kirchhoff's voltage law)
\$L\frac{di}{dt}=v_0*\sin(\omega t)\$
\$\frac{di}{dt}=\frac{v_0*\sin(\omega t)}{L}\$
\$\int1\frac{di}{dt} \frac{dt}{1}=\int_{}^{}\frac{v_0*\sin(\omega t)}{L}\frac{dt}{1}\$
\$\int1*di=\frac{v_0}{L}\int_{}^{}\sin(\omega t)dt\$
\$i(t)=\frac{v_0}{L}\frac{(-\cos(\omega t))}{\omega}+C\$  (\$C\$ represents the constant of integration)
\$=\frac{-v_0}{\omega L}\sin(\frac{\pi}{2}-\omega t)+C\$
\$=\frac{v_0}{\omega L}\sin(\omega t -\frac{\pi}{2})+C\$
The below statement is the problem for me.
The textbook substituted \$0\$ to \$C\$ and states that the dc component is assumed as \$0\$ .
Currently I'm unable to get why the value of the constant of integration is zero and the meaning of dc component in this circuit.
Can anyone tell me some idea(s) or the website(s) which describe(s) of it?


texts: Can laser diode be operated with lower than specified voltage?

texts:
This is kind of a silly question, but please bear with me.

Could I operate a laser diode, which accepts an input of voltage of 5v according to specifications, with a 3.7v battery, just in order to get some sort of a beam out (doesn't need to be at full intensity)?


texts: Estimating Safe Pulsed RF Power given Continuous Wave Power Rating

texts:
For a university project I am designing a RADAR transmit/receive module at 9.4 GHz. Right now I'm working on an input power limiter to protect an LNA, but my colleague designing the LNA quotes its maximum input power at +0 dBm. I've been so far unsuccessful in designing a PIN diode limiter to this specification, but I noticed that the power rating provided was for a CW signal.
My question is this: would the LNA be able to withstand a pulsed signal with a peak power greater than the CW rating? And if so, how can I estimate a safe limit for pulsed power knowing the pulse width and PRF of the input signal?


texts:
For a sine wave,

Amplitude is the fluctuation or displacement of the wave from its
mean value.
Peak-to-peak (pk-pk) is the difference between the maximum positive
and the maximum negative amplitudes of the wave.

Then why oscilloscopes display almost the same measurement values for both Amplitude and Peak to peak of a sine wave?

Here is my test screenshot on Agilent InfiniiVision MSO-X 3014A oscilloscope:

Here is the oscilloscope manufacturer's definitions for the measurements "Peak to Peak" and "Amplitude" in their user manual:

  Peak-Peak

  The peak- to- peak value is the difference between Maximum and
  Minimum values. The Y cursors show the values being measured.

  Maximum

  Maximum is the highest value in the waveform display. The Y cursor
  shows the value being measured.

  Minimum

  Minimum is the lowest value in the waveform display. The Y cursor
  shows the value being measured.

  Amplitude

  The Amplitude of a waveform is the difference between its Top and
  Base values. The Y cursors show the values being measured.

  Top

  The Top of a waveform is the mode (most common value) of the upper
  part of the waveform, or if the mode is not well defined, the top is
  the same as Maximum. The Y cursor shows the value being measured.

  Base

  The Base of a waveform is the mode (most common value) of the lower
  part of the waveform, or if the mode is not well defined, the base is
  the same as Minimum. The Y cursor shows the value being measured.

  (Content from the user manual © Agilent Technologies, Inc. 2005-2013)

I know oscilloscopes are not all about symmetric signals. But I can't understand the following.

What are the two separate different quantities that the manufacturer intended to measure from these two measurements?

What are the applications of measuring those two quantities? Please explain.


texts: How to approach the SNR needed for this electronic instrumentation

texts:
I have an issue with using concept of SNR in many instrumentation. To ask the question more clear, I want to go with a particular example.

Let's say a Wheatstone bridge type 500N nominal force transducer similar to this one signal is amplified with this special industrial amplifier(HBM-AE101). We can set the gain of the amplifier such that +/-10N force variation can be matched to +/-10V analog voltage output. +/-10V is the range of the 16-bit data acquisition board.

Now my problem is what SNR should be aimed. What determines the target SNR and what is adequate? Do we need the resolution information of the analog output and decide about the SNR needed?

I'm kind of lost what questions to be asked and how to start with this. Could you give an example how to approach such instrumentation based on the information I provided.

Let me ask this way, if I'm after a resolution of 100mV variation(coming from the transducer amplifier) what SNR is adequate?


texts: Solid State Relay Stuck in Closed Position

texts:
I'm building a simple circuit to control a 100W that takes 30-34V using a 30V LED power supply with constant current of 3.2A. I am controlling the switching of the LED with a Crydom DC60S5 connected to an Arduino Yun and the LED power supply with the following wiring:

Here is a photo of the actual wiring:

The problem is that when I plug in the power without even connecting the Arduino (nothing connected to terminals 3 and 4 on the relay, just as seen in the picture) the LED switches on. I've double checked that I have the DC60S5 relay, not the DC60S5-B which defaults to closed. If the circuit is unplugged and I do a continuity check with my multimeter across terminals 1 and 2 I don't get any beeping, and measured resistance is too high to register. If I put a 9V battery across the inputs the resistance drops to 60kOhm. This is confusing since 60kOhm is the AC impedance as stated in the data sheet, but I have the Crydom DC60S5 not the Crydom DC60SA5 which is the AC controlled model of this relay so I would have expected to get 1.5kOhm resistance as stated in the data sheet for DC control.

The relay doesn't seem broken, since I can still control it with a battery and measure it turning on/off. However without anything connected to the inputs it defaults to on which is not the expected behavior. Can anyone point me in the right direction as to what I might be doing wrong here?


texts: Troubleshooting Power Issue in Bernina 290 Foot Pedal

texts:
I have a Bernina 290 foot pedal for a sewing machine that started to only work at full throttle or nothing. I opened it up and found the way that the circuit regulates speed is with what I believe is a sort of variable resistor using a carbon strip to vary resistance depending on how far the pedal is pushed down.

When the pedal is pressed the white piece with two connected carbon rods makes contact with both sides of the strip on the circuit board completing the circuit. Depending on where it is on the strip (either high up or low down) the machine will run slow or fast.

Why does it only work on the bottom part of the strip? It does not touch the metal rivets at the bottom so I know that the carbon strip works there but it will not work at the top.


texts: Why spark arises on electrical junction box

texts:
A week ago lightning occurred in my area and computer monitor got burnt. From months the fuse producing sound whenever i turn on any home application, is the fuse weak ? And what is the cause of electrical spark , what I am asking is which one makes the device damage , the earth connection or phase or neutral. Or the combination of any of these. Am scared to plug my smartphone because of these , help me out

Excuse if any wrong in question


texts: Massive pk-pk ripple on output using isolated DC-DC converter module

texts:
I'm having a very odd issue using an integrated DC-DC isolated converter module.  As the module stabilizes, a massive pk-pk ripple is developing on both the output and the input.  At first we thought this might be induced by characteristics of the circuit it was supplying or its own supply, but even after completely removing the module and simply using it to drive a resistive load we are still seeing this symptom.  To be clear, the module does output exactly an average 4.995VDC given a 48VDC supply, but the ripple is 1.29V pk-pk!  Has anyone else seen this behavior before that might be able to offer some clues?  Scope shots and details below:

DC-DC Module

PN: SHHD003A0A Datasheet
Mfg: ABB Embedded Power
Input Range: (4:1) 18-75 VDC
Output: 5 VDC / 3A

Test Setup

DC-DC alone on a perf-board with oscilloscope prove connected across VOut+/VOut-
BK Precision supply providing 48VDC to VIn+/VIn-
Trim and Remote ON/OFF disconnected (open circuit)
1kOhm Resistor across VOut+/VOut- as "load"

This is a scope shot from VOut-.  Pk-pk noise is 1.29V.  The periodicity of the transient exactly matches the switching frequency of the DC-DC.

This is a shot from VIn- where a similar transient is observed 6.67V pk-pk noise!

UPDATE 1

-- Removed for simplicity --

UPDATE 2

To take our particular application circuit out of the equation, this is the test setup I am using (constructed using the shortest possible soldered connections on a perf-board):

There seem to be two issues contributing.  One is the bench-top power supply being used which itself introduces significant ripple.  Second is defeating the DC-DC converter's isolation by shorting VIn- and VOut- together.  The three images show each condition.  Even the 180 mV pk-pk noise in the best case (powered by battery), while potentially acceptable in the application, is double the datasheet specification (75 mV)!

It just gets worse from there. Ripple is 460 mV pk-pk when the DC-DC is powered by a bench-top supply (with identical results from several other switching AC-DC converters I had lying around).  Finally, ripple worsens to 1030 mV pk-pk if VIn- and VOut- are shorted to defeat isolation and bring input and output ground to the same reference (while powered via battery).  What's going on here, is it possible this is just a marginally stable poorly designed DC-DC module?

Powered by battery, maintaining isolation:

Powered by BK precision bench-top supply, maintaining isolation:

Powered by battery, with isolation broken using an 18awg wire short directly from VIn- to VOut-:


texts:
I am designing a digital output circuit.
I got confused about the position of the current limiting resistor of the transistor.
I would like know where it should be. (After or before the pull up resistor.)


texts:
I want to drive the IRF9530 P-Channel FET with 5V PIC microcontroller. My load is 3.2A. schemtic shows one row in my LED matrix. Scanning @ 1/16th rate, so peak current per LED will be 64mA and the average will be 4mA. When one or two LEDs light up in a row, they are bright. However when more LEDs light up inthe same row, they are dimmer.

Can the FET can supply require current with the given gate voltage?
Is there any simple modification to be done within the given hardware, to supply the required current?

I cannot use another driving transistor to drive the FET (because I have a PCB). Also I cannot find logic level MOSFETs in my area.

Minor changes will be preferred.


texts: Expected repeatability of PT100 temperature sensor

texts:
I'm designing a circuit to measure temperature using a PT100 sensor.

I'm putting 1mA through the sensor, and measuring the voltage drop. Assuming a perfect voltage measurement, what would be the repeatability of the measurement?

I'm thinking that any PT100 sensor is going to have a ridiculously good inherent repeatability and very low noise, and that all noise will come from the voltage measurement circuit, cables etc. Am I right in thinking this, or is there significant inherent noise in the PT100 element?


texts:
I'd like to add some kind of illumination to the buttons on my project. To that end, I was thinking of illuminated pushbuttons, with built in LEDs. However, the ones I found are very big (I'm looking for small microswitches, or at the largest 6mmx6mm tactile switches) and/or they use 120V/240V neon bulbs, not LEDs, and are designed to switch mains.

I was also considering getting transparent switches (made of clear plastic of one form or another) and putting LEDs underneath them. The idea is that the project can be used at night so a green or orange colour would probably work well. Does anyone have experience with this, have you done something similar, what types of buttons did you use?

Something like these but with LEDs in them.

Please note I'm not looking for specific part numbers - those would be helpful though - but instead ideas on how to accomplish this and types of switches to be looking out for.


texts:
In my project, this section is faulty.

I'm doing a bit-banging operation with shift registers and I'm trying to make shift register data reset after 15 bits are shifted out from the micro controller. I connected the CLR lines of both 74HC164's in my project to pin 4 of the 74HC02 shown here. I know I could have used inverters but nor gates were what I had.

As I test, I notice at least a few times the reset operation on the 4024 not working. I verified this by temporarily connecting an LED from each output (one at a time) to ground through a 180 ohm resistor. Power supply is 5VDC.

I did try adding 1K pull-up resistors to the clock, reset and pin 5 of the nor gate and that did not help.

The purpose of this particular circuit is to reset the counter and shift registers (shift registers not shown) every 16 clock pulses made to the 4024.

Why is my 4024 behaving so strangely and how can I fix this?


texts: Only detect the phase of a sinusoid multiplexed with other sinusoids of different frequencies

texts:
Is there an easy way to detect the phase of a sinusoid that has been added to other sinudoids of different frequencies (through a frequency-division scheme) without using a superheterodyne receiver accurate enough to reject all other signals? All sinusoids in the system have the same amplitude, and their frequencies and phases (other than phase of sinusoid in question) are precisely known. I was thinking that we can use a wide-band filter, and as long as I know the behaviour of the filter precisely (how much of the neighboring signals it admits, etc.), I can post-process the output of the filter in some way.
The system is currently set up so that the multiplexed signal passes through a filter, and then a phase difference detector (AD8302) compares the filter output's phase with a reference signal appropriate to that frequency.
EDIT: It's good to hear back! To clarify, the goal of the system is to detect the change in phase difference. The target sinusoid will change its phase with respect to the reference phase (very slowly) over time due to some chemical process. We would like to monitor this phase change. The absolute phase between the target sinusoid and the reference is irrelevant to us, and so is the filter phase response (since it equally applies to the signal before and after phase change). All components are analog, and the high frequencies of the sinusoid is currently preventing me from sampling the multiplexed signal and from using DSP techniques directly on the multiplexed signal.


texts:
A google search of "doppler extent", Where I found the term:

Extracting Target Features from Angle-Angle and Range-Doppler Images

1993 - Cited by 5 - Related articles
Doppler extents (as for angle-angle images) by using the estimated target dimensions. Image Scene Analysis. The goal of target feature extraction is to obtain ...


texts:
I came across this piece of code for an LPCxxxx microcontroller, in the reset routine.

do {
    const uint32_t topOfStack = (uint32_t) &_vStackTop;
    __set_PSP(topOfStack);
    __set_MSP(topOfStack);
} while(0);

I was wondering why this is inside a do-while loop (which executes only once) instead of writing those instructions in a straight-forward way (by which I mean outside the loop)


texts: How does an inverting op amp add a DC offset?

texts:
I'm working on a project based on this publication. I've built the circuit but something is not working.

I've tried checking the voltage with a multimeter (I do not have an oscilloscope at hand) and there is voltage before the band-pass filter (1-1.1 V). As expected, there is no DC voltage after the band-pass filter (black arrow).

But after the last op-amp the voltage should be in the 0-5 V range, according to the publication, which also says that the last op-amp introduces a 2.5 V DC offset to the signal. I think I should be able to measure about 2.5 V at the red arrow, but I consistently measure -0.6 V. Why? Also, I am using a -12 V source with a 72Kohm resistor,but this shouldn't matter I suppose (-12/72 * 15 = -2.5)?

Thanks!


texts:
Quick question here - are there any downsides to building a 3 input AND gate like this?

simulate this circuit – Schematic created using CircuitLab


texts: Finding output voltage of a circuit containing diodes

texts:
I am given a circuit below and I was hoping to clear up some misunderstanding I may have about conducting and non-conducting diodes. I am not sure which part of my knowledge is wrong, although I know that something is wrong as I have gotten the following question wrong. Below is my working out, alongside the question:

I have found that the diode connected to the 2V will be conducting, to which the output voltage will be 2-0.7 = 1.3V.

I have come to the conclusion that this diode will be conducting because it means that it will stop the other diode connected to the 8V from conducting as 2V < 8V.

Whereas if it had been the diode connected to the 8V that was conducting, then the diode connected to the 2V would also conduct, leading to two different output voltages...

I appreciate any help,

thank you.


texts:
I am currently learning how to use EAGLE. My end-goal is to have a simple PCB printed in China for a project that I am working on.
Since I don't have experience in designing schematics, what would be some design considerations that are considered "best practice" that I did not follow in my schematic?
In my design, the 22-04-1021 components are molex connectors, which I intend to solder onto the PCB to connect 4 force sensitive resistors (FSR1-4), a spring-applied brake (BRK), a signal wire and GND going to a different device (SIGNAL), and the 24V power for the brake. This leads me to two questions:

Is it correct to have the connectors in the schematic like this, considering that once I create the layout, that's where I would need the component's dimensions to create holes for soldering?

How should I manage the 24V connection and the associated GND? As I have an opto-coupler separating the microprocessor from the different voltage circuit, I cannot use the same GND symbol to connect the 24V grounds together. So I just connected the directly as there aren't too many of them.
To keep track of which of the two wires is supposed to be GND and 24V, I created a label for them, but that doesn't feel quite right.

Lastly, I intend to power the microprocessor using a seperate 5V power source rather than using the power from the USB. I hope that I chose the correct symbols in my schematic.


texts: Design review: SPI, ISP and multiple slaves

texts:
I am designing a small breakout board for an AVR ATmega8U2, which will allow me to learn about the AVRs, SPI, ISP and USB. In this process, I came across something I'm wondering a bit about: How to design daisy-chaining of the SPI devices.

I am intending to be able to use multiples of the same board as both Master and Slave, depending on a simple switch/jumper. Design option #1 addresses this, with a select switch determining which slave select-channel to connect to the chip's !SS-pin. The 1k resistors are there to isolate the SPI bus from when ISP is running.

My design option #2 (see below), creates one SPI Header where the board will be the master and one where it is the slave. This doesn't seem, well, a good enough solution. Each slave board I want to connect will need a header on the master board. I am neither restricted to only 6-pin headers, so option #1 will be able to provide several more slaves per header, even if Vcc and GND have to be a part of the connector.

In option #2, I will also have to hard-code which slave header I'm using at compile time, and move the connectors about if something needs to change while running. If I'm using option #1, I can simply rotate the chip select switch to the correct position.

I also want to be able to connect other SPI-peripherals on-board.

[All pin/port names correspond to the ATmega8U2. Pins PB[4..6] are simple outputs. PB0 is !SS on the chip, PB1 is SCLK, PB2 is MOSI, PB3 is MISO. PC1 is !RESET.]

1) Which of my approaches will work best? Am I violating any crucial rules about SPI?

2) Will it be necessary to have a GND-pin on the header, so as to provide a common reference point? Both/all boards will be powered from a 9V-battery, supplying a 5V-regulator.

3) Will I have to isolate the Slave Select Outputs from the header or switch via a series resistor or other means? Is it enough to never pull the slave select line the master chip it self is on low, or is there a hardware fix for this possible problem?

4) Is termination at each slave / master necessary? How can I go about to implement this, if necessary? Please bear in mind that maximum cable length will be 15cm, board to board.

5) How can I produce a cleaner, more readable schematic?

(Slightly messy question, please ask if anything is unclear)

EDIT: Fixed numbering.


texts:
I'm faced with a problem and looking for advice.

I'm planning on making a 5V battery pack from 18650 batteries (6 of them). I have no idea witch connection is better for this specific purpose.

I came up with these options: 3S2P; 2S3P; 6S.
I'd like to get a BMS for charging/discharging.
I will be using DC-DC converter, either step-up or step-down, depending on the battery pack voltage.
Primary target is capacity, then everything else.

Any advice?


texts:
I have one trigger which is a 200 ns pulse and a clock with 12.5 ns width and 50% duty cycle.

I have made 8 pulse each 5 V and 12.5 ns width.

I need to turn each LED for each of my pulse so when first pulse comes the first LED turns on and the second LED will turn on when the second pulse comes but the first LED will remain  on.

I want to use some transistor but I cant make it works.
i can use FF but not IC.

edit:
i need to turn on the leds each at time and make them stay on until at any time i get new trigger and then they will turn off and will turn on each at time again.
i just need take my 8 pulses and every pulse will turn on one led at time and keep them works until next trigger.
in the question they said transistor can help. i know FF can be usefull here.
Timing diagram.

               _   _   _   _   _   _   _   _              _   _   _
  Pulse    ___| |_| |_| |_| |_| |_| |_| |_| |_____.....__| |_| |_| |...
               __________________________________________   ________
  LED 0    ___|                                          |_|        ...
                   ______________________________________       ____...
  LED 1    _______|                                      |_____|
                       __________________________________           ...
  LED 2    ___________|                                  |__________|


texts: TTL-level camera with MAX3232 installed - is that really TTL-level or an RS232-level?

texts:
I've just recycled an LCF-23T CMOS camera (http://www.thaieasyelec.net/index.php/Sensors/Light-/-Imaging/4dsystem-JPEG-Color-Camera-UART-TTL-Interface-OV528-Chip/p_177.html) that the vendor describes as TTL-level UART camera. I don't know the original implementation, the mainboard it was connected to was missing.

My camera looks exactly like one from the link above, but because it has an MAX3232 (TSSOP-16) installed (bottom-right corner) I started wondering if the terminals are still TTL-level or maybe RS232-level?

There is a second model, that looks exaclty the same: http://lianchao.sell.everychina.com/p-90650675/showimage.html but doesn't have the MAX3232 installed yet still described as TTL-level. Something is wrong then.

I checked the terminals connections on my model and they are following (looking from left to right): Vcc, GND, TX and RX. TX and RX are connected to MAX3232's T2OUT and R2IN respectively so I'd say they are RS232-level.

In that case (provided the PCB is the same for 1st and 2nd model) how is that possible that without populating the MAX3232 the interface is TTL-level? I'd expect some of the terminals were connected to RxOUT and TxIN but they are not.

How can I check the signal levels with only multimeter and not damaging the camera?

If I connect it to RS232 and it is TTL-level it will be damaged, if connected to TTL-level device and it's RS232 it can damage the TTL device or at least won't work.


texts: ADC reliability decreases as inputs connected

texts:
I'm using a 4-channel analog to digital converter, the TI ADS1115. I'm reading the values off the i2c bus with a Raspberry Pi.

They worked ok for a few weeks- they read reliably about 95% of the time. Occasionally, all the channels would read random values for a few minutes, then they would go back to reading correctly. The devices occasionally disappeared off the bus, but that seems to be a known problem with the Raspberry Pi i2c bus.

Yesterday, they completely disappeared off the i2c bus. I can't detect their existence on the bus or read values.

Trying to debug the problem, they reappear when disconnected from inputs. As I connect each input, the probability that the ADC will appear on the bus decreases. With one input channel connected to voltage, the ADC will mostly appear available for read. With all four input channels connected to voltage (all within scale), it never appears available.

I can't explain this behavior- does it make sense to anyone else?

Update: Here's a drawing per request of what appear to be the relevant parts of the circuit. The green box represents stuff that is on a PCB. I've omitted other connections that make the whole thing a lot less comprehensible (mostly 3.3V GPIO), but I think these are all the relevant ones.

On additional testing, removing the 1-wire bus or running it on parasitic power resolves the issue. That suggests that the two communication methods are interfering with one another, perhaps through the 3.3v line. While this let's us fix the problem immediately, does anyone understand why this would be occurring so we can more thoroughly fix the problem?


texts:
I'm using a single board computer to talk on a phone line through two coils, one for the TX part, the other for the RX. The phone line is on another coil and then it's connected to a two-wire circuit that leads to an handset.
As you know, the problem with this config is that if you build a full-duplex communication system with VoIP in the middle, you hear the echo from what you just transmitted on the network coming back See this connection scheme

Is there a circuit which is able to reduce or eliminate such echo? Right now I'm using a DSP to implement a simple subtractor (Rx=Rx-Tx), but maybe this common problem has been solved by clever analogue engineers back in the past.

Connection scheme with echo path in red


texts: 480 VDC Series Battery Bank - Solar PV Charging Current Feedback Control Circuit

texts: I have a 480VDC Lead Acid Battery Bank (40 x 12VDC 50Ahr Batteries in Series) directly coupled to a 5.0 Kilowatt Solar PV Array [with an output range of 560-580 VDC and maximum output of 8.9 Amps). This simple coupled circuit works well but I want to add a feedback activated control device that limits the Battery Bank Charging Current to precisely 3.0 Amps maximum as the Solar Irradiation and PV Array Output Current varies. I am not concerned with the minimum Charging Current just the 3.0 Amp maximum. Any circuit suggestions would be appreciated.


texts: Determining AXI4-stream Data FIFO size, understanding Packet Mode?

texts:
I want to take a standard AXI4-stream Data FIFO IP core and use it for data frame encapsulation for both the Ethernet and TCP/UDP layers.
When packing a header onto the packets, I need to know the length of the packet itself. Let's say I'm getting a full message that is custom to my application, and I'm going to append a UDP header onto it. The design has an incoming axistream of the message itself, and the source and destination port vectors. A checksum calculator processes the incoming signal so there is a valid checksum by the time the entire frame is placed in the input FIFO. An FSM controls the transfer to the output FIFO which should have the input message plus the UDP header appended at the beginning. The steps for my FSM would be:

Wait for the entire message/UDP payload to arrive in the input FIFO. When it is done halt further writes to keep the checksum calculator valid
Write the source port byte and destination port byte from the other input vectors
Write the size of the message into the length field
Take the checksum calculator's output and write it into the checksum field
Fully drain the input FIFO into the output FIFO

Here I have an assumption: Instantiating the AXI4-stream Data FIFO with Packet Mode enabled means the FIFO will hold off on sending its data until it receives a TLAST indicating the entire packet/message is received. The Master tvalid signal will remain low until this happens. Is that right?
I know that I can just add a counter into my checksum calculator so that when the packet is received, it also contains the size of the message. This seems like a very common use case, so I want to know if there is something that inherently supports giving out a message size when the packet is complete. If I'm using my checksum calculator, I need to only allow one message in at a time so I'll AND the slave tready with the FSM tready out to the application's transmitting axistream to force stop another message coming in. I want to know if the FIFO can be set up inherently to refuse another packet until it is empty, or if that is also a behavior for Packet Mode, so that I would not need to AND the two tready signals.


texts: Peak current requirement for switching logic

texts:
Is there a way of estimating peak current requirements for sets of logic gates? This is to qualify the regulator.

I have a Gumstix Parlor board with a 1.8V regulator (MIC5247) at 150mA on it. This is available externally so I could power the 1.8V side of my interface board with that line. I currently have 3 level shifters (two 74LVC8T245 and one TXS0108) for a total of 24 lines.

I can guess at the total line capacitance given the LVC (6.5pF) and the OMAP datasheets (varying between 10pF and 60pF depending on what peripheral). If I call it 80pF max and then want any signal to transition in under 5ns I get I = C dv/dt = 3mA or so per transition. Multiplied by 24 = 70mA worst case.

Is this a really naive way of guesstimating the current load? Or should I just call it 100mA and provide my own 1.8V regulator? I don't have any real way of telling what the Parlor board uses itself for 1.8V...


texts:
With a uC, I can input analog voltage levels, how do I output them?

I have a simple Arduino Uno R3 I had picked up, which has a few of each pin types (analog input, digital output/pwm, serial) and require some sort of voltage output control.

For now it is to compare things in a hobby with a threshold (I have a few op-amps laying around for comparators) and just to use as a simple quick variable reference, or underpower devices and measure effects as a bonus.

What integrated circuits do I require to do this? I have not heard of it being within the Uno, unsure if it would need a DAC or something similar which may take some time to get in my situation.

I'd love this functionality to be built up, the less "1-step IC" and more "subcircuit" the better :)


texts:
I have a Microcontroller - S32K116 - 48 Pin IC. - Datasheet - Reference Manual
I have a Voltage divider (for input voltage monitoring purpose) connected to the Pin 16 (PTC3) of the Microcontroller.
Image :

I have NOT programmed my Microcontroller. But I have connected this Voltage divider circuit to the PTC3 pin of the Microcontroller in my board.
If I give 5V input to the Microcontroller and the same 5V for the Voltage divider, If I measure the output of the voltage divider, I am getting like 0.7V to 0.8V. I should actually get a output voltage of 2.5V, for input voltage of 5V, right?
But then I realized that since my Microcontroller is not programmed, there must be something to do with the default state of the pins (does default state means before programming the microcontroller or after releasing the reset of the microcontroller?) of the microcontroller.
I checked the Reference manual of the Microcontroller.
Note 1 :
On page 89 of the reference manual, table 4.3, it is mentioned as for "Other pins" - the default state is "High Impedance".
Note 2 :
On page 91 of the reference manual, there's a paragraph mentioning - "By default, ALT0 mode (configured by PTXn_PCR[SSS] as 3’b000)
corresponds to disabled functionality and pad represents disabled (highimpedance)
state. In case if the pad consists of analog functions, the ALT0 mode
corresponds to analog functionality once the analog module is configured to
enable corresponding channel/input."
My questions :

From the Note 1, can somehow like provide me a small illustration of what the "High Impedance" state of the Microcontroller pin would actually look like? (I understand that in High Impedance state, there is no current draw, but just want to know how the impedance state of the microcontroller pin would look like)

In the sheet, S32K116_IO_Signal_Description_Input_Multiplexing", I found like

I am not able to link this table with the Note 2 - paragraph which I have mentioned above.
a. What does default state actually mean? Is the state before the microcontroller is programmed? Or is the state after the microcontroller (once after programmed) Reset is released? What does the default state mean in this context and what does the ALT0 mode indicate? Since, my PTC3 is an analog pin, what is the paragraph in Note 2 trying to convey?

Why am I getting 0.7V or 0.8V instead of the required 2.5V when my Microcontroller is not programmed?


texts:
I have seen clock designs like this one:

where the nixie tube leads are not fully inclosed. There is likely 145-170V on these lines. I am just wondering if it's safe to allow the leads to be exposed and what sort of consequences there might be if someone accidentally touches them.


texts:
I used to work for a company that made power meters but only worked on the desktop application (user interface) side of things and never really learned completely how some processes occur, like the calibration process. So in order to learn something that I've always been curious about I decided to make my own power meter

What I know and what I think I know

I know some regulations that define the number of points per wave (for example, @60hz must have 64 samples) given a desired precision. I know the equation for Vrms, Irms, apparent power, active power, power factor, real power and these things I can measure in the hardware I made (one TP and three TCs, I plan to do a software phase shift for the other two voltages, which I would guess is not good enough for any standard, but OK, or else I can add a phase delay with capacitors at the input of the ADC ... also TCs are really expensive).

The thing is that I know that the obtained values are calculated using a calibration constant, so ... Vrms = Kc * sqrt(1/N*(v1^2+v2^2+..+vn^2)) and the same for current, so the other calculations that derive from this are subject to the calibration constants. From what I've been reading this calibrations constant is Kc = (real high voltage - read low voltage)/(read high voltage - real low voltage) and there is also an offset, which is calculated in a similar manner., so the above Vrms =Kc * sqrt(1/N*(v1^2+v2^2+..+vn^2)) + Ko, where Ko = offset????

The problem I know I'm facing

The problem that I'm facing is  how to implement the calibration process. According to a national standard O know that a device must be calibrated with another device (calibrator) that is at least 3 times more precise. So if I want to achieve 1% precision I'd need to calibrate it against a device that is at least 0.3%. I know that I'd need to calibrate it with PF=0, PF=1, PF=0.5 AT LEAST but I'm still unsure as to how I would calibrate it. My former company used a calibrator and then they had to write a program to send commands to it (change from delta to star configuration por example, change voltage, current, PF etc) and then they'd read both devices compare and generate a calibration constant. From what I remember it's not a very fast procedure, requires A LOT of math and I'm unsure as to how I'd learn about the necessary math.

What I've been told

Some people have told me that a calibration process is a well kept secret by companies, but that doesn't really add up, there must be a theory behind it and a base method that can be used and learned from books/internet and then after I gain the knowledge I'd be able to tweak the base method to achieve my goals.

What I want to know

Does anyone know about any good books/websites/articles about the calibration topic? I've been trying to research this but not having much success. And what about international standards for calibration? I know about ISO/IEC 17025:2005, but I think that only applies for laboratories that want to be certified and I just want to learn about how a real calibration process can be done for my meter. Or if you prefer you can answer me in detail  in the answer, but I think that'd be a lot to task

PS: I have a notion of what I need to know, but there are certainly more things that I'd have to really know before going forwards. I'm an EE with a few years of desktop applications experience and then I quit that job and I've been working as a firmware developer (more my area of knowledge)


texts: What standard governs the dimensions of SMT chip resistors and capacitors?

texts:
I am aware of the JEDEC registered outlines, which define the standard mechanical dimensions and tolerances for a wide variety of solid-state packages.

However, these standards do not appear to cover two-terminal SMT resistors and capacitors (e.g. 0603, 0805, etc.).  IPC-SM-782 has dimensions and tolerances for these, but this standard has been superceded by IPC-7351, which no longer includes this data.

What standard currently governs the standard dimensions of these components?


texts: Swap main terminals of zero-crossing triac

texts:
The question I have is maybe silly, but I cannot find strictly related info.

When designing a mains switch with an optotriac driven triac (or discrete SSR for you), during layout I swapped the terminals of the optotriac. In my circuit Line connects to Pin4 of U3 through resistors, and gate drive is Pin6, instead the other way around. Could it make any problems with the zero-crossing detector inside the optotriac? Should not I think, but every doc (datasheet, application note, etc) I find on the net does not swap these pins.

The circuit is here
Note: Main triac is a "Snubberless" triac as ST calls them, so leaving out their snubber is intentional, only phototriac is guarded!

The sake was the (hopefully) clean layout as seen. I have three more identical switch circuit to the left right connecting to the big Line and Neutral tracks. Grid is set to 1mm. Low voltage side connections not routed, passive values not calculated.


texts:
I want to transfer data from a full duplex serial device (TTL) to the PC. The data rate is 10Mbs , i am investigating potential solution. I can add a level converter like max232.
I have 2 questions:

HARDWARE :

My first thought is using a dspic33ep series (that supports up to 16Mbs) serial communication to receive data and using DMA and internal USB controller to transfer the PC , using HID or CDC protocol (i have not used USB on this device before) so it will be cumbersome.

In-order not to be reinvent the wheel: Is this doable ? Is there a product ready that can do this ? serial PCI rs232 card (although i haven't found a "MAX232" alternative that works more than 1Mbs) ??

SOFTWARE :

I usually use docklight or realterm to capture serial com port data at slower speeds, does the 10Mbs speed create problems on such software , is there a speed limitation for real or emulated Com port ? or is the limitation is the amount of byte per second rather than the speed at which these byte are sent (overflow issues)

Forgive me if the question sounds noob and I am also open to alternatives that are simple and time saving on this project.


texts:
Does anybody know whether it is possible to easily regulate the throughput of a DC water pump? E.g. one you would use for your pond or indoor fountain.

I would like to avoid lowering the duty cycle by switching on and off: one can get used to a continuous noise but a switched noise is irritating.

If I were to make an educated guess I would say that the pump uses a brushless DC motor. External leads are only +12V and GND.

So, would any of the following work without damaging / stalling the pump:

Switching with very high frequency, i.e. PWM
lowering the drive voltage statically
controlling permitted current draw

Which would give the best control over the throughput?

Note: the aim is to reduce the current draw and the noise of the pump.


texts: MCP73871 doesn't start to charge the battery

texts:
I use mcp73871 for charging LiPo battery.
This is my schematic:

Some settings:
-charge current 100mA via R15
-charge stop current 10mA via R14
-Charge enable high
-Timer enable set pull-up via R13(I'm not sure whether pull-up is OK for this)

When Battery disconnected VBAT output shows 0V (Only USB connected)

When Battery connected(also USB connected), VOUT is 5V, this means source selection succesful. But the circuit which is connected to MCP73871 consume power slowly and battery voltage decreases gradually. No signs of charging.

Indicator outputs aren't routed on PCB except STAT1.
Is there any missing or wrong connection on schematic, why the IC doesn't charge the battery?


texts: What Development board should I choose if my final target is STM32F030CC

texts:
I'm thinking of using a STM32F030CC for its 6 U(S)ART ports, but I can't find a development kit for that specific microcontroller. Is there another development kit that's compatible with STM32F030CC?

It doesn't have to have as many U(S)ARTs as I can make the application work with as few as 3 UARTs (but I want to be able to reuse the code on the STM32F030CC).

How do I choose a development environment suitable to eventually reach my target goals?


texts:
I know that i don't have to understand the internals of Op-Amp ic to be able to use it but it's just some curiosity.

Anyway i've found this file have some explanation of the ic internals "through the ages".

I came to this very first circuit and there's something i really want to get ,
the document says that Q3 solves the problem of the differential pair and make us get the full gain of the single ended output instead of half of the gain.

This is supposed to be done using Q3 which acts as an OpAmp inside the circuit but i don't get how, and it would be great if somebody explained it to me.

Thanks in advance..


texts:
I am trying to make an up/down counter on a Basys board. But I have some issues I can't figure out.

My code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity counter is
  Port (
    clock       : in  STD_LOGIC;
    clock_osc   : in  STD_LOGIC;
    reset       : in  STD_LOGIC;
    count_start : in  STD_LOGIC;
    count_out   : out STD_LOGIC_VECTOR (3 downto 0);
    AN1         : out STD_LOGIC;
    AN2         : out STD_LOGIC;
    AN3         : out STD_LOGIC;
    AN4         : out STD_LOGIC
  );
end counter;

architecture Behavioral of counter is
  signal count : std_logic_vector (3 downto 0);
  signal count2 : std_logic_vector (3 downto 0);

begin
  countupdown: process (clock, reset, count_start)
  begin
    if (reset = '0') then
      count <= "0000";
      count2 <= "0000";
    elsif (clock='1' and clock'event) then
      if (count_start = '0') then
        count <= count + 1;
      else
        count2 <= count2 - 1;
      end if;
    end if;
  end process;

  count_out<= count when (clock_osc = '1') else count2;
  AN1<='0' when (clock_osc='1') else '1';
  AN2<='0' when (clock_osc='1') else '1';
  AN3<='1' when (clock_osc='1') else '0';
  AN4<='1' when (clock_osc='1') else '0' ;

end Behavioral;

The errors:

ERROR:HDLParsers:808 - "C:/Users/sana4/Desktop/uni/Digital Design/Counter3/counter.vhd" Line 75. + can not have such operands in this context.
ERROR:HDLParsers:808 - "C:/Users/sana4/Desktop/uni/Digital Design/Counter3/counter.vhd" Line 79. - can not have such operands in this context.


texts: Issues with guitar effect loop switch pedal

texts:
I've developed a circuit and custom PCB for use in a guitar pedal effects chain. This takes the input signal and switches it between 3 distinct external loops, (A, B, C) such that you can arbitrarily switch between loops to three different pedals, and switching to any one will bypass the other two loop circuits. Only one loop can be active at a time.
I've set this up with solid-state relays so that say, a momentary switch press on A will

turn on the A circuit relay and latch it open, which routes the signal to that loop.
break the latch ground for the B and C relays, unlatching any that are on and switching the signal to bypass those loops.

I had some test boards printed and put everything together, and while the circuit switching fundamentally works as expected, there are some issues I discovered that make it not really usable in the current state:

Whenever any of the switches are pressed, there is a loud "pop" sound, louder than the relative volume level would be normally. I can't imagine it's good for the amp or anyone's ears.

The actual output signal volume is extremely attenuated to the point that I can't really use the switch even with the popping issue, because the relative volume of other effects (when I bypass this completely) would be way too loud if I turned up the amp to compensate.

It's worth noting that each effect return has a 100k volume pot to trim levels between the three effects, however the low volume problem doesn't change at all even when all loops (and thus the volume pots) are bypassed.
The signal input and output, and all three loop grounds are grounded to the aluminum case, as well as each volume pot. The 9v power negative is not grounded to the case, as it doesn't touch the signal chain ever. the 9v circuit only turns on the relays and LEDs. The DC power jack is plastic and is not grounded to the case (center negative).
Any clues as to what might be causing these issues? I've searched around and there are several possibilities it seems so I'm not totally sure which if any of them are the problem.


texts: What is the maximum number of devices a single PCI bus can handle?

texts:
During system initilization software enumerates the different buses, devices and functions with the help of two I/O Ports (CONFIG_ADDRESS 0xCF8, CONFIG_DATA 0xCFC) and two configuration cycle types.

Type 1 PCI Configuration Cycle

Type 0 PCI Configuration Cycle

PCI-PCI Bridge Numbering example

Now, when system software writes the corresponding value for bus number 1, device 0, function 0 and register 0 into I/O Port CONFIG_ADDRESS, the PCI bridge with secondary bus number 1 configured receives a type 1 configuration cycle with this information and creates a type 0 configuration cylce on bus 1. Because bits 31:11 are used to select the appropriate device with the help of the ID selection technique, every pci device on the bus has as IDSEL pin which is uniquely hardwired to one of 21 address pins, which correspond to bits 31:11 in type 0 configuration cycle. So bit 11 would select device 0, bit 12 would select device 1 and so on.
Now, every text, explanation, ... I have read, states that a bus can handle up to 32 devices which seems pretty obvious because in type 1 configuration cycles 5 bits (15:11) are used to encode the device number but in type 0 configuration cycles these 5 bits are mapped to one of the 21 bits of a type 1 configuration cycle. However, this limits the maximum number of possible devices to 21.
So what is the real device limit?


texts: Can anyone identify the resistors in the picture?

texts: Can anyone identify the resistors in the picture ?


texts: How is a synchronous 214 rpm motor for a 50 Hz mains possible?

texts:
According to Wikipedia at steady state, [...] the rotation period is exactly equal to an integral number of AC cycles. Now I have a brief description of a three-phase motor designed for 50 Hz AC mains claimed to run at 214 rpm (a 4 megawatt motor for a water pump).

So the motor has 214 rpm and the mains has 50*60 = 3000 oscillations per minute.

3000 is not a multiple of 214. How is such synchronous motor possible?


texts: GL850G-SSOP28 datasheet - Ferrites values?

texts:
I have found a circuit for using the GL850G chip to build a powered USB 2.0 hub:

http://pdf-file.ic37.com/uploadpdf_old/GENESYS/GL850G-SSOP28_datasheet_898289/146940/GL850G-SSOP28_datasheet.pdf

However, some datas are missing. I can't see the values of the ferrites LB1 to LB6. How can I get this information ?


texts:
I pulled apart an older augen netbook that ran windows CE. I was wondering what type of connecter this is. I just got my Raspberry Pi in the mail and was looking for a way to connect it for a project I have in mind. It did fit in the DSI, but with the second connector I am completely lost.

On the display there are some numbers, but a quick google search didn't yield anything.

BACK OF METAL DISPLAY CASING

H-T070L-18A-Q
H-T070L18A0009000000029687

ON THE RIBBON

LD91016023MTBF3


texts:
I have had some trouble identifying this piece of hardware, even with the help of the inter webs. I have disassembled the printer (Brother HL-2270W or a similar device), so getting it to run is a bit of an issue for me too, so. My questions is: what is this device? It obviously looks like it is a motor or servo or etc of some sort, but specific name would help. Then my next question would be this: can I somehow reuse it with, say, an Arduino Uno r3?

Note: I am new to this sort of thing, and so would not be surprised if something i ask is misrepresented in some way or vague. Thanks in advance for understanding.


texts: Why is parasitic capacitance much more mentioned than parasitic inductance in MOSFET?

texts:
It seems to me that in MOSFETs, parasitic inductance would be equally as important as parasitic capacitance. However, I have never seen anyone discussing parasitic inductance seriously.

Is parasitic inductance's influence on MOSFET operations not really important, or is of much smaller influence compared to parasitic capacitance?


texts:
I am working on an EVM for an electricity meter. Its manual says the EVM requires a known voltage and current source for the calibration.

I bought a power supply and measure the output of the PSU by a multimeter. But, it read the output with 1V difference. I assume the PSU might have a better accuracy but still doubt if the PSU has some inaccuracy (may be uncalibrated).

Is there any mark or standard for a PSU to show its accuracy? What type of device (PSU) do you use to calibrate a PSU or to have a known voltage/current reference?


texts: Why do batteries only have resistance one way?

texts:
I initially had this question because I was playing around with brine electrolysis and I found that the resistance is 0 one way (positive in negative cell) and infinite the other way (positive in positive cell).

I tested it again using a normal AA battery, and I had the same effect. When I measured the resistance negative-negative and positive-positive on the battery, it was infinite. But when I measure it through opposites, there is no resistance.

Why is there infinite resistance one way, and none when the polarities are flipped? Since it behaved somewhat like a battery, I assume the reason for the battery is the same for the electrolysis cells.


texts: Thermoelectric Generator Impedance Matching

texts:
I have a TEG that has an output IxV curve like this:

That should mean something like this:

I need a simple circuit to regulate the voltage around 12 V while enabling at least  ~10 W for some load I have (0,833 A)
My idea was to use a simple zener diode, a capacitor and a voltage regulator for the 12 V output

What do you think? for R1 I thought about 5-30 ohm,  for Zn1 30 Vbkd and C1 ~ 0,00001 F.
Do you have any comments about the layout or values?
Thanks in advance!


texts: Input impedance is higher in Common-Emitter than Common-Base?

texts: Why is input impedance is higher in Common-Emitter configuration as compared to Common-Base configuration  as signal is applied on Base-Emitter junction in both Amplifiers. Not in both configurations the resistances r'e and r'b will be considered?


texts: How to test for live wire in a car using an analog multimeter?

texts:
Let's say I cut my headlight harness off.
Inside the wire loom, there are three orange wires, like this:

I know one of them is for low beam, one for high beam and one for ground.
I have an analog multimeter I just bought. How can I use it to determine which wire is for low, which is for high, and which is ground?


texts: How can any spectral analysis show that Sigma-Delta ADC reduces quantization noise?

texts:
Quantization noise refers to the modeling of the difference between an analog signal and its quantized version as an additive noise process. The power of the quantization noise can be calculated by the assumption that the difference between the analog signal and the quantized signal is uniformly distributed inside the quantization level (the power is proportional to the variance of this distribution). Under this assumption, if you quantize to N bits, with uniformly separated levels, you get that the signal to quantization noise power ratio is about  6N dB.

Now, so far I haven't spoken at all about frequency or spectrum, since the quantization noise is added to each sample of the signal without regard to the sampling rate, or the frequency of the analog signal itself.

A Sigma-Delta ADC is known to reduce quantization noise. The explanation usually involves talking about high-pass filtering of the noise, and stuff like that. But I don't understand how anything can change the power of the noise, as it is still true that the quantized signal has an error somewhere within the quantization level, and by definition of quantization you can't get a smaller error than that (maybe the answer is that Sigma-Delta ADC makes the error not uniformly distributed?). And how can the frequency domain help to analyze this?

I would appreciate to see a concrete worked-out example with numbers/parameters that show how the Sigma-Delta ADC operates on a given signal, giving low quantization noise.


texts: Sending multiple channels with bluetooth

texts:
I have ordered my HC-05 BT modules. My question is this: Is it possible to send multiple channels over bluetooth. For example, stereo sound has two channels. I think i have seen people do this but i'm not sure.

If it is possible, could you please provide some more information on how its done? Thanks!


texts:
My question is related to impedance matching when using a function generator and oscilloscope to identify a type of passive filter, i.e. low pass, high pass, etc.

If I output a function sweep from a function generator with an output impedance of 50 ohms, to the DUT (unknown filter), and the output of the DUT is connected to an oscilloscope with an input impedance of 50 ohms, do I need any additional impedance matching components?

The minimum and maximum frequencies of the sweep would be dictated by the minimum and maximum measurable frequencies of the oscilloscope.  In addition BNC connections are being used to connect the equipment.


texts: power supply and transfering data from smartphone via jack 3.5mm 4pin

texts:
In my Project, I was wondering if I can use the 3.5mm jack (4 pin) to transfer data and as power supply to my small circuit?

So I'm just asking if it's possible?  and if yes, can someone tell me how to connect a a 3.5mm audio jack from smartphone for power and send/read data


texts: What is the required ground size for the S2LP RF module?

texts:
I'm designing a four layer board with an RC-S2LP-868-HA RF module which has a little helical antenna.
I have two question about that.
First, how do I calculate the required ground size for the RF module? It will operating 868MHz.
I have designed a 90 mm x 40 mm sized PCB, the GND size is 80 mm x 40 mm. I'm not sure that will good.
My second question is, that do I need ground islands on top and bottom side? Or this will cause some don't wanted effects?


texts: How does industrial application interface a switch that is several meters away

texts:
I am wondering on how the industrial section deal with situations where a button is several meters away from the controller.

Is there a device that specifically handle the debouncing/filtering/protection for the controller? I doubt that the PLC handle this by itself. What would it be called?


texts: Minimum operating temperature - Outer Space?

texts:
I've been looking at some microcontrollers and I've seen they've got some "weird" minimum operating temperatures, like -25 degrees or -10 degrees etc. But I can't really understand why there is a minimum, a maximum I do understand because everything melts down and breaks, the resistance increases making the signals too weak. But when you go to the cold side. Everything kind of gets better and better, the resistance gets reduced, everything gets more stable. But yet... the minimum operational temperature is -25 degrees... Why is it not 0 Kelvin?

Because I was thinking about the mars-rover and other satellites, when they are behind the sun they are operating at nearly 0-50 kelvin, the mars-rover... according to wiki it gets as cold as −87 °C (−125 °F). And this is still very much more cold than -25 degrees.

So, can anyone please explain to me why microcontrollers do have minimum operational temperature? The more thorough the better.


texts: Reading MODBUS RTU slave device Registers via RS485

texts:
i have a panel multimeter that i use for my whole house that has RS485, Modbus RTU comunication.
I know what registers to read in order to get currents, voltages, power factor etc
How can i use this and get the data to a PC, i have an arduino but i don't know how to get this started
I've tried using a RS485->Ethernet converter and then tried to send comunicate with the device via TCP-IP but it's rather difficult (this method would be the best, netowk conectivity ensures i can have the data parsed at my server)
I have sucessfuly conected an RS232 device -> Ethernet convertor -> PC, but in this case the device (a PBX) sends the data clearly in ASCII and it i manage it easily with a small Python program that reads the data and then puts it in a mysql DB
How would you reccomand to connect and program sometging like this:
Meter with RS485, Modbus RTU -> RS485 to Ethernet convertor -> PC with python script getting all the data (it's gonna have to be a lot of HEX coding that i would need a getting started point :D )


texts:
I am reading this great website.

I don't understand the topic #4.
I don't see how the current will flow back to the battery, and how the Q2 enabling changes the circuit. As far as I can see, the current will use the diodes to flow, so why turn q2 on? Why just don't use Q1 and D2?


texts: Difference between difference between bc547 and 2n2222

texts: What is the difference between bc547 and 2n2222A transistor.  I have use bc547 for a project (Water level indicator). Can i use 2n2222A instead of bc547? How each transistors are selected for each project?


texts:
Is it possible to shift the phase of a square wave (which is generated by an arduino ) with passive components?

I have a 0 to 12v square wave that I would like to split into several phases. The idea is to send the original square wave to load 1, and a 60° shift to load 2, an additional  60° shift to load 3, and so on until I've got 360°.

I also have a 0 to -12 square wave that I would like to apply this to as well.


texts: I am trying to minimize interference in a sensor project. Can anyone recommend a good shielded wire I can solder into my board?


texts: Why does a delta/wye transformer make 30 degrees phase shift ?

texts:
I'v heard that a delta/delta or Wye/Wye transformers do not make any phase shift. In delta/wye or wye/delta transformers, There is a 30 degrees phase shift between the primary and secondary coils. So, Why is  there a phase shift ? and Why is it 30 degrees ?.. Why not 60 or 120 ?

I googled and I found calculations with phasor diagrams that proves the 30 degrees phase but I'm confused because of too many calculations and diagrams, I didn't get it.

Would you give me a simple answer, please ? and I prefer the physical meanings and concepts rather than equations and mathematics.

Thank you very much,


texts:
There is a related question similar to mine: Op Amp input protection,
but I found this other configuration:

where the series resistor is placed after the TVS diodes.
What is its purpose? The input signal is expected to be near DC and low-impedance. So I don't think it has to do with bandwidth or input impedance/offset.
It could be a further protection of the op-amp inputs if an ESD event happens on J8?


texts:
I have been trying to debug this circuit for the last week but still cant seem to find the issue. The circuit I have is shown below:

This circuit was implemented based on this paper
The idea of the circuit is that there will be two cycles, charging and balancing cycle. In the charge cycle, Q2 closes, Q1 opens and therefore only C2 will charge. then Q2 opens and Q1 closes and therefore the two capacitor will be charge balancing. I will attempt to measure the cycles it will take to charge C1 to 4V. If I measuring the voltage with a differential probe across C1 I should in theory see an steadily increasing voltage.
However the issue is once I implemented the circuit based on MAX4641 (datasheet), When I do a probe of the voltage with a scope across C1 the voltage read out is 5v instantly with absolutely no steps. one thing to note is that I did put an DIp switch at the C2 to allow easy debugging.
the steps I have gone over currently are:
-made sure the clock signals are correct and no overlapping and accounting for the gate turn on/off time.
-probing the Q2 source gives a square wave that goes from 2v to 5v but isn't time varying.
-change C1 to a massive 220uF capacitor, but the voltage still instantly shoots to 5v across that as well
I am really out of ideas as the circuit seems to work in simulations but just doesn't work when it goes onto a PCB.
Thanks!


texts: How do I invert a signal without deforming it, and without using a logic gate?

texts:
I have an IC which outputs pulses over an open collector pin. I need both these pulses and their inverses in my circuit. I want to do the inversion by using as few as possible transistors and without using any ICs.

First, I tried simply inverting the signal by a single BJT as seen below. But this won't work. Because, when Qin is on, SIG will be low, and when Qin is off, again SIG will be low since this time base of Q1 will ground the signal. The signal will be lost in any case. Connecting a resistor to the base of Q1 may seem to be a solution, but this way, the signal will be attenuated by this resistor network (it will be less than 12V).

Next, I tried first generating a copy of the signal by and emitter follower circuit (by Q1 in the image below), then do the inversion by this copy of this signal. But again the same thing happened; now the signal is lost through the bases of Q1 and Q2.

In my final attempt, I connected R3 to prevent the loss of signal. By doing so, the signal is not lost, but it is attenuated by the voltage divider network built up with R1 and R3. I added Q3 to pull it up to 12V level as seen below.

I think this final circuit will do what I want, but this, time the circuit looks too complex to me. Is there a simpler way to do this with at most two external transistors?

(Note: Only 12V is available in the circuit. The frequency of the signal (clock pulse) is 20kHz. The signal and its inverse will drive separate totem-pole transistor pairs. They should be pulled up by 10k\$\Omega\$ resistor at most when high, and should be directly shorted to the ground when low.)

EDIT:

I rebuilt up my circuit according to both Brian's and Vladimir's suggestions. I implemented two methods in one circuit. Then I simulated them. Here is the schematic:

Results of Brian's circuit:

(Results are almost similar without the totem pole stage.)

Results of Viladimir's circuit:

(Results are much more terrible without the totem pole stage.)

I'm loosing my hopes on obtaining crystal clear signals. It is only 20kHz and I'm having this much of troubles. Maybe I should give up my stubbornness and use a logic gate IC.

EDIT 2:

After Viladimir's comment about IRF530 being a wrong choice of MOSFET, I started to try out different transistor types. I got a very good result when I changed Q1 with 2N2222 and M1 with BSS138. The new and better signal timings are in the image below. And these timings are without a totem pole drive; I removed it; it doesn't make a difference now.

However, this was just a simulation. Will I get the same (or similar at least) results in the real life? If yes, what was the problem with Q1 and M1? What features of 2N2222 and BSS138 made this circuit run better? I will be glad if someone makes a short comment on this.


texts: What corresponds to a resistor in the hydraulic analogy to current?

texts: In the hydraulic analogy to electrical current, pressure is voltage, water moving is the current, but what is a resistor? I've heard that a resistor corresponds to a constriction in the pipe, but a series of constrictions is not additive like a series of resistors, right? Can anyone give or cite a better example of the hydraulic analog to a resistor?


texts: Why does this transformer draw so much current?

texts:
I've been working on a DC power supply to provide about 10 mA at 200 V. The simplest way (not dealing with a switching power supply) seemed to be using a transformer to step 120Vac up a little bit to get peaks near the target voltage, then rectify and filter.

I've wound a custom transformer with a 18:19 ratio to do the step-up which behaves reasonably in simulation, but draws much more current than I expect when actually constructed:

simulate this circuit – Schematic created using CircuitLab

R2 is an NTC with \$R_{25\mathrm{C}}\$ of 50 Ohms to limit inrush current, and there's a fuse inline (not pictured). When connected the circuit draws upwards of 10A, but it takes a moment to warm up (quite literally; the NTC gets warm as you'd expect) before blowing the protection fuse, to the point where a 4A fuse took more than a second to blow (so current doesn't seem to be dropping after the first few AC cycles).

Since this is a custom transformer I don't have any solid numbers on its characteristics, so it's possible inrush current is much higher than the simulations say. Additionally, I may have underestimated the NTC so it warms up long before the transformer reaches saturation. (The third option being that I'm completely wrong and this is a bad idea.)

How can I limit the primary current to something in the the 1-2A range that I expect from simulation, or is there a smarter way to build this power supply?


texts:
I'm a student studying electronics and I'm having trouble understanding the concept behind current sourcing and current sinking. We've covered it in a lab using a 7404 and an LED and all that. Just having trouble getting an intuitive understanding of what exactly is happening.

If anyone can take a crack at explaining, it would be greatly appreciated.

Just to be sure, I understand what the process is, in terms of current flow and from input to output and vice versa. Just not getting why one is preferred over the other, and what it has to do with having a floating Hi input or why I wouldn't want to have a floating Hi.

Input would be greatly appreciated.

Thanks!


texts: Does anyone know of any (foss) application to create karnaugh maps. I don't need a K-map solver, just to be able create them so I can export them to ms-word.


texts: Why USB wall chargers don't reach their amperage rating?

texts:
recently I bought a power bank that requires 1,6A of charge current. I tried charging it with a 2A Samsung charger, which came with my tablet. Unfortunately it charges very slow. Then I tried another 1A HTC charger and the result was pretty much the same!
I decided to test 5 chargers I had available and the results are confusing me. I loaded each charger with a rheostat in order to see how much load they can take. Practically ALL USB wall chargers failed to deliver.

Here are my results:

1: Samsung 2A : This charger drops the output voltage to 4.5V with 21 ohms, therefore achieving ~ 230mA

2: HTC 1A : This charger drops the output voltage to 4.5V with 15 ohms, therefore achieving ~ 330mA

3: Sony 850mA : This charger drops the output voltage to 4.5V with 18.5 ohms, therefore achieving ~ 270mA

4: Huawei 680mA : This charger drops the output voltage to 4.5V with 12.4 ohms, therefore achieving ~ 400mA

5: old, non-USB Samsung 700mA : This charger drops the output voltage to 4.95V with 7.4 ohms, therefore achieving ~ 670mA This one actually works!

so ... as we can see, USB wall chargers just don't achieve their ratings and the question is WHY?! I am sure they can deliver what they are rated for but they don't. They seem to expect some other signal or something in order to output their full power and I want to know what do they need?! I am sure the 2A charger can deliver this power, because it charges my tablet well! It's also interesting to see that the old charger DOES achieve the current it is rated for. What am I missing here? Do you know how I can unlock the full potential of these chargers?


texts: Class II isolated power supply (wall wart) -- referencing the output to mains neutral?

texts:
If you connect the negative terminal of a Class II (isolated) wall-wart-type power supply to the neutral of the mains circuit feeding the wall wart, will that cause any damage or hazards that I should be aware of, besides the wall-wart's + terminal being considered a "live" mains wire at that point (as its now mains-referenced)?  Would the results be different if a switching wall-wart was used instead of an iron-core one?

Update: this application is being wired to the interconnect circuit on hardwired smoke detectors, which is the reason it's neutral-referenced -- it seems that all interconnected hardwired smoke detectors use the '9V on interconnect wire with respect to neutral = alarm' convention -- this only works if your supply for this is neutral-referenced.  Obviously, this'd be in a sealed box where wayward fingers, tongues, etal couldn't get at it, and I was planning on removing the barrel plug anyway as it's a hinderance to chassis wiring.


texts:
I write code that the sums of the squares of two numbers. If I write code that is shown in code 1 and run simulation according the this, I get like this blue arrow shown in picture 1 (for code 1). I can't simulate this warning or error. However I write code to shown in code 2, I get no error messages and I don't get blue arrow. Difference between the codes only "resize" command. For code 1,

a_square <= a_in*a_in

a_square signal is 26 bits. I describe as 32 bits this signal. I describe enough bit number for this signal.
Why do I have to use the resize command even though I have defined a sufficient number of bits (32 bit)? Wouldn't it be inconvenient if we define the product of two 13-bit inputs as 26 bits and there is an overflow, 27 bits?
Why does an error go when I type the resize command? What is the reason of this?
Code 1
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
entity square is
      Port ( clk       : in std_logic;
         a_real    : in std_logic_vector(12 downto 0);  --fix_point(13,12)
         b_im      : in std_logic_vector(12 downto 0);
         out_num   : out std_logic_vector(31 downto 0)
);
end square;
architecture Behavioral of square is
        signal a_in : signed(12 downto 0);
        signal b_in : signed(12 downto 0);
        signal a_square: signed(31 downto 0);
        signal b_square: signed(31 downto 0);
        signal sum : signed(31 downto 0);
        signal sum_vector:std_logic_vector(31 downto 0);
begin
    process(clk)
    begin
        if rising_edge(clk) then
            a_in <= signed(a_real);
            b_in <= signed(b_im);
            a_square <= a_in*a_in;
            b_square <= b_in*b_in;
        end if;
    end process;
    sum <= a_square +b_square;
    sum_vector <= std_logic_vector(sum);
    out_num <= sum_vector;
end Behavioral;

Code 2
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;

entity square is
        Port ( clk      : in std_logic;
               a_real   : in std_logic_vector(12 downto 0);
               b_im     : in std_logic_vector(12 downto 0);
               out_num  : out std_logic_vector(31 downto 0)
               );
end square;

architecture Behavioral of square is
        signal a_in     : signed(12 downto 0);
        signal b_in     : signed(12 downto 0);
        signal a_square : signed(31 downto 0);
        signal b_square : signed(31 downto 0);
        signal sum      : signed(31 downto 0);
        signal sum_vector:std_logic_vector(31 downto 0);
begin
    process(clk)
    begin
        if rising_edge(clk) then
            a_in <= signed(a_real);
            b_in <= signed(b_im);
            a_square <= resize(a_in*a_in,32);
            b_square <= resize(b_in*b_in,32);
        end if;
    end process;
    sum <= a_square + b_square;
    sum_vector <= std_logic_vector(sum);
    out_num <= sum_vector;
end Behavioral;


texts: What is the difference between cheap and expensive GPS receivers?

texts:
The cheapest class of GPS receivers is what we all have inside our smartphones etc.

Then we have devices like this U-blox.

In the end there are professional GPS like this SPAN combined with INS (IMU).

The latter one is basically 1 box including support for GPS+Antenna+INS.

It's understood why the INS component is expensive (MEMS gyro etc.), how the INS correcting the GPS and same with the Antenna.

This raising the question what is the difference solely in the GPS component inside the professional expensive device versus the cheaper one? Because if it's essentially the same, one can take $50 GPS receiver and by adding Antenna get same result like buying the expensive professional GPS...

Thanks,


texts: How does the principle of conservation of energy for a phase-shifter transformer apply?

texts:
Since the phase shifter transformer is used for regulating the real power  in the transmission line by means of changing the angle
it leads to the fact that the real power at
the secondary side should become greater without injecting any more power
and we will beat over load
Now the question is where does this power come from?


texts: Touchscreen keeps failing to communicate with raspberry pi, except when I touch the INT pin

texts:
I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the touchscreen works for a bit, it, however, stops working after a few seconds. But touching the INT pin of the touchscreen makes it work again for a few seconds. What also works is taking a wire and connecting one end to ground and tapping the INT pin for a split second with the other end of the ground wire.
This INT pin is the interrupt pin, it is high when nothing is happening but goes low once it's got a new message(e.g. a touch event). I think by tapping the INT pin with a ground wire or touching it I am stimulating a new message causing it to spring back to life until it fails again for some reason.

The INT pin is a direct connection from the touch chip to a raspberry pi gpio. But I have added a 5K resistor to 3V3 because the touch IC datasheet said I should have one between 1K and 10K to VDD. I tried other values of resistors(2K, 6K, 12K) and some work for longer periods of time than other values. But at some point, it always fails.

The reason I don't think the i2c data lines are at fault is because touching those lines once it stops working doesn't really do anything, but touching the INT pin does.

So my question is, why is my INT pin acting so weird? Is it a power supply issue? Is it maybe interference?(From the LCD data wires perhaps) How can I solve it?

Thanks!

Edit:
Touch IC is Atmel mXT224. It is hooked up using a custom PCB. Traces are less than 5cm. 2.2K pullups on SDA and SCL. currently 12K pullup on INT. Other than that there is 3v3 and GND. To which I added a 100nF cap and 2x 1uF caps. And the i2c connection is raspberry pi software i2c with 10us delay.(So 10us clock I guess, which would translate to 100khz)


texts: How do I design a constant current load circuit?

texts:
I'm currently a rising junior in EE and am honestly completely lost... I've been tasked with designing a constant current load circuit to discharge parts of the battery pack for Georgia Tech's solar racing club, but I don't really know where to start. I have basic circuit knowledge, but no real experience.

I've been online and saw how to make the simplest one, where one op amp is connected with a load resistor and therefore can draw current out of whatever I'm discharging, but as for the rest of it, I'm lost. Can anyone explain to me how the complicated constant current load circuits even work? If you could provide an example of one and walk me through it, I'd appreciate it so much.

Thanks.

update: Sorry for not clarifying on so many things, this is my first time asking a question on here. I'm trying to make a constant current load circuit because the team needs a module discharger. The battery pack has 35 modules, so whichever modules discharge too quickly will give us an indication of what parts of the pack have deficiencies in capacity. Each module trips at an under-voltage of 2.5 V and over-volts at 4.2, it usually floats around the upper 3 range though. I'm not too sure about what the mAh capacity for each module is, but I sent a message to my lead asking about it. I do know he wants to discharge each module at 20 Amps using the constant current load circuit though.


texts:
I a looking for a schematic of a circuit to built an adjustable current source capable of delivering up to 40A.

I am building a battery with 18650 cells. These cells will be individually fused using a cell level fusing method like this:

(Image source)

The idea is to connect the battery to the main bus with a wire that can carry the current under normal load. In case of a short of the cell, the other cells in parallel will discharge into the short and blow the fuse. The faulty cell will be isolated.

The tricky point is to choose the correct fuse wire gauge to ensure:

that it will not heat up too much under normal load
that it will blow when the other cells discharge into a short.

I have looked at current tables, but I'd like to test it for real. I would need a circuit that generate an adjustable current up to 40A. I would increase the current from normal operation to fuse blow, to check the behavior of difference wire gauges.

Do you know of a circuit I could use to get this functionality? Maybe using a strong LiPo battery with some kind of current limiter?

[UPDATE:]
On another forum (not dedicated to electronics), I got this schematics. Does it makes sense to you? I'd change the resistor for 5 mohms (200 mV range for 40 A and 10 W in the resistor). The power side would be a car battery.

Here is the link :
https://endless-sphere.com/forums/viewtopic.php?f=14&t=96779#p1417904

Could you give me your opinion as electronic experts?
Side question: Do I need a gate resistor to feed the FET or do I connect it directly to the Amp pin?

@andy aka published a comment asking details on how I plan to overcome thermal runaway of the FET. I have no idea, my knowledge in electronic is low. I planned to use a FET rated for high current (IRF1404Z with Rdson of 3.5 mohms) and use a huge heatsink. If there is a way to use several FETs in parallel to lower the charge on each, I would be glad to read about it!


texts:
if a finite state machine has 5 input signals

A, B, C, D, E

Does this mean there must be 2⁵ inputs along with the state built into the logic?


texts: How to test a pond filter UV lamp and ballast?

texts:
I bought a new UV lamp for a pond filter but I don't see any light from the inspection lens in the lamp holder.  I checked the the connection in the socket and I see 240v.  Does that mean the ballast is working?  I've been reading as much as I can but I'm still not sure.

Does this kind of lamp with no phosphor produce no visible light and therefore the lens at the end of the clarifier tube must have something to make the light visible?  Is there any other way to test the lamp?

Replacement ballast


texts: DC Adapter marked "9VDCX2", what is the X2?

texts:
I have a keyboard that needs a 9v power supply. I've found one home that is marked as 9V DCX2.

What does/can the "X2" mean after DC? It literally says "9VDCX2"

Extra info:
The adapter was originally made for a home telephone.


texts: What's the use of bonding pad assignments?

texts:
This is not the first time that I've seen a bonding pad diagram like this on chip data sheets:-

But this is inside the chip, so why do we care? And is it of interest that the chip die is 15 mils thick?

For the interested, this is from a TI "RAIL SPLITTER" designed to create virtual grounds.


texts: Single trace width calculator for impedance matching

texts:
I would like to calculate the trace width of a dipole PCB antenna in order to match a 50ohm impedance.

Obviously, there is no ground on the bottom side.
All the impedance matching trace width calculator seem to consider that there is a ground plane on bottom. Here is a couple of calculator links:
https://www.pcbway.com/pcb_prototype/impedance_calculator.html
https://www.eeweb.com/tools/microstrip/
How can I calculate the optimized trace width for 50ohm impedance? Can I discard the impact of the ground plane in my particular case?