texts:
I have been to an event last night, where I some wristbands produced by the Crowdled company (see links at the end).

Material of one band: 3 colored leds (2 in total) and a button. Runs on battery. For the pictures I opened the bands (2 screws). In the middle of the IC the code FL27.138 ist labeled. The rest of the band which is not visible in the pictures is only plastic.

Functionality: once I reveived the band, the button changed color and turned the leds on an off. Later a radio controller controlled the leds, the button couldn't even turn the leds off. (Range: about 750 metres, regarding the website of the producer). One day later, at home, the bands do not turn on at all, even those which haven't been activated at the event (plastic seal at battery was attached).
EDIT: The bands work like when I received them. The problem was empty batteries.

Question (EDIT): How can I reuse the bands? Probably the radio contoller consumes energy for the whole time, which empties the battery's within a day. Any idea how to disable the controller?

Links and further information: producer: https://www.crowdled.net/how-does-it-work/ similar hacks for other bands: http://www.instructables.com/id/Hack-Your-Xyloband/ and https://www.youtube.com/watch?v=UQHpJ0dJJXQ


texts:
I'm trying to get a nordic 8001 eval board for an embedded application.  I'v got an iPhone app shell up and running that discovers/connects to Bluetooth devices in the area. I've been able to discover BlueRadio,BlueGiga, Panasonic radio modules. I'm also able to discover the Nordic 8001 sample board fron the $99 eval kit, with the 8002 board from the same kit, all without the $399 demo board. I've also got my embedded processor a Cypress Semiconductor PSoC3  responding to the device_startup_event from the 8001 board only. The issue I'm having is that the next step talks about setting configuration set by nRFgo Studio.
Question:
Does the nRF8001 come preprogrammed with some predefined configuration options that need to be set up, if so what are they. If not how do I go about determine what needs to pe programmed and how do I do it. I can't seem to find detail document on this or on programming the 8001 board by itself.


texts: Why is USB Type-A to USB Type-A never used?

texts:
I was wondering why almost all USB cables that exist are USB-A to (Micro-USB | USB-C | USB-B | etc.)

Why was USB-A to USB-A not a popular thing? Is there a technical reason this cannot work?


texts: MOSFET behavior with small load resistor

texts:
I'm trying to understand the behavior of a MOSFET I got at radioshack (Fairchild IRF510).

I have the circuit set up in the way recommended by the datasheet:

The specifications suggest that it should happily support a load resistor of 100Ω. However, an oscilloscope shows the following behavior: (scope hooked up under R_load / above MOSFET, pink is the TTL pulse going to the gate, light blue is the voltage output above the MOSFET)

If I switch the load resistor to something like 7 kΩ, the behavior is much more reasonable:

Why am I seeing a fraction of the voltage, and the initial discharge at switching?


texts: Understanding PIC MCU memory from datasheet

texts:
Being new to PIC, I have been struggling to understand the information in the datasheet.
Q.1. : What does "256 bytes Linear Data Memory Addressing Memory" mean? I am looking at the PIC12LF1552. (datasheet:http://ww1.microchip.com/downloads/en/DeviceDoc/40001674F.pdf).
My attempt: I landed in this post https://www.microchip.com/forums/m1028749.aspx. What I inferred was that Linear Data Memory Addressing Memory was the sum of all bytes of memory of the general-purpose register(s).
But when I similarly calculate for PIC12LF1552 , from Page - 15 of the datasheet : 48+ 80+ 80 bytes = 208 bytes. I was expecting this to be 256 bytes. Please let me know what am I doing wrong here.
Q.2. Is "sram" and  "Linear Data Memory Addressing Memory" the same thing? For e.g. for PIC16(L)F18326, datasheet (http://ww1.microchip.com/downloads/en/devicedoc/40001839b.pdf) has sram as 2kb.
Q.3. If "sram" and  "Linear Data Memory Addressing Memory" are the same where can I find a table similar to page - 15 of PIC12LF1552 for PIC16(L)F18326. The datasheet does not have it, or is there way to know which banks have implemented GPR's. How do I know the  address of GPRs which I could get through the table which I will require if I want to store something in the Linear data memory through FSR registers.
The above things have been super confusing to me. Any clues would help.
Thank you very much


texts: Non contact AC voltage detector resistors

texts:
In this non-contact AC voltage detector, I understand the working principle of taking a tiny induced current in the antenna and amplifying it using transistors. However, I do not understand why the resistors have been used and why the particular values have been selected.

My understanding is that a transistor will give a DC current gain based upon the particular transistor used of say 100. So why has the 1 MegaOhm resistor been used? Surely your induced current will be so small you want to maximise the gain of that signal? I'm just struggling to understand why the resistors have been used.


texts:
Can I use a VFD to drive a 3 phase motor if I drive the VFD with 48V from some series car batteries?  The VFD has a single phase input and 3 phase output.  Is it just a rectifier in there that charges up large DC bus caps?  If it is, why can I not just pour charge in with DC?

I want to make an electric lawnmower and I got these parts from the dumpster at work (the motor and the VFD).

Thanks!


texts: Power resistors equivalent thermal model: Interpretation of datasheet & 0°C terminal of power source

texts:
This is borderline electronics, but I think many more of us here have done this kind of studies.

I'm heating an aluminium plate with an Aluminium clad power resistor by mounting it on it and applying 25W of power, just like on the following schematic:

Note the thermal equivalent model I think it corresponds to, including the temperature nodes.

What is the 0°C terminal of the power source connected to in that case? Ambient (as usual), or aluminium plate? How do we know?
I can estimate R3 (0.5K/W) and I have a rough calculation of R4 (4.7K/W which I find really really odd*), but on the datasheet of the resistor I'm using I don't know if the thermal impedance is R1+R2 (junction to ambient) or R1 (junction to case). Numbers seem to point to R1+R2, but how do I know R1 then?

Goal: Calculate the temperature T of the aluminium plate at equilibrium.

*: Addendum: I've used the 0.225m².K/W value of this link together with the surface of my plate to find that, which means a 360x131 mm² plate radiates less than the resistor heatsink?


texts: LTSpice (mac) How can I display the current in the schematic?

texts:
I want to simulate a circuit and display the current directly in the schematic.
However I am only able to display the voltage.

Here you can see an example where someone actually displayed the current as well. So it is must be possible.

I am using the mac version, maybe it's is only available in the windows version. I already spent hours on google...


texts: Electric Shutter Functions for CCDs Raspberry pi

texts:
I have been trying to incorporate CCD linear array into my circuit. However, I have never dealt with electric shutter functions which are necessary to operate the CCD. Here is the link to the datasheet (pg 2,6-8): http //oceanoptics.com/wp-content/uploads/Toshiba-TCD1304AP-CCD-array.pdf

Here are the parts that I'm struggling with. From the figure shown below, I know I need to have some sort of "function generation" for three inputs.

Here is the waveform as a function of time, which has to be maintained.

Well, I have never done anything as complicated as before, I don't know where to start, any pointers would be good. I'm hoping to do this in raspberry pi 3.


texts:
I have a dual op-amp that I want to use as a comparator: Vin should be compared to Vref (1/2 VCC). This is the circuit that I am using (as I have a dual op-amp, I am using a voltage follower on the divider).

schematic http://iridia.ulb.ac.be/~abrutschy/images/opamp.png

I would expect that if Vin>1.65V, Vout=3.3V (VCC). Otherwise, Vout=0V. Unfortunately, Vout is around 2.2V if Vin>1.65V, which is not sufficient for my µC to detect a clean logic high.

I suspect that I am experiencing an "ideal vs. real-world" op-amp problem, but I am not sure how to resolve it best.


texts: How to remove noise between raspberry pi PWM0 and SIM800L mic pin?

texts:
In my project SIM800L module(GSM Module) is interfaced with raspberry pi zero. Whenever user call Pi zero play an audio so that user can hear it. To send audio signal from pi zero to SIM800L, PWM0 pin is connected to MICP pin of SIM800L. Please check below image for connection information:

Here When PI zero detect incoming call, It's start playing audio, So PWM0 audio is sent to MICP of SIM800L. But when audio start i can hear noise in that call but once audio start playing noise gradually stop. So every time i call, for few second i can hear noise and then after audio noise stop gradually.

I don't have any idea why this noise is generated and how to remove this noise.

I am following below tutorial for reference: https://othermod.com/raspberry-pi-zero-audio-circuit/

If anyone can help me with this, it will be good help for me.

Thanks


texts:
I have an electric gate opener that takes a 15-18v AC input. Around 100m from the gate I have a 240v outdoor circuit that I'd like to use to power the gate and some garden lighting.

I can't find any specifications on exactly what current the gate will draw, however the readily available transformer for it is rated at 16v, 3.75A. It's only supposed to be located approx 20m from the gate though and I'm concerned that even with expensive 6mm cable, the voltage drop will be too great using this transformer. Overseas they use an 18v transformer and locate it up to 100m from the gate, however I'm struggling to find a suitable one in Australia. There are, however, plenty of outdoor rated (IP67) 24v AC transformers.

So I'm wondering is there any relatively cheap and reliable way to take this 24V AC which, when the gate and lights are operating, might drop to as low as 20V AC at the end of the cable run and get a voltage that stays in the 15-18V AC range from it to power the gate?


texts:
Just a general electronics question: What is negative voltage, like -5 Volt?

From my basic knowledge, power is generated by electrons wandering from the minus to the plus side of the power source (assuming DC power here). Is negative voltage when electrons wander from + to -?

Why do some devices even need it, what is so special about it?


texts: Why does radio reception consume so much energy?

texts:
On low-power radios, the current consumption for reception is similar to the consumption for transmission. For example, the Texas Instruments CC2652 System-on-Chip datasheet claims these values:

Active-Mode RX: 6.9 mA
Active-Mode TX 0 dBm: 7.3 mA

I've read an explanation that the most energy hungry component is the local oscillator, which generates the high-frequency carrier wave and needs to do that both for reception and transmission. However, it's not clear to me why would the generated sine wave need to be with similarly high amplitude in the case of reception, compared with the case of transmission. An alternative hypothesis is that running all of the (other) analog and digital RF components is what consumes the energy. Can you clear up the confusion?


texts: Over current AND reverse polarity protection using a MOSFET

texts:
Our lecturer posed us this problem. I just can't get it solved.

Design a circuit using a MOSFET which provides reverse polarity protection and ALSO over current protection. Over current protection should activate when current through a load is more than 2A.

Designing reverse polarity protection is easy, adding the over current protection... I can't get it :(


texts: Why do not we use always current signal sources for BJT amplifiers?

texts:
as you know for a BJT in active region we have
\$i_C=\beta\cdot i_B\$
\$i_B=I_S \cdot e^{\frac {q\cdot v_{BE}}{kT}}\$
So, if you suppose that the base-emitter voltage is set by a voltage source:

Collector current is linear with respect to the base current;
Base current is not linear with respect to the base-emitter voltage;

The last one may be approximated as a linear function of only a small input signal which is applied in addition to a biasing voltage.
Since in amplifiers, for instance, non-linearity are not so good, I was asking me: why do not we use always current signal sources for a BJT amplifiers? In this case we would simply write:
\$i_c=\beta\cdot i_b\$
where \$i_b\$ is our signal, and so we have bypassed the problem of non-linearity.


texts:
Does the part that says, "Plate Through Holes with copper, 0.001" thick min" mean that 0.001" hole plating will be applied to all plated holes?

I am new to the fabrication process and I am wondering if I am reading this correctly.

What is the meaning of this fabrication rule?


texts:
I would like to use a Phase Locked Loop (PLL) to multiply a 4x signal to be an 8x signal, and modify the same 4x signal to be a 64x signal so that all three signals are available as a 5v clean low - high pulsed output.  This can be two identical circuits but for the multiplier using I was thinking of a 555 as a schmitt trigger maybe to feed the PLL.  The origin signal is 5v from a hall effect sensor

i have seen some PLL circuits but I am lost on how to make the multiplier amount itself


texts: Connecting horn antenna to a gunn transceiver

texts:
I have a surplus Microsemi MO9072 24GHz gunn transceiver (Datasheet) and a matching MDT86552 horn antenna (Datasheet) that I'd like to use in a project. In the same package was a waveguide of some form that clearly could fit between the antenna as photographed below that I can't find any details on, it was purchased many years ago.

Doing some bench testing it didn't seem to make a difference, possibly because the distances were too small, so I'm wondering the purpose of the plate and whether it should be used with the horn antenna or instead if it's only intended for use without an antenna for short range applications?

For testing I supplied the gunn diode with 5V DC from a linear bench supply with a 10uF tantalumn in parallel and connected a 1X scope probe between ground and the the mixer B which is described as for motion sensor. Then I was taking a few steps backwards and forwards and could see some movement and the amplitude seemed similar between both times, I've since used the scope for something else but believe I was using 1mV per division.


texts: I apologize if this is foolish question, but I wanted to know how to connect a solar panel(that has no wires) to a breadboard. I wanted to test it out, but I am confused how to do it. Thanks for any help.


texts:
I have a device that requires approximately 500 mA at 5 VDC, and I am required to get this power from two legs of a three phase power supply. The voltage between these legs can be between 110 and 700 Vrms. This device and its power supply will be enclosed in a small, hot area which will be exposed to fairly large amounts of vibration. There is no need for isolation, and the transformers I have found are too large anyways.

I had previously used this design: http://www.ti.com/lit/an/slua721/slua721.pdf as a starting point for a supply that operated up to 525 Vrms. With some small modifications and a simple DC/DC buck supply at the output I was able to get the required 500 mA at 5V DC, but now of course the bosses say we need to push the input range up a bit. I went back to try and redesign this to work with 700 Vrms, and I have run into some problems.

For one, my rectified DC Voltage is going to be up to 1000 V. Since this design uses BJTs, this seems to limit my choice in transistors to those which can only withstand 200 mA max or are too large for my application.

I am thinking that an IBGT would probably be a better choice, but I am unsure of the implications of replacing the BJT in this circuit:

Can anyone tell me if it would be possible to replace Q1 with an IGBT to handle higher voltages?

If there are better suggestions on how to get from 700 Vrms to 5 VDC I am open to suggestions.

[Edit 1:] This device will be located in the same physical location as the high voltage load that is being power by the three phase supply. It is essentially inside of the casing of a three phase motor. There is no realistic possibility of a human coming close to this device while it is powered. I have isolated DC/DC supplies coming off of the 5 VDC output for powering the microcontroller and sensors. Given this, is isolation really necessary?

[Edit 2:] I have not been able to located any potential transformers that might be small enough for this application. Could someone point me in the right direction?


texts: Is the current in the correct direction in this image describing a one phase generator?

texts:
The dot on the left is current going towards us according to the image. But if the magnet is rotating counter clockwise while the conductor is stationary (which is same as magnet being stationary while the conductor rotates clockwise), I would expect the current to be in the opposite direction, that is away from us on the left side and towards us on the right side. Is that right?

Image above "describes" the following. If the current is wrong above then so is the induced voltage \$e\$ below:


texts:
I am a bit confused when looking at ADC's for my project. I am using an electret microphone and modifying the circuit at the bottom of page 15 here (I can't input the image itself unfortunately here):
http://www.en-genius.net/includes/files/avt_030110.pdf

I'd like to sample audio at ~12KHz, though this will change depending on applications I'm using (testing out voice recognition). I'm going for a bit depth of 16, as the input volume will vary and probably be from quite different environments and distances.

With background supplied, I wonder if an audio specific ADC is really necessary? Example is here

I don't need stereo, only mono. These seem to be more for more robust recording and/or output situations than my application, correct? All I need is a mic input, and the amplification would already be done by the circuit I mentioned.

Also, given these values, would I simply need ~12ksps to match the 12khz sampling frequency?

Would a simple ADC that has correct resolution and SPS be fine then, supposing more of the DSP and amplification would be done elsewhere? Is there something special about audio ADC's that behaves quite differently?

Thanks for your help, I know some of these are quite elementary inquiries, though I haven't found very clear answers to them. I could be looking in the completely wrong route, so any input is highly appreciated.


texts:
The Gabor Limit states that it's impossible to simultaneously localize a signal in both frequency and time.  FM communication modulates the instantaneous frequency of the carrier in step with changes in the signal.  This suggests it's impossible to perfectly determine the instantaneous signal even in a theoretical channel with zero noise, or that one has to assume that the signal is changing slowly (band-limited).  How is this overcome in practice?  If demodulation requires the assumption of a band-limited signal, what is the maximum spectral efficiency of frequency modulation for a given input bandwidth?

EDIT:  To clarify, this is a theoretical question.  The Gabor Limit seems to imply that "instantaneous frequency" isn't well-defined if I understand it correctly.  I'm not sure I do, though.  The question boils down to:

Do I understand the Gabor Limit correctly?  Is "intantaneous frequency" an unmeasurable quantity?
If I do understand the Gabor Limit correctly, how does FM modulation and demodulation work in spite of it?  Is there a requirement that the demodulator assume that the signal being transmitted is band-limited even on a theoretical noise-free channel?


texts: Designing circuit with a FIR filter with feedback

texts:
I am trying to implement a VHDL circuit similar to the one in this image:

This Simulink simulation works as expected, but trying to implement the same in VHDL is another issue. The problem is that Matlab/Simulink produces an output of the filter immediately, whereas this particular filter takes 43 clock cycles in VHDL to produce a valid output. This causes the feedback path to be "late" compared to Simulink, and delaying the signal generator input to match this delay will only further delay the corresponding filter output.

There must be some way to account for this real world delay that I'm not seeing. Any tips?


texts: AM modulator's negative peak saturation issue

texts:
I am working on AM modulator. I am using NMOS as a voltage controlled resistance, and opamp in inverting aplifier configuration to get carrier signal multiplied by input signal.
I created a simulation here and built it on a test breadboard. The problem with real circuit is that although positive peak amplitude is properly modulated by input signal, the negative peak is saturated (always stays at same very negative level).
I can replicate this in simulation circuit although I do not understand how to apply fix that solves problem with simulation circuit to my real circuit.
Case 1 Working circuit
If NMOS in simulation circuit is configured with:

Simulate Body Diode : YES
Body terminal : YES

then all is good.

Case 2 Negative peak saturation issue
If NMOS in simulation circuit is configured with:

Simulate Body Diode : YES
Body terminal : NO

then negative peak amplitude is not modulated, it saturates to -15 V (opamp's VCC-).

I know that by changing "Body terminal" I am changing body bias, but I am not sure what to do with my NMOS to mirror on my breadboard ticking of that setting in simulation circuit. I am using 5LN01SP NMOS and UA741CN opamp. This is how it manifests with my circuit:


texts: When does a resistor affect current and voltage?

texts: I was playing around with a computer power supply and some resistors and noticed that raising the ohmage decreased the amperage but the voltage was unaffected.  Does this mean that voltage is a constant in V=IR.  How can you change the voltage with resistors and leave current unaffected.


texts:
I have designed a power supply card using V7805-2000. Copper thickness is 70 microns, board size is 5 cm × 5 cm.
When this underwent vibration test the regulator came off, broken into two pieces(regulator leads are in the holes).

I have used 40 mils drill size, 130 X 70 regular pad size. 135 X 75 mils anti pad, thermal pad and solder mask top and bottom.

In the above image, you can see that there is an 0.5 mm notch from the surface of the regulator.
I have used vias on one side, where this notch gets mounted/placed on the PCB. Hence the regulator moves/shakes slightly when moved with a hand after assembling.
Even there are copper shapes on one side of the notch.
Is this might be one of the reasons why the regulator broke?


texts: When building a circuit, are there any conventions as to where the on/off switch should pe placed? As in between the negative pin of the battery and ground, or between the positive pin of the battery and circuit supply point?


texts:
Edited: Added more pictures.

I'm reverse engineering a PCB but I'm stuck at one component. I can't find out what it is.

I thought it is a diode because of the marking on top of it but when I test it with a multimeter it behaves like a resistor.

It allows current to flow in both directions (tested with continuity test with a multimeter.)

Can someone identify what this is and what component could be used as a replacement for this?

This is an old board and I think this chip is not made anymore.

The marking on the chip is R5 04. Some boards have R5 03 or R5 07 or R5 14.

Here is the picture:

I found two other boards that are been made later than the other one and found different chip markings.  The first one that I measured I think has a damaged diode since it allowed current both ways.

The ones I have tested now only allow current in one direction. Tested it just using a multimeter in resistance mode and it gave 13K.

I will have to test it later after removing.

The second marking on the bottom is definitely voltage since this one has 30 it means 30V

The other diode has a different marking:  SJ 4CA


texts: Don't understand this op amp's circuit design

texts:
I'm trying to understand op amps and, to do so, I'm reading a manual. For now I was understanding everything but I have reached a point that I can't get.
The manual I'm reading (linked below) presents the following schematics:

And says:

[...] The positive op amp input lead is at a voltage of approximately 65 mV, and normal op amp
operation keeps the inverting op amp input lead at the same voltage because of the as-
sumption that the error voltage is zero.

I understand the part in which it is stated that the negative lead is at the same voltage as the possitive one, because that is one of the op amp's assumptions.
However, I can't see why the positive lead is at 65mV. I only see a voltage divider formed by Vcc, R2 and R1. How can it be 65mv?
Op amps manual: http://web.mit.edu/6.101/www/reference/op_amps_everyone.pdf
See page 69.


texts: How does a "pulse dialer" (e.g. IN9151) internally work?

texts: I'm wondering how a so called "pulse dialer" like the IN9151 (https://www.digchip.com/datasheets/parts/datasheet/237/IL9151-3N-pdf.php) internally works, meaning how it is achieved to generate a distinct amount of pulses on a button press. For example  this type of IC is famously used in telephones to replace the rotary dial which generated by selecting e.g. the number 7 then seven pulses with a specific length (like 100 ms). How does this is done in the IC?


texts: How were Ben Franklins "positive" and "negative" assignments passed down through the years?

texts:
I've spent quite a lot of time now researching what I can find online about the story of how Ben Franklin assigned the terms positive and negative to what had previously been called vitreous and resinous, respectively. Ben thought that when he rubbed his glass rod with silk or wax that the glass was left in a state of having an excess of "electric fluid"[1]. He was also a proponent of the "one fluid" theory which we now know is incorrect because the electric field arises due to charge separation, not the "lack of electrons", but I digress.

Anyways, there are a bazillion tutorials out there about how we're stuck with the convention that was set by Franklin, but I have been completely unable to find out why this is. There is no trail of references that I can discern.

For example, the next major milestone after Franklin's use of the terms positive and negative in his experiments are probably Volta's pile experiments. In the drawings of his setups that I've been able to find on the internet, I see uses of the terms positive and negative, but there's no glass or wax involved in the voltaic pile. How did Volta select these terms? For that matter, how did every other 19th century experimenter implement Franklin's terminology?

To say that "Franklin set the convention and now we're stuck with it" is not good enough. There has to be a chronology, and a history of decisions amongst the prominent experimenters, no?

[1] http://www.gutenberg.org/files/45515/45515-h/45515-h.htm


texts: why use 2 diodes when shifting from 3.3 to 5v?

texts:
for the question "how do I go from 3.3 to 5v" people point to the microchip cheat sheet.

The Diode option has one between the data line and 5V so it pulls it almost to zero, the other one seems to only limit the high end.  Why won't this work?

simulate this circuit – Schematic created using CircuitLab


texts: Sensing +12V signal using ST STM8AF5288 microcontroller digital input

texts:
I am using an ST STM8AF5288 microcontroller powered by 5V in one of my projects (STM8AF5288 home, datasheet). Is it possible to directly sense a +12V signal input by port pins?

I am using a current limit resistor in the input. All the port pins in the ST STM8AF5288 microcontroller have clamping diodes. Will I able to sense a +12V signal input? Below is the circuit used in my project:


texts: How to wire a three phase bridge rectifier

texts:
I am doing a DIY three phase AC motor power generation project. I can understand the basics of electronics, and also understand how the wires are wired in a single phase rectifier. However, for three phase, I am unable to understand from any of the videos or documentation on how to do the wiring.

I am planning to buy something like this rectifier.

I get from the circuit diagram that the DC positive output is on the bottom left of the product image and the bottom right is the negative. I also get that the three live wires need to be connected on the other side.

My confusion is how the neutral of stator gets connected to the bridge rectifier, or is this not necessary? My stator looks like this image.

In the Stator the coil winding goes clockwise starting from the pin marked '110C1' and all three phase coils end at the small dark rectangle to the the right of the pin. Earlier, I just tested power generation by connecting my multimeter to one of the live phase pins and the neutral to the single joining of all phases.

Is there no neutral required, since when one phase is live, the others are not?


texts: is there any specific formula to calculate yagi-uda antenna Gain? i know that The Gain of Yagi Antenna depends on length of antenna array and do not depend on number of directors used in the design , but how can i calculate it?


texts: Why does electricity require a closed loop to flow?

texts: Imagine a battery with the positive terminal connected to ground.  The positive side has a high eletrical potential, ground obviously has a lower electric potential.  Electricity wants to seek a lower potential, and there's no significant resistance between the terminal and the ground.  Shouldn't electricity flow?  I know it doesn't but I don't understand why.  I know you have to close the loop, but why is this necessary?


texts: Cam i control boost converter without load.?

texts:
I am doing project on electrical vehicles.
 I need 400v from 120 v of batteries. I am testing my bidirectional converter in boost. I suddenly disconnect the load when the output volthage 350v.  So the output voltage increase as witout load of boost converter. But it should to operate in buck mode when the voltage is 420v.
When i disconnected the load at 350V suddenly. The boost converter configuration swithces burnt out.  The voltage increases so rapidly that controller didnt take any decision to operate in buck mode.
Can you tell me this is happened. Controller shoud take deciaion to operate it in buck.
Should i not to remove the load suddenly on boost mode.

I need to operate the boost even the vehivles is stop. But its voltage will contanlty increase.
What i have to do. Whar should i have to do for the unloaded condition in my vehicles.


texts:
This is a continuation of Estimating Assembly Cost which has addressed some approximations in estimating between North American and Asian assembly houses as price per pin.

The question does not address number of items in BOM and how significant / insignificant a reduction in a BOM might be.

For instance, if I have a BJT that costs $0.03  and a diode that costs $0.03, I could (if allowed) replace the diode with the BJT and my parts cost would more or less be the same. But now I'll have one less item on my BOM.

For each item on a BOM, what rules of thumbs can be applied to estimate cost ?

or

For each item removed from a BOM, what rules of thumb can be applied to estimate cost ?


texts: Ideal Op-amp Question with complicated feedback resistance

texts:
The question has been asked before here: Help with ideal op-amp problem

I don't understand why we simply can't reduce \$R_2\$, \$R_3\$ and \$R_4\$ into one single feedback resistance: $$R_f=R_4+R_2 \parallel R_3$$, and then just calculate the gain: $$\frac{V_2}{V_1}=\frac{-R_f}{R_1}=-\frac{R_4+R_2||R_3}{R_1}$$

The problem is shown here:

I understand the "correct" solution and how to get to it, but don't know why my solution would be "wrong".


texts: For sensing continuous Voltage and deamplifier circuit?

texts: Basically, OpAmp is used for the purpose of the amplifying the voltage in the circuit and in the circuit below, i supplied 10v and it is deamplified to 1A. The ratio of attenuation is 0.1. The circuit is posted below and the the supply to opamp is 15 v and 5 v is supplied to pin 3 through 220k. My question is that how the deamplifing comes into the role even though the formula contradicts (i.e 1 + R2/R1) and where the power is lost ?


texts:
I am trying to make a JK flip-flop in ActiveHDL environment.
I want to make it with logic gates.

It should look like this:

This is my code:

--nand3.vhd
library ieee;
use ieee.std_logic_1164.all;

entity nand3 is
    port(
    A,B,C: in std_logic;
    D: out std_logic
    );
end entity;

architecture nand3 of nand3 is
begin
    D <= not(A and B and C);
end architecture;

--nand2.vhd
library ieee;
use ieee.std_logic_1164.all;

entity nand2 is
    port(
    A,B: in std_logic;
    C: out std_logic
    );
end entity;

architecture nand2 of nand2 is
begin
    C <= not (A and B);
end architecture;

--JK.vhd
library ieee;
use ieee.std_logic_1164.all;

entity JK is
    port(
    J,K: in std_logic;
    Q, NQ: out std_logic;
    CLK: in std_logic
    );
end entity;

architecture JK of JK is
component nand3
    port(
    A,B,C: in std_logic;
    D: out std_logic
    );
end component;

component nand2
    port(
    A,B: in std_logic;
    C: out std_logic
    );
end component;

signal s1, s2: std_logic;

begin
    C11: nand3 port map(NQ,J,CLK,S1);
    C12: nand3 port map(Q,K,CLK,S2);
    C21: nand2 port map(S1,NQ,Q);
    C22: nand2 port map(S2,Q,NQ);
end architecture;

The problem is that i am getting this error when I compile JK.vhd file:

# Error: COMP96_0411: JK.vhd : (31, 22): Actual of mode "out" can not be assigned to formal "A" of mode "in"
# Error: COMP96_0411: JK.vhd : (32, 22): Actual of mode "out" can not be assigned to formal "A" of mode "in"
# Error: COMP96_0411: JK.vhd : (33, 25): Actual of mode "out" can not be assigned to formal "B" of mode "in"
# Error: COMP96_0411: JK.vhd : (34, 25): Actual of mode "out" can not be assigned to formal "B" of mode "in"

I think the problem is the backward signals.

Edit1
Improved JK.vhd file. It compiles, but it still does not work:

--JK.vhd
library ieee;
use ieee.std_logic_1164.all;

entity JK is
    port(
    J,K: in std_logic;
    Q, NQ: out std_logic;
    CLK: in std_logic
    );
end entity;

architecture JK of JK is

    component nand3 port(
        A,B,C: in std_logic;
        D: out std_logic
    );
    end component;

    component nand2 port(
        A,B: in std_logic;
        C: out std_logic
    );
    end component;

signal s1, s2: std_logic;

-- internal copies of output signals
-- initialize
signal Q_int: std_logic := '1';
signal NQ_int: std_logic := '0';

begin
    C11: nand3 port map(NQ_int,J,CLK,S1);
    C12: nand3 port map(Q_int,K,CLK,S2);
    C21: nand2 port map(S1,NQ_int,Q_int);
    C22: nand2 port map(S2,Q_int,NQ_int);

    -- Assign values to output ports
    Q <= Q_int;
    NQ <= NQ_int;
end architecture;


texts:
I am programming a microcontroller to talk with a slave device via I2C.  My I2C transactions always get NACK'd, but I believe the slave is ACK'ing the transaction, just a little bit too late and my microcontroller thinks it's a NACK.  Please correct me if I'm wrong.

Here is a trace of the transaction.

The slave drives SDA low at the end to ACK the transaction.  But my I2C library always reports it a NACK.  Further more, the slave keeps SDA low since their isn't a 9th clock pulse, and my I2C peripheral gets stuck trying to finish the stop condition.

My I2C library is a reliable one from manufacturer that I've used many times successfully with different devices.  I'm thinking the slave is just a bit too slow with the ACK.

The current trace is at 100 KHz but I've tried at 10KHz and it does the same thing.  Any suggestions to solve this?

More details:

slave: AMS AS3955
master: Silicon labs EFM32 Pearl

Update

I bit banged the I2C operation in question and added the 9th clock cycle.  The same problem occurs.  After the operation, I disconnect SDA and measure it on the microcontroller side and slave side.  Micro-SDA is high (correct) but slave-SDA is pulled low still.  So it seems this may be more of an issue with the slave device than an I2C issue, right?

Update 2

See my posted answer.


texts: PWR ON motherboard with Touch sensor TTP223 and Transistor

texts:
I have a TTP223 touch sensor, a BC347 Npn transistor and 10Kohm resistor. I want to make a touch button as substitution for my pwr physical button on the case of my pc.
On the motherboard I have 2 pin, PWR+ (5V) and PWR- (GND) and, if I short them, the Pc turn on: That’s the logic I have to replicate. Now, The problem is that the ttp223, when touched, apply a voltage (about 4.5V) to his output pin (I/O and GND). I don’t want this voltage because I only need to short the pin on the motherboard and not to apply any other voltage to them.
So, I used a transistor controlled by the touch sensor’s I/O pin on the base, the PWR+ connected to the collector and the PWR- to the emitter.. BUT IT DOESNT WORK .. whyyyy.. the logic is: the touch sensor apply a voltage to gate and source and this should close the interrupt between source and drain that is PWR- and PWR+ . So I don’t understand..
I measured with a tester and the voltage between source and drain is 5V (like it should be) when not touched and it drops to 4.8 when touched, BUT this is not enough to trigger the motherboard and turn on the PC. I think it should go really close to 0V.
So what I’m not considering? thanks for the help
Here the schematic

simulate this circuit – Schematic created using CircuitLab
So, what i need is: on touch --> Voltage between base and emitter --> short between PWR+ and PWR-
I also noticed that i dont need to short the PWR+ with PWR- only. It works with every GND PIN even one of another ATX power supply. So probably, in order to work, it just need to pull to 0V the PWR+ (from 5V)
I also thought about relay but I prefer a transistor which makes no noise and its significantly smaller..
Someone also said to me that one of my problem is that, between base and emitter, can be 0,7V max.. and I apply 4,3-4,5V .. could that be the reason why it doesnt work? how can i reduce the voltage with a resistor? (how many ohms?)
I want to link another question on this forum which works for him.. and it s almost my same situation -->
[Similar Question][1]
[1]: https://electronics.stackexchange.com/questions/334362/capacitive-sensor-as-drop-in-replacement-for-mechanical-button


texts:
I'm using Nucleo-32 board with STM32F031K6 MCU. I have some weird problem with ADC measurement. When ADC pin (PA4 in my case) is connected directly to VREF or 3V3 the value is always in range of 4031-4032 instead if 4095... For measuring low voltages, the ADC value has higher offset from the correct one (20% lower then it should be for 0.5V measuring).

Could anybody please explain this behavior?

ADC configuration:

  ADC_ChannelConfTypeDef sConfig;

    /**Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
    */
  hadc.Instance = ADC1;
  hadc.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;
  hadc.Init.Resolution = ADC_RESOLUTION_12B;
  hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  hadc.Init.ScanConvMode = DISABLE;
  hadc.Init.EOCSelection = ADC_EOC_SEQ_CONV;
  hadc.Init.LowPowerAutoWait = DISABLE;
  hadc.Init.LowPowerAutoPowerOff = DISABLE;
  hadc.Init.ContinuousConvMode = DISABLE;
  hadc.Init.DiscontinuousConvMode = DISABLE;
  hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
  hadc.Init.DMAContinuousRequests = DISABLE;
  hadc.Init.Overrun = ADC_OVR_DATA_PRESERVED;

  if (HAL_ADC_Init(&hadc) != HAL_OK)
  {
    Error_Handler();
  }

    HAL_NVIC_EnableIRQ(ADC1_IRQn);

  /**Configure for the selected ADC regular channel to be converted.
  */
  sConfig.Channel = ADC_CHANNEL_4;
  sConfig.Rank = ADC_RANK_CHANNEL_NUMBER;
  sConfig.SamplingTime = ADC_SAMPLETIME_239CYCLES_5;
  if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
  {
    Error_Handler();
  }

Pin configuration:

__HAL_RCC_ADC1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();

GPIO_InitStruct.Pin = GPIO_PIN_4;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);


texts: can a simple diode and resistor in series qualify as an inverter?

texts:
I'm working on a single-sided PCB and I find transistor pins are too close together for tracks to run through, so I'm wondering if I could roll off my own inverter by using the cathode of a diode as input and anode connected to a pull-up resistor as output.

Would I be able to apply this circuit to logic gates without problems if my resistor is 10k and the diode is the 1N4007 kind?

I want to avoid using an inverter IC just for one inverter.

EDIT: this is the proposed solution


texts:
There are quite a few tapes out there, from the plain black electrical tape to different color variations to Scotch 33+, 77, 88 to Kaptons (polyamide), I have also seen some velcro type wraps which probably are not velcro. I just learned these are fleece electrical tapes, so these join in the comparison. I have heard negatives for both, that electrical tape gunks or that kapton is easily pierced, but then there are thicknesses. Anyways it seems like it comes down to the type of application so which is used when (and also why)?
To give a more complex at least for me, example; I have a laptop which I am installing a heatsink, the heatsink model is for the same laptop, but for a model with a dGPU which I do not have, I have the non dGPU model. So everything fits perfectly well at least to some point that is as in addition there is a naked heatsink part hovering over and very close to the motherboard where an actual GPU die should be. What would be the best way to insulate it, put a Kapton on the heatsink, or on both the heatsink and the PCB, but wouldn't also a Scotch 33 (or even something worse, although I would like to not risk it in this situation) be sufficient as temperatures are not that high, then again I see tons more polyamide tapes on PCBs and they sure do not get as hot as a heatsink. In terms of what sticks to a metal surface better I do not know.


texts: Hey I am using 2 4N35 Optocoupler from Visha can I replace them with a single ILD615 from Vishay?

texts:
I went through both datasheets and i think it should work.

Basically I am asking if the dual channel version of 4N35 is the 8 dip ILD615.

Thanks.
edit:
I have added the picture. my circuit is like the link.  when vin is postive i need GPIO at Vout to be 1 (High) and otherwise Vout 0 (Low)


texts: Isolated BNC connector in metal chassis, EMC considerations

texts:
I consider using an isolated BNC connector for a precision application, in which the BNC Shell will be either grounded via an internal switch or used as a Guard electrode. The motivation behind this is to avoid the cost and "nicheness" of Triax connectors. The circuit looks like this:

U1 is a buffer amplifier with high impedance. Signal frequency is DC to kHz, source impedance can be from low to >GOhm. Therefore, the two different operation modes of the Shell. If Switch W1 is closed, the BNC would work as a regular shielded, single-ended connector, which is the main purpose. For very high source impedance inputs to be measured, a guarded input is needed. Opening switch W1 allows this.
Problems:
When using the guard function, of course the ungrounded cable is a fasttrack for common-mode noise into and out-of the chassis bringing all sorts of EMI problems. The answer of Dan Mills to this post suggests that isolated BNC connectors are a bad idea for EMI. I suppose, the same would apply to other measurement devices such as table-top multimeters using unshielded banana connectors for example. So how do such devices tackle EMI with the unshielded cables?
a) One option I thought of was tackling this with a common-mode-choke. But: Won't that commom-mode-choke hinder the guard drive function. And when using the grounded shell, won't that same common-mode-choke couple the chassis noise into the sensitive circuit?
b) Another idea would be to RF-bond the BNC Shell to the chassis anyway, leaving the guard function only functional for low frequencies (sub-kHz). But I wonder how to achieve this? A capacitor is baaad at RF-bonding from what I have read.
I would be happy to hear your thoughts on my two ideas (a) and (b), or about ideas of your own on how to make isolated BNC ports work well EMC-wise.


texts: Cannot enter programming mode ATMega328p

texts:
I'm using an ATMega328p Xplained Mini development board. I was able to program it using Atmel Studio 7, being new to AVR programming I accidentally set the RSTDISBL fuse to 0 (has a default value of 1). After trying to reprogram the board using SPI I found out that the RSTDISBL needs to have value 1. Now I cannot enter programming mode using Atmel Studio.

So, is there a way to reset this fuse without having to purchase a different type of programmer, such as JTAG? I have a few spare Arduino boards laying around if those could be of any use. I read through the ATMega328p docs and could not find any info on how to set this fuse.


texts:
I have a Panasonic Pir Motion Sensor (AMN34112.)

I want to connect it to a LED so that the LED lights up when the sensor detects motion. I need some help to make sure I do not destroy the PIR.

The PIR documentation includes a wiring diagram:

The sensor has digital output:

Vout = Vdd - 0.5, where Vdd is the input (operating) voltage and must be in the 3 to 6 V range.

The output current when detecting is max Iout = 100 uA.

This is how I plan to wire things:

Where the battery is 9 V.

Will this work?

What should be the values of the resistors R1 ... R5?

The LED will have a 2V drop => voltage drop across R1: 7 V.
A current through the LED of 10 mA ought to work.
R1 = 7 V / 10 mA = 700 ohm.

R4 and R5 should form a voltage divider so that the voltage across the PIR is within valid range. Choosing Vdd = 4.5 V => R4 = R5.

The PIR is specified to use 1 uA so I can choose high R values.

E.g. R4 = R5 = 820 kOhm?

This would lead to a max current through PIR of:
I = 4.5 V / 820 k Ohm = 5 u A.

R2 restrict the current out of the PIR. Choosing Iout = 1/2 max:

R2 = 4.5 V / 50 uA = 90 kOhm. So 100 kOhm should work?

R2 and R3 form another voltage divider.

To put the transistor (BC548 B) in saturation mode Vbe > 0.7 V.
However does it hurt the transistor if Vbe = 4.5 V?
Just to make sure I could use R3 = 330 k Ohm.

Here is the 1 transistor amplifier stage I have used so far. The PIR is modelled as a 4V DC source:


texts: Is it possible to change gain on Adafruit PN532

texts:
Is it possible to change the gain on an Adafruit PN532 board?

I need to LIMIT the range in order for it to NOT interfere with another PN532 installed close by.

The board is to be used with an Arduino.

I've looked through the Library but can't find any settings to change the gain. Also looked at other libraries forked from the original Adafruit lib.

I know that MRFC522 has some settings to control the gain, and I was hoping to find something similar with the PN532.

EDIT:
The datasheet can be found here:
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-pn532-rfid-nfc.pdf

In the PDF there is a link to the schematics. It can be found here:
https://cdn-learn.adafruit.com/assets/assets/000/009/729/original/PN532_Breakout_Schematic_v1.0.pdf?1374440547

And - the most detailed information about the PN532 board I could find, is located here:
https://cdn-shop.adafruit.com/datasheets/PN532_AntennaDesign_v1.0.pdf


texts: Getting a NACK after reading 1 byte from MCP9808 temperature sensor

texts:
I am implementing drivers for I2C interrupts for STM32F401RE and looks like the API for transferring the data seems to work. But for receiving, I see that I'm only able to receive one byte.

I am using the MCP9808 temperature sensor and can read 2 bytes in one transaction.

Here's the snapshot of the sequence of steps for reading 2 bytes according to STM32's reference manual.

Code snippet for IRQ handler (edit: ignore the TX parts since that's not the concern here):

void I2C1_EV_IRQHandler (void)
{
    uint8_t eventInterrupt = (I2C_handle_p->pI2Cx->CR2 & I2C_CR2_ITEVTEN) >> I2C_CR2_ITEVTEN_Pos;
    uint8_t bufferInterrupt = (I2C_handle_p->pI2Cx->CR2 & I2C_CR2_ITBUFEN) >> I2C_CR2_ITBUFEN_Pos;
    uint8_t temp;

    if (eventInterrupt)
    {
        //  validate the completion of START condition
        temp =  (I2C_handle_p->pI2Cx->SR1 & I2C_SR1_SB) >> I2C_SR1_SB_Pos;
        if (temp)
        {
            if (I2C_handle_p->I2C_State == I2C_TX_BUSY)
            {
                I2C_WriteSlaveAddress(I2C_handle_p, WRITE);     // write slave address along with write bit
            }
            else if (I2C_handle_p->I2C_State == I2C_RX_BUSY)
            {
                I2C_WriteSlaveAddress(I2C_handle_p, READ);      // write slave address along with read bit
            }
        }

        // ADDR
        temp = (I2C_handle_p->pI2Cx->SR1 & I2C_SR1_ADDR) >> I2C_SR1_ADDR_Pos;
        if (temp)
        {
            I2C_ClearADDRFlag(I2C_handle_p->pI2Cx);             // clear address flag
        }

        // TXE, RXNE
        if (bufferInterrupt)
        {
            // TXing
            temp = (I2C_handle_p->pI2Cx->SR1 & I2C_SR1_TXE) >> I2C_SR1_TXE_Pos;

            if (temp && I2C_handle_p->I2C_State == I2C_TX_BUSY)
            {
                I2C_TXE_Interrupt();
            }

            // RXing
            temp = (I2C_handle_p->pI2Cx->SR1 & I2C_SR1_RXNE) >> I2C_SR1_RXNE_Pos;

            if (temp && I2C_handle_p->I2C_State == I2C_RX_BUSY)
            {
                 if (I2C_handle_p->rxBufferLength == 2) {
                    // send NACK
                    I2C_ControlAcking(I2C_handle_p->pI2Cx, RESET);
                    I2C_handle_p->pI2Cx->CR1 |= 1 << I2C_CR1_POS_Pos;
                 }

        }

        //BTF
        temp = (I2C_handle_p->pI2Cx->SR1 & I2C_SR1_BTF) >> I2C_SR1_BTF_Pos;
        if (temp)
        {
            if (I2C_handle_p->I2C_State == I2C_TX_BUSY)
            {
                if (!I2C_handle_p->txBufferLength)
                {
                    GenerateStopCondition(I2C_handle_p);
                    I2C_StopTransmission();
                }
            }
            else if (I2C_handle_p->I2C_State == I2C_RX_BUSY)
            {

                if (I2C_handle_p->rxBufferLength == 2)
                {
                    GenerateStopCondition(I2C_handle_p);

                    I2C_handle_p->pRxBuffer[I2C_handle_p->rxStartIndex++] = (uint8_t) I2C_handle_p->pI2Cx->DR;
                    I2C_handle_p->rxBufferLength--;

                    I2C_handle_p->pRxBuffer[I2C_handle_p->rxStartIndex++] = (uint8_t) I2C_handle_p->pI2Cx->DR;
                    I2C_handle_p->rxBufferLength--;

                    I2C_StopTransmission();

                }
                if (!I2C_handle_p->rxBufferLength)                      // no more bytes to read
                {
                    GenerateStopCondition(I2C_handle_p);
                    I2C_StopTransmission();
                }
            }
        }

    }

}


texts: If I want to use as little current as possible, then what resistance wire should I use to get the hottest temperature?

texts:
I am trying to build a circuit that is able to melt wax (130˚F) and use as few amps as possible since it will need to be powered using a battery. Do I need to be looking for wire that has a high resistance or low resistance to get the most heat per mAh in the circuit?

I'm using about 20 feet of nichrome right now and it takes about 28 volts to get to that temperature with a current draw of about 2.4 amps but I would like to use less current that that if possible and that's why I'm looking into alternative choices of wire with varying resistance.

I love learning so explain your answer in as much detail as you'd like. :)


texts: How to deal with extra pins on reversible connectors?

texts:
I want a header on my board to be reversible. The header has 4 UARTs, 4 power pins (VA,VB,VC,VD), and power (3V3) and PWM for a servo. The functions of most of the signal pins of the header are symmetric, so channels A,B,C,D become D,C,B,A if the polarity is reversed. The only exception is a PWM connection. I'm wondering if having two pins for the PWM signal is going to cause issues. Should I connect these two pins together on both ends or only one end? Or is there a better way to deal with it? The pinout is pictured below.

Thanks in advance


texts: How to use a single supply with an opamp to create a DC amplifier

texts: I have a single positive power supply, and I want to amplify a DC input signal.  All sources I have seen decouple the input voltage with a capacitor because the input voltage is biased at VCC/2, however this would filter out the DC voltage that I want to amplify.  How do I do this?


texts: What is the best practice for driving IC enable pins?

texts:
When using ICs that use enable pins, what is the best practice for driving them in a microcontroller system (particularly when there's no especially pressing need to disable the device at any time)?

For example, I'm using a chain of parallel-to-serial shift registers to aggregate a large number of physical device inputs into a single serial bitstream to my uC, and these registers only operate when a clk_en clock enable pin is driven low.

The inputs will be polled for the lifetime of the uC, so at no point do I NEED to explicitly disable the clk_en signal.

Is it considered bad practice to have this pin permanently pulled low (i.e. with a pull-down resistor)?


texts: Lower volume on one earbud after fixing it (soldering)

texts:
Got one earbud wire ripped out accidentally, but luckily the wire itself was still fine, just had to open the earbud and solder wires again.
My earphones are Atomic Floyd super darts, high quality (as far as I can judge :-) ), so I could unscrew it to fix properly, or at least I tried.

Sound is back, but the earbud I fixed has a lower volume than the other one (as well as decreased sound quality).
Tried several time, to soldering again several times, swapping wires (in case of), but still the same.

Don't think it would be a ear wax problem (even if I did clean the earbud) as they were working perfectly right before I ripped out the wire, and didn't use them since {~4-5 months).

Any idea why this would happen? Bad soldering? Bad/Wrong tin (Used with 40% lead)?

Thanks for your help.
(Sorry if I misused some terms, not English native and not used to electrical engineering language :-) )


texts:
I have a homework which I am working on right now.

  Design a counter that counts 0 4 6 8 12 14 0... (mod6) and when to counter shows 14 it is going to stop and wait for 3 minutes. After 3 minutes counter is going to count 0 1 2 3 4.... 14 15 0 ... There is going to be 6.667 seconds between every count.

I created a counter which counts up to 15 but I do not know how I am going to display 2 digits. I am using Proteus and I have tried some multiple digit displays but could not figure out how they work. Since Proteus does not have a Binary-To-BCD converter (it only has the model, the configuration is not there and therefore it is not working) I believe that I need to use some kind of display integration.


texts:
I've received chips PCA9306DCTR (from Texas Instruments) but they don't have any dot or notch to define it's orientation (i.e. where is the pin 1).

In the datasheet there is a picture of this chip (in SM8 package) and it has a notch. However chips I've received has only strip of different color (please see the picture) and I've not found any information about it's meaning.

So, is this strip mark pins GND and EN (i.e. the same as dot or notch) or it marks SDA1 and SDA2?


texts: When replacing a PS, how do I know I'm safe if device doesn't list current?

texts:
I recently acquired a Lantronix UDS1100 telnet-> serial converter. It came without a wall wart / power supply.

I have an extra power supply from an old modem that I think might work, but I want to be certain.

The Lantronix's stated specs are 9-30VDC, 9-24VAC, 1.5 watt max. It doesn't mention current.

My potential replacement lists output of +12V, 2.2A.

How does one determine if this is okay or not?


texts: I'm trying to work out how I might emulate this assembly to replace the seat weight sensors below. I'd guess the sensors are just strain gauges, so a variable resistance or maybe capacitance. Unfortunately the control module is a black box. I can't see why the red/blu wire would be shielded. Any ideas what signal it might be carrying?


texts: UnRouted Net Constraint in Altium after Via Stitching

texts:
I am just wrapping up my Design of one of my project in Altium 17. I was done with adding Polygon Pour for various nets. I was trying to add Via Stitching in Altium.

After adding the stitching, Altium Design Rule Check shows an error. See the screenshot below:

It has been showing multiple of these errors. The nets and vias are actually connected with copper. I remember facing these problems earlier but I don't remember how I get sway with them. May I tried removing specific vias after Via Stitching and it solved the problem in the past but It is not helping me now.

I tried the suggestion in this link by disabling the "Check for incomplete connection" option and it solved the issue but I want to enable the option for detecting real issues.

Please help.


texts: Impedance matching high power transistor when VNA is useless

texts:
Recently I've been stuck up with the high power transistor (2-10W) at 900 MHz that needs to deliver 30 dBm of the broadband signal to the antenna. Since it works in the high power mode, it behaves nonlinearly and I can not match it with the standard VNA and Smith chart. Is this right?

All I'm left to do is to put some shunt capacitors on the output tx line and measure power at the output with the spectrum analyzer. Since it's all about try and error I am not very happy to proceed this way. I was hoping someone might point me to the more sophisticated and meaningful method.


texts:
In a datasheet like this one, how are \$C_{OBO}\$ and \$C_{IBO}\$ defined?

What I know:

C for capacity
O for output, respectively I for input
B for base
O for open, not connected

But with regard to what circuit are in- and output defined? In other words, where can this capacitor be visualized and what is the rationale behind it?


texts: DC Block after the Balance - what problems would that cause?

texts:
I am building a radio receiver using the MAX2021 down converter. And I am building a down-conversion circuit similar to the reference design provided by the data sheet:

My problem is that I only have two DC blocks. So I am trying to use my DC blocks after the balance, instead of before.
Would inputting a differential signal with DC bias into a balance severely impact the signal?
Thanks ahead if you know the answer.


texts: Problems with setting op-amp amplifier gain

texts:
I am using an LM6181 op-amp to try and build an inverting amplifier and implementing this circuit with a breadboard. I am struggling to set the gain as I wish. For simple testing I am using a function generator as the input with an impedance of 50 ohms, and simply producing a 1 MHz sine wave. The circuit I am using is this (not shown are two bypass capacitors in parallel of .1 uF and .01 uF for each bias pin):

R1 alters the output but not as expected fully. When R1 is also equal to 820 ohms, I observe a signal. When R1 is equal to 50 ohms, I observe a signal ~10X larger.I tried multiple resistors for R1 between 50 ohm and 820 ohm (200, 330, 560, 670 ohm) and all yielded the same severely attenuated signal (changing the resistor does not alter the signal). In fact, this signal is the same as when R1 is removed. Interestingly, the amplitude of this signal increases when the frequency of it increases too.

What could be causing these problems such that only 50 ohm and 820 ohm resistors produce an output as expected? I also tried a different signal source, using a silicon photomultiplier (essentially a photodiode) that to my knowledge does not have exactly a 50 ohm output impedance and observed the same effects. Below is my actual implementation.

I'd add more pictures but I can only have two links, sorry!


texts: replacing obsolete HEMT and differences between Package/Case and Supplier Device Package

texts:
I've been designing an amplifier, with ATF33143 as my HEMT in mind. Yet, I just found out the said HEMT went obsolete. So I started looking at SKY65050-372LF as a possible replacement.

On the DigiKey website, they have "Supplier Device Package" and "Package / Case" as separate criteria for transistors. I wasn't sure what the difference is between them.  So I just directly went to their respective datasheets. SKY65050-372LF has 'SC-70' as its package, whereas ATF33143 has 'SOT-343 (4 lead SC-70)' as its package.

Does this mean they have the same or different package? (question 1)

Also, I think 'current-rating' and 'voltage-rated' are the maximum current and voltage allowed, and 'voltage-test' and 'current-test' are the respective values at which the transistors are tested.

I would have thought 'power-output' would just be 'current-rating' * 'voltage-rated' but those numbers don't agree with the 'power-output' values given below.

What is the meaning of 'power-output' on datasheets and how did they get the value? (question 2)


texts: Is it permissible to use fractional aspect ratio W/L for MOSFETs?

texts:
I am designing a 2-stage op-amp (Miller compensated). For compensation, I am using a nulling resistance R in series with the compensation capacitance C, with the resistance implemented using a transistor biased in the triode region.

The circuit is shown below:

Now, I noticed that I can play around with the Gain-bandwidth product and the phase-margin by just varying the aspect ratio of the triode transistor. I noticed that lowering the aspect ratio (hence increasing the resistance) increases the GBW. So I decided to lower it.

Is it justified to use a fractional aspect ratio W/L? Say, W/L=0.5. It is practical? Common?


texts:
I am new to C programming. I need your help in understanding the some particular lines in a code segment for sensored control of a brushless dc motor. It was written for a 16-bit MCU (dsPIC33FJ32MC710). This particular section is from the interrupt service routine, and contains two ISRs.
Can you please explain to me in simple words, the lines marked by //???? What is being done there, and why? Any other comments are also welcome.

int DesiredSpeed;
int ActualSpeed;
int SpeedError;
long SpeedIntegral = 0, SpeedIntegral_n_1 = 0, SpeedProportional = 0;
long DutyCycle = 0;
unsigned int Kps = 20000;                   // Proportional gain
unsigned int Kis = 2000;                    // Integral gain

void __attribute__((interrupt, no_auto_psv)) _T1Interrupt (void)
{
#ifdef CLOSEDLOOP
    ActualSpeed = SPEEDMULT/timer3avg;
    SpeedError = DesiredSpeed - ActualSpeed;
    SpeedProportional = (int)(((long)Kps*(long)SpeedError) >> 15);                 // ???
    SpeedIntegral = SpeedIntegral_n_1 + (int)(((long)Kis*(long)SpeedError) >> 15);   //???
    SpeedIntegral_n_1 = SpeedIntegral;
    DutyCycle = SpeedIntegral + SpeedProportional;
    PDC1 = (int)(((long)(PTPER*2)*(long)DutyCycle) >> 15);  // ???  PWM duty cycle
    1PDC2 = PDC1;
    PDC3 = PDC1;
#endif                              // in closed loop algorithm

    IFS0bits.T1IF = 0;
}

void __attribute__((interrupt, no_auto_psv)) _IC1Interrupt (void)
{
    int Hall_Index;

    IFS0bits.IC1IF = 0; // Clear interrupt flag
    HallValue = (unsigned int)((PORTB >> 1) & 0x0007);  // Read halls

    if (Flags.Direction)
    {
        OVDCON = StateTableFwd[HallValue];
        Hall_Index = HALL_INDEX_F;
        }
    else
    {
        OVDCON = StateTableRev[HallValue];
        Hall_Index = HALL_INDEX_R;
        }

// The code below is uses TMR3 to calculate the speed of the rotor
    if (HallValue == Hall_Index)  // has the same position been sensed?
        if (polecount++ == POLEPAIRS)  //has one mech rev elasped?         // ???
        {                               // yes then read timer 3
        timer3value = TMR3;
        TMR3 = 0;
        timer3avg = ((timer3avg + timer3value) >> 1);    // ???
        polecount = 1;
        }
}


texts: How to use output of Indirect Kalman Filter(=error state kalman filter)

texts:
I would like to measure true degree from IMU sensor by using indirect kalman filter(IKF).
I can calculate error of angle and error of the bias of gyro from indirect kalman filter as attached image.
However, i can not remove the bias of gyro despite using error of bias calculated from IKF like a attached image.
I would like to know how to use IKF's output.
Please let me know if you have any solution.


texts: Need help understanding details of thermostat wiring scheme

texts:
I bought this thermostat to control air circulation, that is using it for cooling purpose. So far I managed to make it work, but I do not fully understand the wiring scheme. I would appreciate help to fully understand the scheme.

In the scheme L is linked to 3 squares where the middle one labelled with "5". The square to the right is connected to the square labelled with "2"?  What is the purpose of this connection?

The square to the left of "5" is connected to the square labelled "N" using a dotted line. What is the purpose of this connection?

The model number is RTR-E 6732
https://docs.rs-online.com/8e9b/0900766b800ccc84.pdf

EDIT:

I found another wiring diagram where the unlabelled blocks are lacking (see page 9)
https://docs.rs-online.com/ae5d/0900766b81583b25.pdf


texts: Is it worth it or safe to design your own power supply?

texts:
I am currently building some kind of game console based on a Raspberry Pi, with some features (one discussed here), right now I am using for this project a Meanwell power supply.

However, I was thinking to design soon or later a PCB instead of wiring a power board and an arduino uno, since it can be so cheap nowadays to design it with KiCAD and then print & send from China.
So make a board with some microcontroller for I/O, measurements and so, and a power supply board too, in order to make all the system embedded.

Is it worth the hassle ? As far as I know a transformer, bridge rectifier and a circuit with several LM2596 or other switching power supply IC to generate 3.3V, 5V and 12V doesn't seem hard to make, but are there any downside other than risks of shock ?

Edit : This is only for my personal use, I won't mass produce it or sell !


texts: Can I monitor an ATmega406 using an Arduino Uno via SMBus?

texts:
I would like to build a small Battery Management System (BMS) using an ATmega406 and then maybe use an Arduino Uno to show information about the cells on a computer or a small LCD.

Here's a white paper about it: Battery Management System Atmega406 summary

Anyone knows a good site where I can read about the SMBus and what tools I need on a windows computer to use it?


texts: High Frequency Transformer Configuration for an Electronic Circuit Voltage Supply

texts:
simulate this circuit – Schematic created using CircuitLab

Dear Members,

I could not find this question on this forum and want to have few opinions in this regard.

I want to choose a transformer for boosting around 10V to 30V in a Flyback converter configuration and later form +15V/ -15V. This transformer is used to generate voltage which is used to drive electronic components like OpAmps, Mosfets etc. The Power Rating will be around 3W.

My question is :
What will be the difference if I take the Transformer Configuration A with only one Primary Winding and one Secondary Winding or if I take the Transformer Configuration B with connections shown having one Primary Winding and two Secondary Windings joined together as one.

Will there be any difference between both Transformers regarding EMI performance if same Primary to seconadry Turn Ratios and Power Ratings are taken ? Which configuration has better performance regarding EMI and voltage stability over the other ?

Thanks alot for sharing your experiences.


texts: Which characteristics of a Radio signal are involved to be selected by radio receiver?

texts:
the radio antennas receives millions of signals. how our radio selects the appropriate signal as it's input?
which characteristics of the signal are involved for this selection.


texts: How to drive 315 coills in flip-disc display

texts:
Recently I've bought 9 surplus electromagnetic flip-disc displays on Ebay. Each display has 5x7 dot matrix. Every dot is controlled by separate pin. See below:

As far as I understand to flip one dot user should apply 24V on pin #3 while #4 is connected to GND to open switch, then 24V to the corresponding pin for the dot and GND to 5,10,9 (or vice versa to make it black).

The problem is how to minimize control equipment. I need to control 35 dots for each display + switch with Arduino. I can't use shift register for pins because I need to reverse polarity to open/close dots.

My idea is to use:

35 relays to switch dots
low-power shift registers (74HC595) to control relays from µC
L293 to drive 24V thru relays
high power shift registers (TPIC6595) to choose active display by opening its reed switch

Is this optimal solution?


texts: How can I prove that Vce saturation lies below .2V?

texts:
When I try to prove that Vce for saturation is below .2V and I take npn transistor I simply consider emitter to be at 0V and thus base emitter junction being forward biased base gets a voltage of (.7 V + x) where x is positive constant then to forward bias base collector junction I will have to have forward Voltage of at least .8V so collector voltage becomes .7v+x-.8v+z where z is a positive constant
and x is greater then z so collector voltage should become -.1V+(x+z) thus What I am getting is Vce should be greater then -.1V
When follow same procedure for PNP I get Vce greater then .1V
which is totally in coherent with <.2V What I am doing wrong please help


texts:
I am new to Verilog and I was trying to make a Decade counter. I simply took the reference of an actual circuit that implements the decade counter using JK-Flip Flops. So I wrote a sub-module for JK-Flip Flop and a top-module that would connect all the Flip-Flops.
Here is my code for the JK-Flip Flop:
module JK(
    input j,
    input k,
    input clk,
    input reset,
    output reg q
    );

initial q=0;

always @ (*)
    begin
        if (reset)
            q=0;
    end

always @ (negedge clk)
    begin
        if (~j&&k)
            q=0;
        else if (j&&~k)
            q=1;
        else if (j&&k)
            q=~q;
    end

endmodule

and my code for the circuit:
module DECADECOUNTER(
    input clk,
    output q0,
    output q1,
    output q2,
    output q3
    );

JK jk0(1'b1,1'b1,clk,q1&q3,q0);
JK jk1(1'b1,1'b1,q0,q1&q3,q1);
JK jk2(1'b1,1'b1,q1,q1&q3,q2);
JK jk3(1'b1,1'b1,q2,q1&q3,q3);

endmodule

So the idea is that the last input is a reset and will clear all of my flip-flops if both q1 and q3 are 1 (1010).
But when I try to simulate the circuit on Xilinx, I get the following result:

This screen is from very instant the simulation starts. As you can see q0 and q1 are 0 but q2 and q3 are not. My guess is that after resetting q1, the condition q1&q3 went false and hence q2 and q3 remained to be 1. This seems as if the circuit is asynchronous. But that isn't the way Verilog is supposed to work right? If something is present in the ports, ideally its value should be propagated to other ports before it changes. Because that's how a real-world circuit is supposed to work.


texts:
I am trying to get the ADC working. I tried following the tutorials, it seems I am doing it right but when I try to poll for the ADCAL bit from 1 > 0 It seems to never change. Whats going on here?

Essentially after writing (1<<31) I poll for that bit to change back to a zero. I know what the resulting register hex value is "0x90000000" with the (1<<31). In the while loop if it changes it back to a zero the loop should result to a false and break out of it?
Not sure whats happening exactly.

Code w/ Comments:

/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  *
&copy; Copyright (c) 2020 STMicroelectronics.
  * All rights reserved.

  *
  * This software component is licensed by ST under BSD 3-Clause license,
  * the "License"; You may not use this file except in compliance with the
  * License. You may obtain a copy of the License at:
  *                        opensource.org/licenses/BSD-3-Clause
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stdio.h"
int msTicks = 0;
void ADC1_IRQHandler(void){

}

void delayMs(int ms){
    msTicks = 0;
    while (msTicks < ms);
}

void SysTick_Handler(void){
    msTicks++;
}
int main(void)
{
    SysTick_Config(SystemCoreClock / 1000);
    RCC->AHB2ENR |= ((1<<13) | (1<<0)); //Enable ADC & GPIOA Clocks
    ADC1->CR &= ~(1<<29); //Disable Deep Sleep Mode
    ADC1->CR |= (1<<28); //Enable ADC Voltage Regulator
    delayMs(1000); //Give it 1 Second for the ADC Voltage Regulator to stabilize
    ADC1->IER = ((1<<0) | (1<<2)); //Enable EOC and ADRDY flags
    NVIC_EnableIRQ(ADC1_IRQn); //Enable the IRQ handler
    NVIC_SetPriority(ADC1_IRQn,0); //Set the priority of the IRQ handler
    ADC1->CFGR |= (1<<13); // Enable continuous mode
    ADC1->SQR1 |= ((1<<9) | (1<<8)); // Let the first sequence be Channel 12
    ADC1->CR |= (1<<31); //Start ADC Calibration
    while((ADC1->CR) == 0x90000000){ //Wait for Calibration to be done

    }
    ADC1->ISR |= (1<<0); //Clear the ADRDY flag
    ADC1->CR |= (1<<0); //Enable ADC

  while (1)
  {

  }

}


texts:
In order to use a sensor (MQ-7: https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-7.pdf) i need to cycle between 5V and 1.4V. Any ideas on how to do this?

Thank you!


texts: Interpretting WS2812 datasheet data input requirements

texts:
I'm really new to hobby electronics, just got a raspberry pi and trying to read different data sheets and requirements to figure out what I need to get so that I can drive an LED strip with the correct voltages and current. I've been looking at the data sheet for the WS2812 NeoPixels here: https://cdn-shop.adafruit.com/datasheets/WS2812.pdf

Specifically at

I'm quite confused about the Input current listed there and what exactly it means. Firstly it says in the Condition VI=VDD/VSS but VSS is 0 so is that not actually a division going on there? And I'm a little confused about it being a max of 1 micro Amp for the input, is that really the max current it can take?

I'm trying to figure out what sort of pull-up resistor rating I need so that I can drive the data line with an external 5v power supply and control the switch by turning on and off sending the 5v to ground with the GPIO pins of my raspberry pi, something similar to #4 in this answer on another post: https://electronics.stackexchange.com/a/82149/166893

Perhaps I'm going about this wrong and I don't need this? If there is any guidance I can get in determining the pull up resistor rating that I need that would be great. I can see that I need at least 3.5V but that doesn't seem to be all the information I need.


texts:
I have an optocoupler circuit that is used to accept 24V input (100 ms pulses) and interfaced to a microcontroller.

The schematic is as follows:

Opto: BL817C or TLP621.

TLP621 datasheet

As per my calculations, the LED forward current and emitter current are well within range (i.e. do not violate the CTR limits).

Problem:

The circuit behaves as expected initially, but after some time the emitter voltage is stuck at ~2.65 V.

What could be the reason for this? I know I am making some fundamental mistake, but haven't been able to debug yet.

Update:

Adding output waveforms.

Green: Input signal. (24V pulses 10x attenuated)

Yellow: Pin 3 of optocoupler (marked as "uC" in the schematic).

Update 2:

So I have tried the following to debug.

Made a small protoboard with the optocoupler and 2 resistors. Fed the circuit with 24V input signal and everything works as expected. (Tested for 2-3 hours.)

I have then wired the protoboard to the controller PCB. The circuit works for some time (40-50 min) and then the output is stuck at 2.7V.

The output voltage is 3.3-0.7V i.e. ~2.6V, so my hypothesis is that the phototransistor gets damaged and remains always on. This happens only after interfacing with the controller and working for some time.

The controller pin is defined as input pulldown. Any ideas as to what might be going wrong?

Update 3:

So I pulled another optocoupler out and wired the phototransistor end only: 3.3 V to the collector and the emitter pulled down to ground with a 5.2k resistor. The LED end had nothing connected.

Emitter voltage as probed:

This could only happen if the transistor is leaking current. Dark current cannot be this high, unless it's damaged?


texts: A coil I built has divergent measurements respective to wire resistance and AWG size

texts:
I'm not exactly into building precision coils, but I decided to make one for a subwoofer voice coil.

I used what was supposed to be AWG 28 wire, it completely fit the diameter. I wound it tightly over a cylindrical metal piece and it took 15 turns until the length of the coil was 5 mm.

So I went on and built a 25 mm tall, 40 mm diameter voice coil with two layers (orthocyclic winding) and it has 78 turns on each layer (completely compatible with AWG 28). The legs are 10 cm each.

But when I measured the resistance with my multimeter it read 5.8 Ω. I was expecting 4.2 Ω.

Noting that I'm already accounting for the resistance of the multimeter leads and the electrical connection with the legs, I measured the resistance between two points in each leg and they both read 0.1 Ω (the whole coil measured 6 Ω, hence 5.8 Ω actual resistance).

I also tested my multimeter with resistors I have. A 100 Ω resistor measured 101.1 Ω, a 22 resistor measured 22.1 Ω and a 4.7 Ω resistor measured 5.1 Ω (all of that without subtracting the resistance of the leads this time, and all of them being 5% tolerance resistors).

It seems the multimeter is reasonably calibrated, values from 100 to 4.7 Ω show very little discrepancy.

What could be happening here?

I don't see any damage that could suggest fractures along the wire.

Could this actually be AWG 29 wire with a thick insulation?

Or a cheap wire with poor copper content?

Ps.: I wound it in an aluminium former which I then removed from it. Now there's only the copper wire with a tiny bit of resin that probably doesn't amount to 0.2 grams. I weighed it on a scale and it read 11 grams. With the error it could be 10 or 12, but an AWG 28 wire with 19.8 meters of length and a cross-section area of 0.08 mm² should weigh a bit over 14 grams. I tested my scale with water and a syringe and it seems the errors are always inside +- 1 gram (as expected.) This somewhy fits better with the weight AWG 29 wire would have with the same total length of wire.


texts:
I want to make a device that, with a press of a button, will send an ID signal, wirelessly, to some other device. It has to have:

10m range (~30 feet)
<2ms response time (from the press of the button to the reader's response)
ID size more than 10bits.

There may be one person standing between the transmitter and receiver but, other than that, receiver-transmitter line is unobstructed. If it wasn't for this, I suppose some IRs would do fine.

What are some cheap options?


texts: Stymied in search for an electronic lock

texts:
I'm looking for an electronic lock to secure a small, wooden box (breadbox-sized). The box is ordinary: one side of the lid is hinged against one side of the box.

When I look for 'electronic locks' in a search engine, I don't get anything that would do: either expensive, bulky door locks (too big and don't hold in the right direction for a box) or just magnets (which won't hold once the power is cut). I just want something small, which requires power and a signal to release the catch/bolt.

Where should I look or what search term should I use?

(I know this may not be apropos here, but I don't see a stackexchange site where it's more relevant.)


texts: Changing the port values inside the loop (8051)

texts:
I am using RX/TX module an ht12d/e for my project. I will make it short, in my program i am making a packet of data and sending it and the receiver is receiving it synchronously. The receiver is set in a way that it waits for the value 0x0a from the transmitter, when that is received then it waits for 0x05 when that is received then it waits for another 0x05 and in between 0x05's there is 2 bit data contained in nibble. after 0x05 is received it then waits for another 0x05 and in between 0x05's it gets the information. there are 16 information in one packet. The problem begins here, when i send the packet in controlled manner that is by pressing a button one 0x05 is sent and take off the button 0x00 is sent, in this manner whole packet is received successfully, but when i transmit the packet using a function, nothing happens, no indication that the packet has received or receiving.
 Note: the value on PORT 1 is transmitted, 8051 micro controller is used using c language. Transmission is only 4 bits parrallel.

while(1){
        if(highh==0 )
        {P1=0x0a;while(highh==0);}
        if(loww==0 )
        {P1=0x05;while(loww==0);}
        P1=00;
    }

the above code works , in which highh and loww are representing 3.7 and 3.6 pins of 8051. i press them in a manner of sending packet.

void transmit()
{
    for(i=0;i<i2;i++)P1 = 0x0a;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    ///////
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    for(i=0;i<i2;i++)P1 = 0;
    for(i=0;i<i2;i++)P1 = 0x05;
    P1=00;
}

The above is the function which is i am using, which is not working. I have used P1=0 as information. The receiver is waiting for eighteen 0x05 values and one 0x0a at start. i2 is variable for delay duration. i have checked different duration delay. How can i get the function working? Is this the reason that the port values should be changed once in the main program loop.
What actually i am doing is;
1; collect data from different sensors.
2; split every byte of data into 2 bits.
3; transmit 0x0a
4; transmit 0x05
5; transmit info(containing those 2 bits which is recieved from sensors but actually are 4bits).
6; transmit 0x05 again,
7; go in similar way. till total of 16 info nibbles are sent.

and the reciever gets info after 0x05 has finished recieving.


texts: What DC motor specs do I need to lift a weight with certain gear configuration

texts:
I'm trying to determine how much torque, power, voltage, and size I need for my motor in order to lift between 50-100lbs given the gear configuration below. Assume that the motor and gears are securely held in place. Also, the speed at which the weight is lifted doesn't really matter as much as just being able to lift the weight. The Worm and Worm Gear are to prevent the weight from dropping if the motor is not running, and the bevel gears are necessary for the confined space it'll be held in. The motor also needs to be 2" in diameter or less.

Ideal dimensions for each of those is 2" diameter for the motor, ~1.5" diameter for the Worm Gear, 1/2" thick for the worm, and about 1/2" diameter for the bevel gears. Given that everything is quite small to lift such a large weight, does such a motor of that size even exist to lift that much? If nothing, I would really appreciate an equation or a way to calculate the torque needed to lift the weight using those gears.


texts: "Dead-man" safety switch for HV bench work?

texts:
Long-haul freight trains and other systems that required an alert operator for safety would often implement a "dead-man" switch that would shut the system down if the operator couldn't actuate the switch in a timely fashion.  Some time ago the military spent money on IFF (Identify Friend-or-Foe) systems to reduce friendly fire incidents.  Wood workers sick of losing fingers to table saws got a clever SawStop system a few years ago: a circuit that drops the blade below the table if it senses the capacitance of a human body.

I began wondering why electricians don't have safety systems like that: that clamp and/or divert current away from a worker, or at least his heart.  We do have GFCI breakers that can protect us from grounding a hot supply.  But when we sit down to work on high voltage gear could we construct a circuit that breaks a power supply if it senses current across our chest?  (The trick would be to avoid creating a circuit: i.e., do something better than just connecting a conductive patch over your heart to the neutral/ground and relying on GFCI/AFCI breakers, because then you'd trip the supply during contacts that, absent that excellent ground, wouldn't produce a dangerous shock.)

(This is mostly a "thought exercise" question, because I realize such a system wouldn't mitigate all electrical hazards.  I guess if we wanted to avoid getting killed by all electrical risks, including things like discharging capacitors, we could wear a conductive shirt, so in the worst case we'd only get burned from points of contact up to the first good contact with the shirt?)


texts: How to create a microseconds delay function in STM32F0

texts:
I was using STM32F4 and i had created a microsecond delay function using DWT register. And now, i'm using STM32F030F4P6. And this MCU has not DWT register. So, i tried to create another delay function.

void delay_ticks(uint32_t ticks)
{
    SysTick->LOAD = ticks;
    SysTick->VAL = 0;
    SysTick->CTRL = SysTick_CTRL_ENABLE_Msk;
    // COUNTFLAG is a bit that is set to 1 when counter reaches 0.
    // It's automatically cleared when read.
    while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0);
    SysTick->CTRL = 0;
}

static inline void delay_ms(uint32_t ms)
{
    delay_ticks((ms * 8000)); // number of ms*8000000 can overflow so i use 8000 instead of (ms * 8000000) / 1000)
}

when i try to set delay to 1 second, i get 8 seconds. And when i try to set delay to 500 miliseconds i get 4 seconds. There is always a 1:8 ratio

note: the VAL register is automatically loaded with the value of the LOAD register when the timer is enabled.

EDIT: I added these lines of code to choose HCLK as a source and now it works. (HCLK/8 is default value. so i need this configuration):

SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK_DIV8;

SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK;


texts:
[

I designed a simple op amp and now I am trying to make it work as an integrator as shown in image 1.
The output voltage waveform looks fine for a sine input as I am getting negative cosine as shown in image 2.
However, when I zoom in, you can see that the waveform looks weird as shown in image 3.
To compare, image 4 shows the output voltage of an ideal op amp in Lt spice.
Anyone knows what might be wrong with the circuit? Any help is appreciated. Thanks


texts: Why there are two or more PCIe Hard IPs in some FPGAs?

texts: I was looking for FPGA with PCIe Hard IPs. And I found some FPGAs with more than one Hard IPs. what is the advantage of having more than one Hard IPs in a single FPGA?


texts: Controlling multiple Solenoid valves like addressable LEDs Arduino

texts:
I am asked to implement a small indoor musical fountain which consist of around 45+ solenoid valves.
Rather than having separate dedicated lines to the valves I would like to implement something like how addressable LEDs works, so that we can send a signal from Arduino exact same way the Neo Pixel LEDs works, the corresponding valve has to toggle its state.

I thought its better than daisy chaining shift registers like 74HC595.
How can I achieve that and I agree I have no idea how the addressable LED actually works. Guess its some sort of PWM way, sorry for that..
Please suggest some sort of this address reading system that can connect to each valves and can toggle the valve.


texts:
Im practicing solving RLC circuits and there is this exercise that I attempt to solve and now I didn't understand something that was made in the exercise's solution. This is the exercise, I need to find the expression for v(t), t > 0.

The thing I didn't understand was related to how the question is solved:

Should not be an expression for i(t) and then solve somehow to v(t)? Because in and RLC series circuit, current is the same for all components. The book I'm using (Sadiku) divides the chapter into source free RLC series and source free RLC parallel circuits, and respectively, gives a way to calculate i(t) in the series and v(t) for the parallel circuits. I can't understand why the expression in RLC series could be in terms of voltage... It doesn't make sense to me. Apreciate any help...


texts: Custom wound transformer primary winding appears shorted

texts:
I am currently building a step down transformer with multiple secondaries and a single primary. The core material is standard silicon steel EI laminations.

The primary is spec'd out to use 127 turns of magnet wire with the secondaries being proportional to that in the normal way for voltages. I have 3d printed a custom bobbin made out of abs plastic.

The problem is after I wind the entire transformer and plug it in for some reason under no load 8 amps of current are drawn on the primary which leads to A LOT of heating requiring me to shut down the transformer to prevent damage. What are some possible reasons for this high current draw when the transformer under max load was designed to draw no more than a single amp on the primary?

EDIT: Detailed Design

The core is made of silicon steel rated to 2T with a center leg width of 22.23mm and a stack height of 90mm.

Primary - 127 Turns of 24AWG

Secondary 1 - 14 Turns of 18AWG

Secondary 2 - 9 Turns of 18AWG

Secondary 3 - 6 Turns of 24AWG

Secondary 4 - 17 Turns - Center tap - 9 Turns - Tap - 17 Turns

simulate this circuit – Schematic created using CircuitLab

Above is the basic test schematic, just insert the additional secondaries which were also open.


texts: Mathematics Regarding Transformers in Series?

texts:
Is there a way to mathematically express transformers in series? I'm curious if I can use the transformer equation to express this, but I'm not sure how to handle it. Would it be as simple as, say, treating the n transformers in series as just one transformer like: $$\frac{V_{P0}+...+V_{Pn}}{V_{S0}+...+V_{Sn}}=\frac{T_{P0}+...+T_{Pn}}{T_{S0}+...+T_{Sn}}$$

Where V is voltage, the subscripts p and s are primary and secondary, and T are turns of a winding.


texts:
I am trying to port a design from Xilinx to Altera, and I have issues with the DRAM controller IP (for a Cyclone-V and a LPDDR2 mem).

I have managed to generate the IP, but I don't understand which clock should be used for the Avalon-MM interface.

I have looked at a sample design which uses Qsys, the avl_0 bus is marked with associated clock = mp_cmd_clk0, not the clock used by the NIOSII CPU, which is pll_ref_clock used by the memory controller's PLL.

As my design only uses VHDL, no NIOS nor any other Altera IP, I would like to avoid Qsys for wiring the blocks together.

So :

What is the reference clock for the Avalon bus ? pll_ref_clk, afi_clk, afi_half_clk, something else ?
Can I choose the frequency, or is it a fixed ratio based on the DRAM datarate, the bus width ?

(As comparison, the Xilinx MIG DRAM controller has internal FIFOs, clocks are inputs and can have any frequency)

EDIT

I have eventually found some relevant information.

https://www.altera.com/literature/hb/external-memory/emi.pdf (10MB !)

Volume III, Chapter 4 : Hard Memory Interface.

The Avalon bus[ses] are managed by the "Multi-Port Front End (MPFE)"

The Avalon busses are associated with the mp_cmd_xxx_clk, mp_rfifo_xxx_clk, mp_wfifo_xxx_clk signals, and there is some internal resynchronisation in the memory controller so that any clock can be used :
"The MPFE handles the clock crossing between user logic and the hard memory interface."

Not all Altera FPGA families seems to have that feature available, or they use different controllers. This Altera DRAM controller for Cyclone V has finally very similar features to the Xilinx MIG IP.


texts:
I would like to connect my Lilypad Arduino to a WiFi 802.11 network that provides internet. What is the best way of achieving this? Can I use a XBee module and somehow interface with my home router? Is there a WiFi option available?

Thanks so much all!


texts: Proper material for testing capacitor at 105°C

texts: I've built a circuit to estimate capacitors life. I need to test it at 105°C. I have no idea which material to use for the chamber that I want to put my capacitor in and control the temperature.


texts: Grounded Oscilloscope and Power Supply - Should probe's ground ever be used?

texts:
I have an oscilloscope and power supply which have a common ground-reference (I think that is the correct wording? Neither of them are isolated/battery-operated/floating). Is it typically the case that use of the oscilloscope probe's ground connector will result in a current loop?

In essence, should I always be using something like a differential probe (or similar differential functions) in this configuration?


texts: Reduce burning time for a toaster by changing resistor?

texts:
A good looking toaster still working, but I notice recently the bread slices went always too much brown/black even with the minimal time setting (stage 1). The time levels are set by a potentiometer, I thought I could change(parallel or serial) the resistor to reduce time. But after disassembled the toaster and unsoldered the potentiometer, I measured the resistance at stage 1 is 0 (Ω). But still gives 1'25" of toasting/burning time. (stage 6 for 2'50".) What can I do to reduce the burning time?
Many thanks for any advice.
Hereby I attached the photos of the PCB board.


texts: My question relates to decoupling capacitors on power input rails. I see a lot of designs with MCU boards that use only decoupling capacitors and no chokes, beads, inductors, or resistors. Isn't this bad design practice because of the switch-on surges that occur? Are they only using caps because a lot of entry-level MCU applications are relatively low current?


texts: I have an idea/invention and look for a real investor/industry to take it to the next level?

texts:
I checked many online resources/websites and all of them asked me to pay thousands of dollars to make it real! I couldn't find any one that says you don't have to pay and we will take it from here once we hear about your invention and decide that we like it!!!
Do you know/heard of any reliable willing investors or industries that welcome new inventions or ideas within the electronics field?
Thanks


texts: How to merge polygons into a single pad?

texts:
I need to create a pad in a PCB footprint, This pad is created using these 3 polygons but I dont know how to merge them together into one pad. I am using Altium 17.

edit

Thanks to Chris's comment,It can be done using a more 'poly' polygon.
Now I need to add pad number/designator to the pad.


texts: Electromagnetic coupling between two coils

texts: I'm trying to understand the behaviour of electromagnetic coupling between two coils. One of my coils is connected to the output of a Colpitts oscillator as shown below with the excited coil labelled as L1 and I want to observe the voltage and frequency characteristics of another coil when placed directly on top of the excited one. I'm pretty sure I can't just have the disturbed coil floating. My thoughts is to have impedance matching on the disturbed coil where one part of the coil is connect to common ground used in the oscillator circuit which then connects to a load and then back to ground again. Is this design satisfactory or am I missing something?


texts:
I'm doing a board layout that involves a GCT_USB4110-GF-A USB receptacle. I need to accurately place the receptacle on the board so that when a user plugs in a USB-C cable, the plastic part of the cable is flush with the outside of the case of my product.
I've had a look online and I haven't been able to find any information on the standard insertion depth for USB-C receptacles or plugs. Unfortunately there is no info on any datasheets I could find either.
All of the USB-C devices I own seem to have about 1.5-2.5mm of casing plastic between the plug and the outermost edge of the socket. I'm wondering is there a standard figure for this? How thick can the wall of the casing of my product be and how close to the outer edge must the receptacle be placed?