texts: How can a diode act as a detector in a crystal receiver?

texts:
I was reading about old crystal radios and read that in a crystal receiver the radio signal in the air is first selected by a tuning coil and then converted to audio signal by a diode.

I am confused since I used to know that diode's role is only to allow current in one direction. How can a diode act as a demodulator (remove carrier from an RF signal)?


texts: 12V lighted rocker switch getting hot even without load

texts:
Is it normal that 12v lighted rocker switches get hot even when the load is not connected? Attached is the schematic and the PCB layout for such switch: https://lcsc.com/product-detail/Rocker-Switches_ROCKTEK-RT-S02-113-R42BR_C309263.html

The switches get very hot, the ones with more load get even hotter.

(VCC is 12V)


texts: Shield wire in Micro USB extension lead appears to be ground

texts:
I am currently working on a Bluetooth project which needs micro USB for charging a battery. My original plan was to use a female surface-mount micro USB socket and connect its +5v and ground pins to my Bluetooth module's battery charger. However, after seeing how tiny the pins were on the sockets available at my local electronics store, I decided it would be tedious to work with in a non-SMD application. I instead opted to use a Micro USB female to male extension lead, which I would strip, connecting the relevant +5v and ground wires to the module.

After stripping the cable, I connected it to a USB power-bank used a voltmeter to ensure I was going to solder the correct wires to the module. I ran into an unexpected problem: There was no voltage across the Red and Black wires which diagrams I found on the internet said were for +5v and ground respectively. This same issue occurred when I used other power sources.

That image might be a little hard to see, but I have the +5v and ground wires connected to the voltmeter and it reads an insignificant voltage.

Interestingly, after some experimentation, I found that connecting the shield wire (instead of the black wire) to the negative lead of the volt meter gave 5 volts.

I had the same result no matter the device I connected the USB cable to.
Should I go ahead and solder the shield and red wires to the module because they work, or is there something I'm missing which could result in ruining the board?
Also, If I decide to connect the green and white data wires to the module (which can act as a USB slave) how should I wire it then?


texts: Question about feedback in a current reference

texts:
I'm studying the following Vbe-based current reference:

The author of my book says:

  Observe that the circuit has two feedback paths around the gain stage. One positive, the other negative. Assuming transistors M1 and M2 matched, equal
  currents are injected into R and into the diode connected transistor Q1. The voltage across a diode changes as the logarithm of the current; therefore, the feedback on the resistor side is typically stronger than the one on the
  bipolar transistor side. Transistor M2 and resistance R form an inverting amplifier. Therefore, in order to ensure stability, node B must be connected to the positive terminal of the differential gain stage.

I've understood that the loop which contains M2 is the negative feedback loop and the loop which contains M1 is the positive feedback loop (to check it, it is sufficient to break the wire, apply a small voltage increase and note that M1 and M2 are common-source configurations, which thus invert the signal). But what does it mean, from a mathematical/electrical point of view, that "the feedback on the resistor side is typically stronger than the one on the bipolar transistor side"? What would happen, from a stability point of view, if inverting and non-inverting terminals of the op-amp would be exchanged? How to work in general when we have two (or more) feedback loops?


texts: How to prove that a circuit has negative feedback?

texts:
Queries regarding this circuit:

I am able to say that this circuit has negative feedback but my procedure is disorganized. I want a step wise procedure to identify the polarity of feedback.
In this circuit the 10K resistor is acting as feedback (correct me if I am wrong) but the resistor I am unable to fit the whole thing in format of basic amplifier and feedback amplifier for shunt shunt feedback (again correct if I have wrongly identified the type of feedback topology) I mean the ports of feed back resistor are not lying at end like in below diagram but in some what middle thus how will I do feedback analysis of the circuit?
Consider the circuit shown is incremental model of actual circuit where BJT is biased in active region


texts: Why use a N channel MOSFET as high side H bridge switches?

texts: I've seen N channel MOSFETs as high side switches of H bridges quite often, which requires a charge pump to drive. Wouldn't a P channel MOSFET be easier, simply isolating the microcontroller command from the gate source voltage? Why use the N channels instead then?


texts: Anyone got these optical encoders working?

texts:
I got these Optical Encoders from a local vendor and connected it to my arduino in the following order;

(+)----> 5v
(-)---> Gnd
(01)--->2
(02)--->3

But, it burnt and smoked out as soon as I connected it. I am assuming it requires a current limiting resistor, but I couldn't find a datasheet on the product anywhere. There's just some chinese written behind it.

Is there anyone who could shed some light on this?

Updates

Here are some photos of the internals, apparently there is a current limitting sensor inside. But there are no resistors on the output.


texts:
I'm trying to implement a 12V to 5V step down voltage regulator with a Texas Instruments LM22677, as suggested in the device datasheet (Pag 12, Fig 20).

Regarding the selection of the power diode, TI suggest a Schottky with at least 1.3*Vin (15.4) rated voltage, and the maximum load/output current as the rated current. So this leads to a Schottky with ~15V@5A ratev values, which I've been struggling to find, mosly due to size limitations on my PCB.

So my question is, could it be possibly replaced by something like this, which is small enough to fit on my PCB and can safely handle the load current, or does the rated voltage needs indeed to be close to the input voltage, so that it can act as an overvoltage protection?


texts: Does input signal mean same as input in transistors as amplifier?

texts:
During solving [this question] I came across a term input signal, I want to know whether input signal means the input voltage or change in input voltage? I am unable to solve if I take input signal as change in input voltage, because i don't know the change in output voltage.

Also if I take input signal as input voltage and output signal as output voltage then also iam unable to solve since I don't know the output voltage , only the voltage across output resistance is given and we know that \$\ V_output = V_cc - I_c R_c\$ (where \$\ V_cc\$ is collector voltage in ce configuration) to find output  I know only\$\ I_c R_c\$ but not \$\ V_cc\$

If go with assumption 1 then I am getting input signal (ie. change) but how to find the base current ( as given in question only base current not the base signal current) because the only relation know is \$\ dV_i = R_b dI_b + dV_be\$. If \$\ dV_be\$ is assumed very small and then neglecting it  \$\ dV_i = R_b dI_b\$ so on substitution I would get the change in base current but not the base current. So what is the way to find the base current (not the base current signal)?

Please clarify and also help by providing any link to an integrated glossary of electrnics.

ANY HELP IS GREATLY APPRECIATED


texts: 3.7V Li-Ion battery powered LED step-up/boost driver

texts:
Most quality COB LEDs are driven with around 35V. Are there any quality constant current step-up drivers available that allow a 3.7V Li-Ion battery to be used?

Or would I have to use TI's WEBENCH POWER DESIGNER to obtain a circuit, source the components, and solder it myself?

I am not a circuit designer, so any help would be much appreciated.

EDIT 1

I think I want to attempt building the circuit myself, so hopefully that re-validates the question. I have found the IC LT3477 from Analog Devices that seems to accept 3.7V Li-Ion input and can step up/boost to 35V. I hope I understood the data sheet correctly. Please see a sample schematic below.

Which components would I need to change to obtain 180mA or 360mA constant current? I saw from https://electronics.stackexchange.com/a/335325/207467 that there is a "feedback" or "sense" resistor that apparently needs to change with respect to the IC's reference voltage.

Edit 2

Another alternative I found to devise my own circuit is the TPS61169 http://www.ti.com/product/tps61169?qgpn=tps61169 with max. 400mA, where the current is adjusted via an "external sensor resistor". How would I calculate that resistor's value to drive a 90mA, 180mA or 360mA LED? If I knew how that is to be done, I could build my circuit with that part.

Edit 3

An even better solution turned out to be the TI LM3410 as a SEPIC device, as shown in the documentation under 8.1.2. That works well with a 3.7V Li-Ion battery as it discharges from 4.2V down to 2.9V with the LED Vf in between - and that little inexpensive IC also boosts 3.7V well to 9V without too much heat, so many other LEDs come into range.


texts:
I am trying to identify this IC:

I have tried google and a bunch of component shops but I can't find the number anywhere. As far as I can tell, on the chip it has 293 GZ624 and it is made by ST. Is there anyone who has come across this before?


texts:
I need to implement a one time programmable (OTP) logic function. The task is to inhibit/blow a single 3.3V logic signal for safety reasons after production of the device.
I found some small fuses like e.g. 429 which could do the job, but they have rather high amperage (>1A) and I was wondering if there is a more economical solution in terms of blow current (~100mA or so)?
Or do you have other ideas to solve this OTP task? How is OTP usually done in discrete circuits?


texts:
Resistance of a semiconductor diode

I was reading this question about the resistance in a diode. I have a question regarding the resistance of the depletion region. I know that the conductivity of depletion region is infinite but due to presence of electric field there's a dynamic resistivity thus a diode is represented by an EMF with a equivalent resistor. Does this resistor dissipate heat?

My second question, the recombination of electrons and holes does dissipate heat?


texts:
I wonder, are there faster jelly-bean alternatives to BC847/859 (i.e. low-voltage, low-power, SOT23, high-speed transistors)?

BC847/859 are rated for 100Mhz, something at 250-500 (and even 1000) would be great :-)

When I go to catalogues, they have RF section where everything is too fast(9Ghz+) & too expensive :-D


texts:
Is Atmel Studio compatible with Mac or Linux?

It seems like there is only Windows support from the downlaods here: http://www.microchip.com/mplab/avr-support/atmel-studio-7.


texts: There is an on-board ST-Link on STM32F4Discovery board based on STM32F103 MCU. If I have to use this circuit in my design then where could i get the ST-Link firmware for STM32F103 MCU?


texts: Why use L293D if you don't need to reverse the motor?

texts:
Basic question about L293D, which I could not find a clear answer by searching the internet.
Still learning with my arduino project. The examples are good at describing how to use things and how to wire them all up. What is missing is why we use some of the components.
I see these are the benefits of using L239D:
• Wide Supply-Voltage Range: 4.5 V to 36 V
• Separate Input-Logic Supply
• Internal ESD Protection
• Thermal Shutdown
• High-Noise-Immunity Inputs
• Functionally Similar to SGS L293 and SGS L293D
• Output Current 1 A Per Channel (600 mA for L293D)
• Peak Output Current 2 A Per Channel (1.2 A for L293D)
• Output Clamp Diodes for Inductive Transient Suppression (L293D)

While these above things sound nice, I don't think any are useful (maybe high noise immunity)
I saw an example of powering a DC motor without L293D by only using the PWM pin on the arduino to specify the voltage (which is controls the speed of the motor)
Is there any good reason to use L293D if I don't need to reverse the motor but only control motor speed?


texts:
There are a few questions on here that talk about LED power supplies and how to calculate their ratings but none address the issue that my 5meter long 5v addressable LED strip of 18watts power consumption per meter draws a ridicilous amount or current.
Current = (18watts*5m)/5v

Current = 18amps

How do I configure a power supply to supply that sort of current? 5v DC supplies on AliExpress go up to 4A. which supplies only 20watts of power when 90watts are required. The problem with 5v supplies as well is that it would require a current of 18A to deliver 90watts! Sockets are limited to 10A I think, which means getting a 100w 5v power supply drawing 18A makes no sense because it can't draw its required current through the wall socket.

I understand that higher voltage supplies can supply more power at the same current. 12v supplies also come in higher current variants, for example there are 12v 12a supplies capable of delivering 120W without drawing a ridiculous amount of current from the socket.

My question now is whether I can cheat the 10A socket limit by using a 12V power supply (rather than 5v to match the LED strip) at 10A and then use a DC to DC step down converter to change 12V/10A to 5V/24A.
That way I get the 5v voltage required by the LED strip as well as enough current (18A) to power the strip at full brightness without drawing more than 10A from the wall socket.

Same power output but different current supplied. Is that how it works? I have no idea if I'm using the power formula correctly there and if power at different voltage levels can be treated that way.


texts: Should via use be used when it is not essential?

texts:
I am working on characterising a transistor at approximately Vds=1000V and Ids=100A pulsed at around tON=20ns.

Should the power and ground paths (Top and Bottom layers) have vias connected to the respective groundplanes? Will this reduce signal integrity?

From my knowledge, inductance increases when vias are added to the power planes which would compromise signal integrity. However, back-drilling to remove the stubs of the via (e.g. if connected from Top layer to Top groundplane) will improve SI compared to a standard via. Would this give a SI improvement compared to just having a Top layer conductor path?

More specific details can be provided if needed. However, a generalised answer would suffice.


texts: Evaluate \$(\overline ABC\oplus A\overline B) + (\overline AB)\$

texts:
I'm struggling with evaluating this one:

  \$(\overline ABC\oplus A\overline B) + (\overline AB)\$

I've got to

  \$A\oplus  B + A\overline B \overline C +\overline ABC\$

But how do I prove that \$A\overline B \overline C +\overline ABC = 0\$

Edit: The answer is \$A\oplus B\$


texts: Easiest way to regulate a 12 V battery to regulated 12 V?

texts:
What's the easiest way to regulate a 12 V battery to a regulated 12 V power source?

Preferably, I'd like a ready-made product so that I could avoid having to show my lack of skill with the soldering iron. :-) More complex answers are fine, too, as long as they are insightful.

I'm thinking of powering a 12 V / 600 mA stage piano/synth by replacing its AC/DC converter with a small car battery for portable use. Because the device is not designed for in-car use, I understand that regulation is the safest bet. (Of course, I could buy an inverter, but I'd like to "do it right" and get rid of the DC/AC AC/DC conversion.)


texts: Using +4V output, to trigger an npn transistor operating on +12V

texts:
In a +12V circuit, I am trying to use a proximity sensor, which works on +5V and its output is +4V, and goes 0V when triggered.  Using a L7805, I get the +5V for the sensor supply. However, I try to use its output to trigger a transistor operating from the +12V reference voltage.
I thought of using a 5V or 6V relay, but I would prefer a “pure” electronic method.....
How can the sensor’s output be used to trigger a transistor operating from the +12V reference voltage?


texts: while ( !(UCSRA & (1<<RXC)) ) vs while (RXC == 0)

texts:
I have question about code below :

    unsigned char USART_Recieve(void)
    {
        /* Wait for data to be received*/
        while ( !(UCSRA &  (1<<RXC)));
        /* Get and return received data from buffer*/
        return UDR;
    }

Why do we just don't write

    while (RXC == 0);

when we want to wait until receiving data is done ? and what's the difference?
and how the first while waits until receiving is done?

I have searched for the same question but i couldn't find any, So please tell me the link.

Thanks.


texts: Multi-cell LiPo charging while still powering system?

texts: I'm working on a control system PCB design that's powered by 2, 3.7V LiPo batteries in series to achieve a higher voltage output. I would like to integrate charging via a mini-B USB connector with simultaneous powering but am unsure how to do this. So far I have looked into a similar solution as seen here, which manages charging and balancing well but cannot power the device when charging. Is there another way to do this? Can I charge in series and treat the 2 cells as a single unit in this configuration?  Any help would be greatly appreciated. Thanks!


texts: STM32WB55 Nucleo - FUS_STATE_IMG_NOT_FOUND error

texts:
I'm beginner to electronics. I'm trying to flash stm32wb5x_BLE_HCILayer_fw.bin v1.6 using STM32CubeProgrammer but got an error "FUS_STATE_IMG_NOT_AUTHENTIC", I tried older version but got the same error. Then I hit "Firmware delete" in STM32CubeProgrammer. Now I'm getting different error "FUS_STATE_IMG_NOT_FOUND", looks like I have somehow deleted (or corrupted) wireless stack. Only thing I found related to this error is:
If no wireless stack is installed and a delete request is sent, then the FUS returns error state informing that no wireless stack was found (FUS_STATE_IMG_NOT_FOUND).
I'm not even sure when I started to get this new error.
Start address that I have used is 0x080dc000, tried with "First install" checked/unchecked. I'm using ST-LINK.


texts: Rigol DS1052E shows random noise signal after encoder panel replacement

texts:
My Rigol suffered a failure of the rotary encoder panel board so I got a replacement from Rigol and made the swap.

Now when I use the scope, channel 1 and 2 both just show a noise signal, whether or not a sensible signal is sent to those channels (i.e. I see the same thing even with no probe plugged in).

This video shows channel 1 being displayed while hooked up to the device's built in oscillator.

https://www.youtube.com/watch?v=LpQEnlvEbYc

Any ideas on where to start debugging this?

(The new rotary encoder board is working by the way.)


texts: Zener diode question in simple LED circuit with anti-flicker for model railroad

texts:
I am a total novice when it comes to electronics.  I had a simple circuits class 30 years ago as a software undergrad.  I've designed a simple LED lighting circuit for N-scale model railroad, to be used to light passenger cars.  The circuit includes "anti-flicker" capacitors so that minor interruptions of input voltage due to dirty track, etc. do not cause the lights to flicker (which is terribly annoying).

I used example circuits from various websites plus input from forum members on an N-scale forum I am on to come up with this circuit.  I've mocked it up on a breadboard and it works, but I wanted to make sure it makes sense to people who know more than me.  The exact values in the circuit are just an example and I am not sure the resistor leading into the zener makes sense.  I've watched a few zener diode YouTube videos and looked at online tutorials.

The goal of the circuit is to have a board made that the user can then populate with their desired components (amount of anti-flicker capacitance, "dimming resistor", number of LEDs in parallel, size of LED, 3.3V or 5V regulator feeding the LEDs etc).

The input is meant to be either DCC track voltage (n-scale levels) which is a digital square wave signal (and represented by the "VAC" inputs and on the output of the rectifier shows as around 13.5--14.5V), or for those using DC analog trains, a positive or negative voltage (usually 0-12V but can be higher than 12V).

So the input is fed through a bridge rectifier, and the output is then fed into the circuit.  The main circuit is composed of anti-flicker capacitors that feed a voltage regulator (listed as L7805 but I am using AMS1117 in 5V or 3.3V versions).  The output of the voltage regulator is fed into the LED circuit, which has a "dimming" resistor (shown here as 2.2k ohms, and which can probably vary from 750 ohms to around 3k ohms depending on how bright the user wants the LEDs to be, what sort of LED (0805 or 1206 -- the difference being the amount of light they produce so relative brightness of an individual LED to get the desired overall passenger car internal brightness), whether 5v or 3,3v from the regulator, etc.

The capacitors are meant to be SMD ceramic capacitors.  While up to 47uF are available in 25V versions, 100uF (in 1206 or smaller or 1210 size) are hard to find in 25V versions (at least economically), but readily available in 12V, so to be able to use 16V versions of the capacitors, I added a zener diode between the rectifier and the capacitors in order to "hard limit" the voltage into the capacitors at about 12V.

(There is also a resistor of 100 ohms or 75 ohms to limit a hard surge of current into the capacitors [as I gathered from other circuits, and a similar low value resistor into the voltage regulator).

It appears from my testing that this is about correct but I am not sure I am computing the resistor leading into the zener correctly.

The zener I have is a ZMM12V (from Chanzon -- inexpensive Chinese stuff as this is meant to be a low cost board) -- https://www.aliexpress.com/store/product/100-500-2500-Pcs-SMD-Zener-Diode-0-5W-12V-ZMM12V-ZMM12-LL-34-SOD/313665_32854074530.html?spm=2114.12010612.8148356.14.711e4cf5y0vwxT

I had computed around 35 ohms based on a 13.5V input and a 12V zener voltage.  But this gives me around 12.5-12.7V.  If I make this resistor 150 ohms the voltage showing between the zener and the capacitor circuit is about 12V.

Because the LEDs are not lit very brightly, the overall load from the LEDs is not that high.  If I am measuring it correctly, usually in the low single digit "ma" .

Does this circuit look reasonable and how do I really compute the resistor for the zener?  I need to be able to handle a variety of input voltages from 12V up to probably around 15V/16V from the rectifier.

Thanks for a newbie.


texts: Switching power between two 7-segment displays using NPN transistors

texts:
So, I am working on a small project and forgot to order PNP transistors to switch the power to two common-anode 7-segment displays. Like this, for example:

All I have in hand at the moment is a series of NPN transistors but I can't think of a proper way to use them in a similar way as above.

I thought to use a simple HEX inverter like so:

But the supply needs to pass at least ~150mA or so for 7 segments and the 74LS04 I have is not rated for such current drive.

Worse case I can do the above and multiplex the 7 segments to stay within the current ratings for the HEX inverter, but I was first trying to come up with a solution using an NPN transistor alone.

Any suggestions?


texts: How to wire a Rpi, a relay, a DPDT and a PWM module to a DC motor, allowing to control its direction and speed?

texts:
I am currently using a Raspberry Pi to control the speed of a 12V DC motor and it works perfectly fine right now like this:

This works: I can start, stop and ramp up the DC motor speed.  But obviously, it only goes in 1 direction and it cannot spin in the other direction unless I physically reverse the red/black wires at the output of the PWM module. I tried it and it works, the motor can spin in the other direction with -12V instead of +12V.

Then, I ordered a DPDT 8 pins relay (LY2NJ) because I saw the following YT video and that is exactly what I want to do: https://www.youtube.com/watch?v=xTGzcN8JrUk

This is how I connected everything, but I think something is off in the connections I made, because there was smoke when I connected the battery, so I immediately unhooked everything and I'm now asking for your expertise to help me find what's wrong.  Note that the bottom relay enables the RPi 3.3V GPIO pin to trigger the 12V DPDT relay.

What's wrong with the connections I made? (DO NOT REPRODUCE THE ABOVE)

EDIT: WELP, after frying my older Raspberry Pi (It's now RIP instead of RPI, get it? Yeah it's not funny) I have followed @brhans advice to power the DPDT relay AFTER the PWM and also I'm freaking out about grounding to the RPi ever again, so I grounded all the relays to the -12V instead of to the RPi:

Do you think this will fry my second RPi or should it be good like that??


texts: How to calculate the transconductance of this circuit?

texts:
I have this circuit

where the "FES" blocks are simple current mirrors and the block "PD" is a differential pair. All the transistors in those blocks are BJT, NPN or PNP, respectively.

I found all the dc values but when trying to analyze the circuit with small-signal, I get lost. I want to find the transconductance with differential mode and common mode, i.e. \$G_{md} = \frac{i_l}{v_{id}}\$ and \$G_{mc} = \frac{i_l}{v_{ic}}\$, both when \$v_o=0\$ (namely, RL is taken away). I'm also having problems finding the input resistances, i.e. \$R_{ic}\$ and \$R_{id}\$. I believe \$R_{id}=2r_{\pi}\$ and \$R_{ic}=r_{\pi}+2\beta r_{o_{10}}\$ but I'm not sure.

How should I start?


texts: How to mend a broken coil in a DC motor?

texts:
I'm trying to repair a bread making machine (A Tefal/Moulinex OW500530). At the start of the program (kneading), it drives the brushed DC motor (ZYT4245-23) in short pulses every second. Now and then, the motor won't start. It will start again when I help it a bit, though. A bit further into the program, the kneading is constant (no longer in pulses), and once the motor is spinning, it seems to be working fine.

I've opened up the motor and found out that the coils between two pairs of neighboring commutator plates seem to be broken; I measure about 50 Ohm between the other pairs of neighboring commutator plates, but between these, there is a very large resistance. There are about 20 commutator plates in total.

Could I get the motor running again by simply short-circuiting those two pairs of commutator plates (soldering)? Is it safe?


texts: Can I use V=IR in the analysis of AC circuits?

texts:
My textbooks usually just assert this relation so I don't really know when it doesn't apply.

EDIT: Reflecting on this question, I wanted to clarify that I wanted to know if Ohm's Law is valid for the analysis of time-varying current/time varying voltage/ time varying load i.e., V(t) = I(t)R(t).


texts: Powering 64 SATA HDD from Single ATX Power Supply

texts:
I am planning to wire a 4U DIY JBOD top loader.

Looking at the power output of several power supplies they have a a maximum rated 5v rail of 100-125w. By looking at the spec sheet of my chosen HDD I'll require more than double for all drives. There is plenty of current available on the 12v rail and I'm wondering if it's reasonable practice to use a 12v to 5v DC-DC converter?

Single drive active: 12v 0.56a = 6.72w | 5v 0.65a = 3.25w | total = 9.97w
64 drive active:     12v 35.84a = 430w | 5v 41.6a = 208w  | total = 638w

The spin-up power is well over 1600w so I'll be using staggered spin-up.

With 8 dedicated SATA power cables from the PSU I can power 8 drives on each one. The cable has 18AWG wires which should handle 8 drives over a distance of less than 300mm. There I could put an inline DC-DC converter.

Here is the proposed wiring diagram.

I will not be using the 5v provided by the ATX PSU but the one from the DC-DCs. Is this a good approach, potential issues or any other thoughts?


texts:
I was running the following LTSpice simulation to see if a capacitor would divide a DC signal,

this results in the following

As you can see, it works fine and obeys the cap divider formula of C1/C1+C2. Now, for this to work, I had to change the simulation settings so that "all external DC sources start at 0V".

So essentially, I had made an AC signal out of it hence why this worked.
But let's say I changed the 1.8V signal to a 3V signal, surely the capacitive divider will still work but it sees it as an AC change.

So my question is, why do people say that a capacitive divider doesn't work for DC? Can't you simply use a switch or something so that you still use a DC voltage source, it's just the capacitors see it as an AC change?


texts: Reduce DC voltage using a resistor..is there a specific reduction relationship?

texts:
Hi I have encountered an issue with a vehicle and isolated remedy down to coolant sensor/ecu. Basically the ECU sends 5 volts down one wire through the coolant sensor and returns to ecu. As the sensor warms the return voltage reduces and based on this the ECU determines fuel delivery/ fuel injector opening cycle.It is primarily during cranking that this equation is important.
I want to trick the ECU into believing the car is always 15 degrees lower that reality. If I solder a resistor into circuit would this have the effect Im looking for ? If so is there a specific relationship as to voltage drop/resistor rating ?


texts: Different readings of voltmeter on simple circuit

texts:
Hi I am trying to learn the basics of electronics and puzzled by the following qucs simulation.

Why the readings of voltmeters are different? I would expect, by the way zero readings on both voltmeters as they are basically breaking the circuit one for another.

At least the readings should be symmetric but they are not.


texts: How are ground wires and OPGW connected to ground and neutral point of transformer, and to the com.system?

texts:
Note: This question is about power systems in the kV, MVA range.
Many distribution and transmission systems are impedance grounded, which means that (some of) the transformer neutrals are connected to ground through an impedance.
It's increasingly common that there are two ground wires along an overhead transmission line; one regular ground wire (typically Fe, FeAl or Al), and one optical ground wire (OPGW). I know that they are often bundled together at the last pole, and I guess connected to the transformer as if they're the same wire.
I wonder how exactly are the ground wires connected to ground?

Is the impedance between the ground wire and the transformer?
Is the ground wire connected directly to the transformer neutral, and the neutral is connected to ground through an impedance?

How is the optical wire connected to the rest of the communication system? Does it continue as a ground wire until it reaches the control room (or something similar), or is it just a fiber between the transformer and control room? If so, how is it connected to the transformer, how do they get the fiber out, and how is it protected?
Below are some figures with some options. I believe the first and last image are the correct ones, but I'm not entirely sure.
A few notes:

A typical single line diagram shows the transformer neutral as in figure 1, but the neutral wire is not included in the SLD, so it might just be a simplification.
I appreciate it very must if someone can explain how it's done in HV substations, and not how it could be done. Please only answer if you know the answer.


texts:
I own a cafe very close to a university campus. As such I get lots of students coming in to buy drinks/food and study during the day. However, a lot of the time all of the available places will fill up and I feel as if this turns off students from coming in because they don't know for sure that they'll be able to get a spot. To fix this I wanted to create a type of system with sensors (that can be connected via bluetooth low energy preferably) in which I'll receive real time updates with how many chairs are occupied/open.

Currently I'm torn between three different approaches but since this is more of a side project I also want to minimize the cost as much as possible. I was thinking of either a proximity detector (easily placed on the side/back/under the chair), a force/load sensor (tougher to set up since it will need to be under a load bearing part of the chair), or a vibration sensor (will return 'occupied' if it hasn't sensed any chair vibrations for a certain period of time eg. 2 minutes).

What would you guys recommend here taking price into consideration?


texts: I'm looking for a battery shield for my Arduino Duemilanove. I would be asking "what's the best" but everything I find is out of stock except for this which is USD77.86 with the cheapest freight to Australia. So instead I'm asking "is there anything?" I'd prefer a solar-panel capable shield, but really I'll take anything that's rechargeable.


texts: When to use blocking and non-blocking assignments

texts:
I am having a really hard time to understand where to use blocking and non-blocking assignments. I have read many answers regarding this on this site and have also referred to book on Verilog by "Samir Palnitkar". But when I sit to actually implement some circuit, I am not able to decide which one to use.

I have following questions regarding this:

a) In a sequential circuit, say Synchronous 4-bit counter implemented using JK flip-flops, we need to use two & gates and the output of one & gate is used as the input of the other. Now, I follow the thumb rule that I should use <= for sequential circuts and should not mix = and <= assignments in an @always block.

always @(posedge clk or posedge rst)
    begin
        if(en)
        begin
            if(rst)
                q<=4'b0000;
            else
            begin
                q[0]<=(~q[0]);

                if(q[0]==1)
                    q[1]<=(~q[1]);

                if(q[0]&q[1]==1)
                    q[2]<=~q[2];

                if(q[0]&q[1]&q[2]==1)
                    q[3]=~q[3];
            end
        end
    end

In the above code for the same circuit, what if I want to store the o/p of q[0]&q[1] in another register and then use it to find q[0]&q[1]&q[2]? If I use <=, I may end up getting wrong value of q[0]&q[1]&q[2].

How should I store the intermediate outputs and use them as inputs in the sequential circuit (May be needed for complex circuits)?

b) What are some rules/guidlines that I should follow so that I don't encounter some race condition or other undesired o/p from my code?


texts: Trying to understand the FLASH region of an STM32L433

texts:
I am trying to learn more about the STM32's FLASH memory (on the Nucleo-64 STM32L433RCT6P) so that I can use a page of the FLASH memory to store some user configuration (so that the data is retained even when power is not supplied to the microcontroller).
Page 1 of the datasheet states that the STM32L433RCTxP has 256KB of Flash memory. In Page 85 of the same datasheet, the FLASH memory goes up to 0x0803_FFFF. The Keil toolchain that I am using also states that there is 256KB of Flash memory on this board, also confirmed by the address range (0x0803_FFFF - 0x0800_0000 = 0x03_FFFF = 262143 in base10/decimal):

Page 78 of the Reference Manual tells something different regarding the FLASH memory of the STM32L43xx family device, where some regions of the address range above are not available  to use as FLASH memory. On that page, only Pages 0-3, Page 63, Page 127, and Page 255 of the FLASH memory are usable, with 2KB of FLASH per page (14KB combined total FLASH for those pages). The Address range also extends up to 0x0807_FFFF, and not 0x0803_FFFF.
The Memory Map in page 67 of the Reference Manual actually lists the whole 0x0800_0000 to 0x0807_FFFF as FLASH memory, but
this would mean that there is actually 512KB of FLASH on the board. There is also some FLASH memory from the region 0x0000_0000 to 0x0008_0000.
How much FLASH memory does the STM32L433 Nucleo-64 has? If I were to follow the datasheet where the FLASH goes up to 0x0803_FFFF only, and parts of the RM that states only Pages 0-3, 63, and 127 are available as FLASH memory, does that mean that this board has 12KB usable FLASH memory?
Thanks!


texts: How deep are standard female pin headers?

texts:
I have a couple pcbs that will mate together with pin headers. I will have a 15mm standoff to separate these 2 boards. In my research it looks like the female pin header sockets seem to be about the same size and the male headers vary in length. I've looked at multiple female pin header spec sheets, but I haven't seen any that tell me how deep I can push in a male pin or how deep into the socket I need to push the pin in order to make a connection. I'm just trying to size my male header correctly.

Does anyone know? Or can you point me to a spec where you've seen that before?


texts: How do I add a simulation model to a multi-part component in Altium?

texts: I have a TL072 op-amp as a multi-part (3 parts) in my libarary i.e. 2x op-amps + separate power supply. Now i would like to add TI's spice simulation model. However, I cannot add it, because Altium complains about the pin count, since it appears to only see the sub-part (see error message below). Both the multi-part and the spice model are defined with 8-pins.


texts: How many analog inputs can be read and how many digital inputs can be read from STM32F4 discovery board?

texts: I am using STM32F4 discovery board,exact part no. of controller is STM32F407VGT6. The kit has 3 ADCs each of 12 bit and each ADC has 16 channels.I want to read 40-50 analog inputs.Is there some way to do it without using additional hardware? How many pins of STM32F4 discovery board can be used as analog pins for reading voltage from (0-3) V.  without In the data sheet it was written that most of the pins can be configured as analog pins.Moreover, how many pins can be configured as digital pins for reading digital input


texts: how to calculate solar panel size needed to run circuit

texts: Iam doing a project and want to calculate what size solar panel to use to run my circuit. the only thing is that I have some size constraints involved cant be bigger and \$5\times5\$ in. I have a 12.2V lipo battery that is going to be powering a 4W 12V DC heating element at \$140^{\circ}\$C. I think I need to add a voltage regulator because I want the temperature to be constant and no greater than \$50^{\circ}\$C. If some one could give me some advice in what to do I would appreciate it greatly.


texts:
If you placed one of the multimeter's probes into the hot slot of the wall outlet and touched the other probe to your skin while grounded, for example to some dirt outside, would you get bitten by the current at all?

Would you become a fried chicken dinner, or nah?


texts: Electronic detector to measure of distance?

texts:
I am not well known about electronic and it is my first question here, beforehand sorry for not qualified question. Let me try to explain what I am looking for:

Is there chip or any another electronic device to measure how much distance was passed? Like it does Pedometer. What is principle of this mechanism?


texts: Cheapest/quickest way to power 2 x 12v fans from 24v baseboard fan socket?

texts:
I have an APC baseboard that runs off 24v.

The two fans (2 x 24v @ 0.16A = 7.7W) were a noisy and power-hungry problem. I've got a couple of Noctua fans of the same size, with "almost the same" or "plenty good enough" static pressure and airflow, that take just 12v @ 0.06A (1.4W) and are almost silent. The fan models are AD0824HS-A71GL and Noctua NF-R8 Redux-1800-PWM if it helps, and the case is in a cool environment under low use, where heat is less of an issue than in a datacentre.

Naively I could put the fans in series (2 x 12v = 24v), but as answers to several other questions point out, this is a mistaken approach as they are inductive in nature.

Given that the PCB and the new fans are both well engineered, I'm looking for the cheapest and simplest way to power these fans from the original 24v pins. It doesn't need to be perfect, but I'd like to avoid a constant 1.4W wasted power drain of using 2 x 200R series resistor, one on each, (or 1 x 100R common to both), or constant loss through a zener diode.

What is my simplest/cheapest solution?


texts: To get min 5ms square wave. I chosen prescalar as 1:32 (The internal clock given 4Mhz), what will be the TMR0 register value? Is it 0x64 or 0x63 !!


texts:
I am designing a HiVoltage nmos source follower but I can't get the input headroom voltage I need. My supply is 300VDC I use an STF7N60M2 600V nmos. I would like to have my 200Vpp AC signal coming out at the source undistorted. But after 130Vpp (my limit) it start to distort.

Here is the circuit :

I am wondering is it even possible ? with these conditions (300V supply).

I don't understand how the divider resistors (Rg1 Rg2) affects the headroom. I googled for 3 days for this divider headroom relationship but It still not clear.
Thank you.


texts: Set servo limits from PWM signal with 2 potentiometers and no microcontroller

texts:
sorry if this has been answered before or if this is something really naive/impossible. my experience is mainly with SW dev and I am trying to do this for an RC car so here it goes:
Turns out I have a servo that is connected to a receiver, this servo unfortunately goes by default beyond the min / max angle that I need (hence it starts to make a buzz).
I want to ask if its possible (and how) to given the same pwm signal from the receiver and an intermediate circuit with 2 potentiomenters (one for the min and one for the max angle) limit the angle the servo moves.
So lets say if I get the PWM signal that moves between 60 - 120 deg, with the intermediate circuit that I am trying to do I want to limit this on the min to be 70 and on the max to be 110.
so the signal and voltage will still come from the RC receiver and will be connected to said circuit and then the output of the circuit will go to the servo with the set limited angles by the potentiometers.
I have been reading over the internet and learning about servos and how they work; I know that you can control a servo with a potentiometer with the 555 circuit and even with an arduino and whatnot but what I need is to limit the pwm signal that already comes from the receiver in the minimum space possible. Any thoughts?
Again, sorry if this is a naive question, this is not my area of expertise.


texts:
i am new to orcad pspice simulation,when i try to simulate the isolation amplifier(AMC1300) ,i got the error like floating node and less the two connections, but i connect power symbols and gnd ref (0) properly,what i do?

**** 08/05/20 17:25:46 ***** PSpice 16.6.0 (October 2012) ***** ID# 0 ********

 ** Profile: "SCHEMATIC1-sim tlv"  [ C:\CADENCE\SPB_16.6\TOOLS\CAPTURE\crystal\tlv2711 opamp-PSpiceFiles\SCHEMATIC1\sim tlv.sim ]

 ****     CIRCUIT DESCRIPTION

*****************************

** Creating circuit file "sim tlv.cir"
** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

*Libraries:
* Profile Libraries :
* Local Libraries :
* From [PSPICE NETLIST] section of C:\Users\lenovo\AppData\Roaming\SPB_Data\cdssetup\OrCAD_PSpice/16.6.0/PSpice.ini file:
.lib "nom.lib"

*Analysis directives:
.TRAN  0 100ms 0 100u
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
.INC "..\SCHEMATIC1.net"

**** INCLUDING SCHEMATIC1.net ****
* source TLV2711 OPAMP
V_V4         N3445846 0 10VDC
V_V7         0 N3445850 10VDC
V_V8         N3448327 0
+SIN 0 5v 100hz 0 0 0
R_R5         0 N3449149  1k
R_R6         N3448327 N3448980  1k
R_R7         N3448980 N3448272  10K

**** RESUMING "sim tlv.cir" ****
.END

ERROR(ORPSIM-15141): Less than 2 connections at node N3449149.

ERROR(ORPSIM-15141): Less than 2 connections at node N3448272.


texts: Do I multiply charge current by number of battery packs when charging in parallel?

texts:
Im trying to charge these 1S3P LiIon 18650 Battery Packs with this battery charger using this parallel connect plate. Can I just multiply single pack charge current by however many battery paks I connect in parallel to determine the charge current? (example: single pack 8A, so 3 packs 24A?)

Also, if the charge current is fixed, would the charge time proportionally divide by the number of batteries I have? (example: 1 battery pack at 6A takes 9 hours, so 3 packs at 6A will take 27 hours?)


texts:
This question is mainly a query for an advice.

I am trying to implement a frequency meter on STM32F4.
Up to this point I have a working ADC converter with DMA and a timer which checks for the current voltage value and catches a zero crossing (with margin) and counts the counter.

Now, what is the best way hot to determine the actual frequency? In sense of - shall I rely on  timer clk speed or should I use RTC?

Or is there a better way how to determine the frequency?


texts: protection of industrial analog input modules for high-voltage signals

texts:
I'm looking at ways to design a multi-functional analog input that can take both voltage and current inputs for industrial applications. The voltage signals are in the 0-40V range and the current signals are 4-20mA loops. I have found a few reference designs that seem to accomplish this (usually for 0-10V and 4-20mA signals) by switching on/off the current loop resistive load. Since I want to be able to take in up to 40V, I could add a voltage divider. I found the following schematic for a reference PLC module (enclosed in a rectangle is the part I'm interested in):

Source: http://www.analog.com/media/en/technical-documentation/application-notes/an-1522.pdf

The above schematic is not rated for 40V input signals, but the approach used is similar to what I have in mind. My concern is on how to protect the circuit from user mistakes. I will use this schematic as a reference and forget about the 40V that I want for a second.

There are two basic scenarios that shouldn't happen, but can happen:

1) A voltage is fed when in current input mode (resistive load on): in this case, as long as R1 can handle the power it should be fine. For 10V that is 400mW, so no big deal. If the input signal can't source enough current the system will give a wrong reading, but as long as nothing gets burnt in my circuit I'm happy.

2) A current signal is fed when the circuit is voltage input mode: this case is the one I find more critical. Here is where I'm not sure what happens, and where my question comes. If R1 is not connected, and let's assume we have 20mA coming in, this will go through the voltage divider, and the resistors (assume 1 watt at best) won't be able to handle this power. Also, the output voltage of the voltage divider will be too high, and I'm not sure those clamping diodes will handle it? I'm not sure what happens in this scenario and whether the circuit is protected or if it will just explode. I would like somebody to help me understand exactly what would happen in this scenario, and see if I can extend this approach to work with my 40V signals requirement.


texts: Can someone tell me what these two lines of Arduino code do?

texts:
I'm trying to get into robotics, and I've found some tutorial code that was readily available on pololu's website for one of their motor controllers which I now own. Could someone with some background in Processing explain the highlighted segments please?

#include <SoftwareSerial.h>
#define rxPin 3  // pin 3 connects to smcSerial TX  (not used in this example, but needed for the smcSerial object)
#define txPin 4  // pin 4 connects to smcSerial RX
SoftwareSerial smcSerial = SoftwareSerial(rxPin, txPin);

// speed should be a number from -3200 to 3200
void setMotorSpeed(int speed)
{
  if (speed < 0)
  {
    smcSerial.write(0x86);
    speed = -speed;
  }
  else
  {
    smcSerial.write(0x85);       // This Line
  }
  smcSerial.write(speed & 0x1F); // This Line
  smcSerial.write(speed >> 5);   // This Line
}


texts: Can a toroidal transformer with two secondaries, inner and outer, simultaneously induce current in both?

texts:
If a toroidal transformer has two separate, concentric secondary windings, one inside the primary coil and the other outside, does the force-field which induces a current in the inner secondary, for instance, get totally "consumed" by it, leaving nothing to power the outer secondary, or does this influence somehow get shared between the inner and outer secondaries?

What is the nature of these influencing force-fields, since almost all of the magnetic flux is contained within the primary coil and electric fields can't escape the conducting torus of the primary coil itself (or can they)?

What field, then, powers the outer secondary?


texts: Why is the transformer impedance given in percentage?

texts:
I have just talked to an Electrical Engineer and he referred  to the impedance of a 3 phase transformer/rectifier with line reactors as 41% (8% transformer and 33% reactor). I asked him what these % meant because to me with a Telecommunications and Electronics background impedance was given in Ohm, I didn't understand his explanation or what these % were referring to and he didn't know how to transform these % to Ohm.

The device we were talking about has an input of 600V and 120 A (AC) and an output of 70 kV and 1.3A (DC) when operating normally and if the secondary is shorted the output current is 2.44*1.3 A = 3.172 and the reactor inside prevents more current from coming out.

Can you please help me clarify this?


texts: Is there good inductor calculation software?

texts: What's a good software package for calculating all-around parameters related to inductors?  Not necessarily simulating them, but just static analysis with common quantities of interest.  I've used ELSIE, a version of which came with the ARRL Handbook at one time, but I'm just wondering what else is out there.  Preferably something that takes into account all relevant parameters for someone trying to build them by hand - turns ratio to voltage/current, wire gauge, core material, inductance, maybe B-H curve, and handles different types (regular air wound coils, toroid, maybe IF cans).


texts: How i can automate a circuit using transistors instead switches?

texts:
I'm recycling the counter circuit of a microwave, for use it as a stopwatch, that turns on automatically, and start the count per seconds immediately when turns on, the circuit have two buttons "switch count: the button that increase one second when press and release the button" and "switch mode: the button that switch of mode between clock or count, when are press and release".

the idea is replace the two switches by two transistors, first replace the "mode switch" that communicate the signal one time simulating one touch and release automatically(for change the mode from clock to counter) because default mode is clock when turns on the circuit, and the second replace the "count switch: the button that increase the 1 value from 00 min 00sec upto 12 min 00sec, when press and release, second per second (touch per touch)" with a transistor that simulates the touch and release second per second, multiple times until go to 12 min 00sec.
i've try soldering the two entries of the mode switch, but not works because it needs be released not only a touch, and it requires some ms of delay pressed, and i do that too with the count switch, and not works too, because it makes the count button count per ms not per seconds, and it fall in a loop 00min 00sec to 12min 00sec and it repeats ever...
i've read exist some transistors that can do this, but i don't know how to do it, i'm not expert, The signal ARE POSITIVE.


texts: Output frequency of asynchronous and synchronous counter

texts:
I read that output frequency of asynchronous counter will be \$\frac{f_{in}}{2^n}\$ where \$n\$ is number of flip flops and \$f_{in}\$ is input frequency.

In synchronous counter will the output frequency always be \$\frac{f_{in}}{2}\$ ? As clocks are activated simultaneously for all flip flops, each flip flop will get activated simultaneously but only during a positive or negative edge so all flip flops will have output frequency \$\frac{f_{in}}{2}\$.

Am I correct ? I didn't find information about output frequency of synchronous counter anywhere.


texts: Are there problems accessing a microSD card via SPI when there are other slave SPI devices?

texts:
I'm working on a design that has a CPU with only one SPI port.  I have multiple (3) slaves connected to this port, one of which is a microSD card.

Here is a report from an engineer who says that SD cards are designed to operate as the only slave to an SPI master.

Has anyone else been able to use a microSD along side other SPI slaves on the same bus?  Perhaps this report was just based on a particular, problematic miniSD card?

Would anyone recommend gating the SPI CLK line with the Slave Select line that goes to the miniSD card, just to be safe?


texts:
Is the neutral hole socket on the left or the right side? Is this universal to all countries and most houses?

The neutral wire is usually at 0V relative to earth right? Or 0V RMS? HYPOTHETICALLY, if one were to stick a knife into the neutral hole, would they be fine?

Edit: Would the outer-pin of a laptop charger always be neutral regardless of the polarity of wall socket?


texts: Why pulsed drain current is higher than continuous drain current in MOSFETs?

texts:
Why is pulsed drain current higher than continuous drain current in MOSFETs?
In MOSFET data-sheets, pulsed drain current is much higher than (by at least 2x) continuous drain current. What is the reason behind this?


texts: How to quantify the error introduced by CMRR given in dB?

texts:
Here is the extract from the manual:

I want to have an idea about how much voltage error occurs when applied 10V signal. And is this CMRR zero if differential ended configuration is used?
How can I calculate the Vout error for 10V input? Whats the difference between LLGND and GND in the manual? Is CMRR measures due to LLGND?

Here is the manual:
http://www.mccdaq.com/pdfs/manuals/PCI-DAS6034-35-36.pdf


texts: Read-out circuitry for resistive biosensor

texts:
I have a biosensor. It's resistivity changes while sensing the analyte I want.
Resistivity of biosensor is around 10 Ohms.

I normally use Keithley 2400 sourcemeter for experiments. I apply a constant voltage across the biosensor, then measure the resulting current using same probes.

I need to make this amperometric measurements using microcontroller. I'm applying same potential using pwm after filtering and buffering.

My intention is to apply a constant voltage to biosensor (0.5V), have a small shut resistors connected to biosensor in series, and measure the voltage over the shunt resistor using uC's ADC.

But since both biosensor and shunt resistor have small values, it drains a lot of current which microcontroller is not able to handle.

The voltage that I'm applying goes directly to zero.

What should I do to be able to measure the current in this system? I have been thinking to use instrumentations amplifiers, but I still have the same main problem, sinking huge current to ground which makes the applied potential zero.


texts:
I'm using this depletion-mode MOSFET in a high-voltage power-management circuit.  My 500V DC supply isn't high grade, and now that I've blown two of these MOSFETs (gate shorts to drain) I'm wondering if I can put any components on either side to protect it?  I was getting weird results with the first one before realizing it was blown.  I might have blown the second one (not sure at which point in my testing it failed) simply by turning the high-voltage supply on with it wired like this:

simulate this circuit – Schematic created using CircuitLab

For protection purposes: If it simplifies things I never want to see more than 200mA through the circuit.  If no better ideas I guess I could put a fast-blow fuse in front of V+?  But I'm not sure if that's the only thing that can blow this MOSFET.  E.g., I'm beginning to wonder if having no load on the drain can cause problems.


texts: Cancellling Out the Effect of Constant Gravitational Acceleration in a Datalogger

texts:
In a design that records not only accelerometer readings (X + Y + Z) but also gyroscopic readings (X + Y + Z) how is it possible to remove the accelerometer readings caused by gravity?

I have found many datasets from Crawdad that provide better readings that are not effected by the said idle acceleration caused by gravity.

I have prepared a data logger to record the motion of a specific animal. In idle orientation I have noticed the z-axis is continuously recording 9.81ms^-2. I Would like to know if there is a method I can use to reduce the effect of this unwanted gravitational component. I only intend to record the acceleration caused by the animals movement.
Any other suggestions are most welcome.


texts:
I am making a simple 1MHz oscilloscope with an embebbed system based on ARM and Android. I have an ADC with a speed of 12MSa/s that takes the samples. I need it to send the samples to a PIC microcontroller, to send them via USB to my Android system.

I cannot send 12MSa/s of data through USB so I investigated and I think I have to use a RAM buffer. I have done some research on the internet, but I can't understand how they work.

As far as I can understand:
Lets suppose I have 2 RAM ICs. I start filling RAM 1 with samples from my ADC, then, when it is filled, I start filling RAM 2. My microcontroller will start reading data from RAM 1. The USB transfer speed is not fast enough to read all the RAM content before RAM 2 is filled, so  the ADC will have to wait until RAM 1 is empty, thus I will loose samples from my ADC.

Is there any way to prevent this? My development board is a PandaBoard. I am running Android 4 on it and it is working perfectly, but I have this problem regarding hardware buffering.


texts: Bipolar transistor are said to have both electron flow and hole flow. Movement of electrons can be understood, but holes are fixed part of the atomic/crystal structure. How can we characterize their movement?


texts:
So there are two types of 6 AWG cables:

PVC insulated cable with tiny copper strands inside.
Official specs: 135A @ 100% max current, resistance 1.21 ohm, temperature from -40 to 85 degrees C.
Silicone insulated cable with tiny tin-plated copper strands inside. (Chinese) Specs: 300A max current, resistance 1.21 ohm/km, temperature from -60 to 200 degrees C.

Given the same dimensions, why does the max current differ so much? Is it because of the silicone insulation? Or are the specs wrong?


texts: PIC problem: Touching the crystal capacitor makes the system slows down

texts:
I am experiencing a very unusual problem (at least for me). When I touch with my fingers, or the oscilloscope probes, on the crystal or it's capacitors, the PIC runs slower...and A LOT slower then it should...with my fingers, most of the time it comes back to the real speed, but with the probes, it hangs forever.

I am running the PIC18F2550 at 48MHz with a 20MHz crystal...I supose I am maybe changing the capacitance "seen" by the PIC across the crystal and the oscillation circuit is going nuts..does it makes any sense? And if it does, what may I do to correct it?

EDIT:

The pictures below shows the circuit. The blue picture is the Bottom Layer of a 2 layer FR4 170Tg/290T ENIG board. I have highlighted the oscillator's traces, it's possible to see the ground plane, connected to both capacitors and the crystal in the middle, between them. The red picture is the Top Layer, where there is a big (and highlighted) ground plane, and some traces for two LEDs. There is also a transparent mix of the Top and Bottom layer, so see how they interact with each other. It's possible to see the PIC's orientation and schematics of this part of the project by the oscillator traces.

The problem only appears when the OSC1 capacitor is completly touched, or the OSC1 pin at the PIC is touched. Touching the traces or OSC2 capacitor doesn't bring any harm, as expected.

The Crystal:http://www.digikey.com/product-detail/en/NX5032GA-20.000000MHZ-LN-CD-1/644-1039-1-ND/1128911

The Crystal's Capacitors:http://www.digikey.com/product-detail/en/12061A150JAT2A/478-1439-1-ND/564471?cur=USD

EDIT2: The finger can have a 5pF to 15pF capacitance, so probably there is no much that can be done...http://ww1.microchip.com/downloads/en/AppNotes/01101a.pdf (page 2)
Removing the ground plane as pointed out in the answers is worst.

The Oscilloscope waveforms:

OSC1 before being touched:

OSC1 after being touched:

OSC2 before OSC1 being touched:

OSC2 after OSC1 being touched:


texts: Wide Swing Cascode Current Mirror Biasing Difficulties

texts:
I'm working on designing a cascode current mirror, depicted below:

Constraints: all Von needs to be above 200 mV, all Vds neds to be at least double Von, L is 0.35 um.

Derived from the SPICE file, k' = 181.47 uA/V^2, and the given bias current is 25 uA. Rearranging the equation for Von to solve for W gives:

$$
W=(2I_{D}L)/(k'(V_{ON})^2)
$$

I input my given values and find a value for W of 2.41 um. To make them have a slightly happier ratio, I bump that down to 2.3625 um, which makes W/L 6.75.

I then make all of my Ws that value, run a bias simulation, and investigate; this is what I find. All voltages are in mV (I apologize, there seems to be no way to make a table):

MOS - Vgs - Vth - Von - Vds - Region

M1   ---   776  - 585   - 191 - 3000 -  Saturation

M2 ---  776 -   558 -   218 -   776 -   Saturation

M3 ---  905 -   585 -   320 -   152 -   Triode

M4 ---  905 -   585 -   320 -   2850 -  Saturation

M5 ---  776 -   582 -   194 -   102 -   Triode

M6 ---  803 -   587 -   216 -   803 -   Saturation

M7 ---  905 -   582 -   323 -   102 -   Triode

M8 ---  803 -   587 -   216 -   803 -   Saturation

Ignoring for a moment M1 and M4, why are M3, M5, and M7 in triode? I've tried changing the W up and down, and I can't get any of those Vds values to go above 200, let alone 400 mV. How do I set my Vds higher? What's wrong with the Von of M3, M4, and M7?


texts: How do BJT transistors work in a saturated state?

texts:
This is what I know about NPN BJTs (Bipolar Junction Transistors):

The Base-Emitter current is amplified HFE times at Collector-Emitter, so that Ice = Ibe * HFE
Vbe is the voltage between Base-Emitter, and, like any diode, is usually around 0,65V. I don't remember about Vec, though.
If Vbe is lower than the minimum threshold, then the transistor is open and no current passes through any of its contacts. (okay, maybe a few µA of leak current, but that's not relevant)

But I still have some questions:

How the transistor works when it is saturated?
Is it possible to have the transistor in open state, under some condition other than having Vbe lower than the threshold?

In addition, feel free to point (in answers) any mistakes I made in this question.

Related question:

I don't care how a transistor works, how do I get one to work?


texts:
Why can't I use std::string or any other objects from the C++ Standard Library in my sketches for Arduino? #include <string> doesn't throw an error, so it clearly has no trouble finding the libraries, but actually using anything from it does. If I write

std::string str;

I get

'string' is not a member of 'std'

Why?


texts: Ask about possibilty to use Digispark Pro as RFID Tag

texts:
I have read this article that explain how to use Attiny85 as RFID tag.
Using an AVR as an RFID tag

Is it possible to program Digispark Pro and use it as RFID tag??


texts: Is this true: "At over 700 Hz, current simply flows over your body"?

texts:
I have heard this in a movie clip. I was just curious to know, is this really true?

Because the one thing that I do know, is that at a high voltage, the current decreases, so that it doesn't harm a human body.


texts:
I am designing a product where an ambient light sensor is used to adjust the LCD's brightness.

The following circuit is implemented to read the light sensor. The LIGHT_SENSE pin is connected directly to an ADC input of an MCU.

Later on I chose the SFH-203-P photodiode, which is connected directly to the pins 5 & 6 of the above connector.

Unfortunately, this diode combined with this circuit do not play well. The whole circuit is extremely insensitive to light. A very high luminance is needed to produce any readings at the ADC, much greater than typical room light.

Even worse, the PCBs have been manufactured in large quantities already, so a change in the PCBs is not possible. I am stuck with only changing components.

I tried to change R644. I found out that at 5.6 M ohms, the circuit behaves exactly as needed, and I am about to propose this change.

However I am not confident on using such a high-value resistor for this purpose. I am afraid that such a great impedance may cause problems that I cannot see now, like noise, instability of the circuit etc.

Is it safe to use such a big value for the photodiode biasing?
What problems may arise from such a change?


texts: Converting Inverter Output from Square Wave to Sin Wave

texts: I bought a UPS, it has output of 220v AC, the problem is the output is square-wave, which causes distortion on TV/LCD, is there circuit that can take this Square-Wave as input, and output Sin-Wave?


texts:
If I have an AVR micro controller and have an ISR coming up about every 100 micro seconds or so, can I change the stack pointer in the ISR and then fake multi threading?

Psuedo code:

uint8_t currentThread = 0;
void* process0StackPointer = 0;
uint8_t process0SREG = 0;
void* process1StackPointer = 0;
uint8_t process1SREG = 0;
ISR(TIMER0_OCA_vect)
{
  currentThread = !currentThread;
  if (currentThread == 0)
  {
    process0StackPointer = StackPointer;  //Back up the stack pointer of the
    //"0" thread and the status register
    process0SREG = SREG;
    StackPointer = process1StackPointer
  }
  else
  {
    process1StackPointer = StackPointer;  //Back up the stack pointer of the
    //"1" thread and the status register
    process1SREG = SREG;
    StackPointer = process0StackPointer
  }

}

Is this a plausible thing to do, or is there something that I am not seeing here?


texts:
For a better detection of the modulated signal with the diode detector below, one requirement is that the time constant of the RC filter conforms to:

$$ \frac{1}{\omega_{c}} \leq RC \leq \frac{ \sqrt{1-\mu^{2}}}{\omega_{m}\mu}  $$

where:

\$\omega_c\$ is the angular frequency of the carrier
\$\omega_m\$ is the angular frequency of the information, and
\$\mu\$ is the modulation index.

How exactly can we prove that?


texts:
For a project involving driving a bunch of LEDs we are using TLC5917 driver IC's (datasheet).

I read up upon decoupling and smoothing capacitors, but I am uncertain if and how we should use them. We are driving the chips at a relatively high frequency, around 30 kHz.

Should we use decoupling capacitors? I think we should on the VDD pin between source voltage and ground, as close as possible to the pin itself (in parallel).
But should we also use them on data lines? Output pins?

Also, what size and capacity should they be? Should they be ceramics or electrolytic?
This is new to me so I hope someone can clarify it a bit for me. Thanks.


texts:
I tried a new PCBA factory for one of my boards design with an order of 200 PCS. I didn't notice my BOM had two references for the same Finder relay on same line. Until now, I was lucky enough for my other PCBA factory to order the right reference but this one ordered the wrong reference.

So now they are offering me two options :

Cutting the 3 last pins of the relay which don't fit on my board
Ordering 200 relays (but with the recent outbreak of Coronavirus, it will add up to 45 days for the production to be finished + additional 10-15% of total paid price)

As the wrong relay is a changeover one and my boards stay most of the time "open", the cut pins will have a voltage applied on them and some traces are just below. So I don't think it's a good idea to do this. But as it will add lead time + costs, I want to be sure.

The right reference is :

Finder 62.23.9.012.0300

Wrong one (on pictures below) :

Finder 62.23.9.012.0000

These relays make contact for 230VAC 3-phases voltage. We use them with up to 10A currents.

Here's the part of the design concerned :


texts:
If I rectify 10Vac (rms) by diodes without a voltage drop to a full wave pulsating dc,
the peak voltage would be Vrms x square root of 2 = 14.142135V
The dc (average) voltage would be 2V peak/pi = 9.00316V,
And the ac voltage would be 4.35236V (the rms value of the ripple)

I have adjusted the supply voltage to get 9.003V on the Vdc voltmeter.
To get rid of the voltage drop over the diodes, I am measuring the AC through 2 diodes on each polarity. The Multisim measurements are different from mine, and since they are also calculated, I wonder what formulas they use.
edited: I have made the actual circuit and have measured with 3 different multimeters.
They came closer to the calculated values than the multisim.
I have scaled it up to reduce error. For 100Vac (after diodes voltage drop) sine wave,
the Vdc (average) was 90.5, and AC measured 42V. (for 10V rms,.. Vdc = 9.05, .. vac = 4.2)
multisim for 10Vrms had: Vcd = 8.83, and for Vac =4.62


texts: Accelerometer gives wrong values for stationary axes

texts:
I have a BMI160 IMU which gives a good reading for the axis parallel to gravity (1G or -1G), but a changing value of about 2G or -2G for the axes that should show 0G. This is true for all axes, I've tried rotating the IMU.

I'm reading the IMU with an STM32F4 Discovery board via SPI. To my understanding, the IMU outputs data for the accelerometer in 2 bytes, with LSB being first. Inside these bytes, the bits are in MSB format. So a reading of 0111 0010 1111 1101 should be 64 882 in decimal (flipped to 1111 1101 0111 0010) and equate to about 19.23 m/s^2 or 1.96 G. I know the exact bits moving in the SPI data line, since I've read it with a logic analyzer to check.

BMI160 settings: power mode is "normal", and ACC_CONF register is "0x2B": no undersampling, normal filter mode (3dB cutoff frequency), and a data rate of 800 Hz. I've also tried 100 Hz and 1600 Hz. Baud rate for SPI is 156,250 Hz, I've tried higher too (for example 1,250,000 Hz).

I know the BMI160 works well, because I have a Bosch Application board and Development Desktop program, which output a nice running graph of good-looking data for all axes. I've also tried a different BMI160 and different STM32 board.

I suspect the problem is somewhere in how I either initialize the board, or how I read the SPI, but where exactly?

Datasheet for BMI160: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMI160-DS000-07.pdf


texts: Survey of High-Level Language Interpreters/Compilers for Microcontrollers

texts:
I would like to generate a list of high-level language interpreters and compilers (e.g. something that compiles LISP to C code) for microcontrollers.

I've done a bit of research so far that I will document here:

List of projects for running Python on microcontrollers:
http://web.media.mit.edu/~nvawter/projects/pyMicro/

PyMite:
http://wiki.python.org/moin/PyMite

python-on-a-chip:
http://code.google.com/p/python-on-a-chip/

Armpit Scheme:
http://armpit.sourceforge.net/

TinyScheme:
http://tinyscheme.sourceforge.net/home.html

Minimal LISP Interpreter:
http://www.sonoma.edu/users/l/luvisi/sl5.c

Embedded ML:
http://embeddedml.sourceforge.net/Site/Intro.html

eLua:
http://www.eluaproject.net/

Embedded JAVA:
http://en.wikipedia.org/wiki/Embedded_Java

amforth:
http://amforth.sourceforge.net/

TinyTCL:
http://tinytcl.sourceforge.net/

Tiny BASIC:
http://www.ittybittycomputers.com/IttyBitty/TinyBasic/index.htm

AVR shell:
http://www.instructables.com/id/AVRSH-A-Command-Interpreter-Shell-for-ArduinoAVR/

Bitlash shell (AVR): http://bitlash.net/wiki/start

Transterpreter (occam-pi on AVR):
http://www.transterpreter.org/

Rite (embedded Ruby) (will be released in 2011):
http://www.slideshare.net/yukihiro_matz/rubyconf-2010-keynote-by-matz

Jal (pascal like) for PICs, compiler: http://www.casadeyork.com/jalv2/ libraries: http://code.google.com/p/jallib/

.NET Micro Framework (C# and VB.NET): http://netmf.codeplex.com/

This is a community wiki – please feel free to add to the list.


texts: Why is this switching transistor heating up?

texts:
I am building control board for fan cooling.
It runs from 12V power source, and it is controlled by input analog signal 0.3V to 1.2V which just controls speed of fan.
Problem is that switching transistor Q2 gets hot.
I tried to use opamp in circuit and then comparator. It takes longer time to heat up with comparator, but it gets hot as well.
I switched from opamp to comparator to minimize switching losses in mosfet.

How could I minimize heat dissipation in that transistor?


texts:
I'm trying to read data from an APDS-9253 with an xmega.
My i2c bus is working because I'm reading other devices without any problem.
From the datasheet it seems at power-up the sensor is not activated: LS_EN is 0.
Here my flow:

write 0x06 at address 0x00 (MAIN_CTRL)
read registers

I get these values:
reg[0x00] = 0x06 // correct
reg[0x01] = 0x36 // reserved
reg[0x02] = 0x08 // reserved
reg[0x03] = 0x05 // reserved
reg[0x04] = 0x22 // correct
reg[0x05] = 0x01 // correct
reg[0x06] = 0xC2 // correct
reg[0x07] = 0x20 // correct? it should be 0x20 only the first time
reg[0x08] = 0x00 // reserved
reg[0x09] = 0x00 // reserved
reg[0x0A] = 0x00 // no data
reg[0x0B] = 0x00
reg[0x0C] = 0x00
...
reg[0x15] = 0x00

There are four weird behaviors:

I can readback the MAIN_CTRL register (0x00) just after writing to it, otherwise always reads as 0x00
the MAIN_STATUS register (0x07) is always 0x20 after writing the MAIN_CTRL register. Otherwise it changes to 0x00 - as I would expect anyway
the LS DATA STATUS bit in the MAIN_STATUS register is always 0, as it never has new data available
in any case, the data registers (0x0A -> 0x15) are always 0x00

Am I missing anything in the configuration of the registers?


texts: Why are PIN junctions better for solar cells than PN junctions?

texts:
In lecture today my professor mentioned that PIN junction make better solar cells than PN junctions.
Why is this true?
The PIN junction will have a wider depletion region which means it'll have a lower capacitance, so wouldn't PIN junctions be able to store less energy, right?
Also, the electric field is also weaker in a PIN diode due the wider depletion region.


texts: Diode circuit fed with voltage follower doesnt work

texts: I have a ldr circuit. In order to drive other circuits i connected a LDR circuit to voltage follower. I want to see at the output either nearly 0V or 9-12V. At Ltspice it works, but at the blackboard output remain same 9V. Yet, at the + pin of the voltage follower i see 9V or 0V. What do I need to connect in order voltage follower to work correctly?


texts:
What I mean by this is a motor with a large hole in the middle, instead of a shaft.
Some motors I found allow to easily remove the shaft, but the bore/shaft diameter I need (at least 4 cm) and RPM (700-900) are not even close.
Where can I find such a motor?

(The motor has to be small. Why it is needed: http://i.imgur.com/eoL79BU.jpg )

A ready DC motor + gears + bearing assemply like this will also work. But I'd prefer not to as teeth will produce more noise and wear off faster.
I'm also skeptical something like this will allow about 900 rpm.


texts: How does the photovoltaic inverter synchronize with the grid?

texts:
My question is somewhat related to this one.
Most of the 3 phase inverters used for photovoktaic (PV) on grid installations can work only if there is AC voltage present. After the AC voltage disappears, the inverter is turned off due to safety reasons.
I understand how the inverter can see that there is no AC before it starts working - it can easily get in sync with the AC waves.
The part I don't understand is how can it figure out that the AC voltage dropped after synchronization was in place already? The inverter is "pushing" the current out now, so how does it know that there is no grid voltage, since even if it disappears, its own voltage is there- how can it tell the difference?


texts:
I have designed a PCB that has a Atemga328 chip, connected to 6 logic level MosFETs via the PWM lines of the chip. The board is primarily designed to run long lines of led strips. Turning them on, fading etc.

The board has been thoroughly tested, and the only issue discovered is that when there is a big load (~4A per mosfet), the atmega chip becomes unresponsive. This is exacerbated when driven with PWM signals rather than leaving the load permanently on.

On inspection, there is a huge amount of noise on the power lines that correspond to the switching of the mosfets (I cannot produce screenshots at this point in time).

Upon doing research I have found a couple points of possible failure with my design.

The use of a 7805 regulator for atmega chip. Although I would like to keep this cheap do to wide availability.
The use of a common ground plane for the power and digital grounds.

My question, is will separating the digital and power ground planes would help with the noise?  And what other steps can I take to reduce noise in the power lines?

board layout without planes

board layout with ground plane

board layout with 12V plane

Notes:

The board is designed to use a 12V rail for the MosFETs.
Two layer design.


texts: 3 phase AC motor 220V powered from 12V battery

texts:
I need occasionally drive watergate with gear box (e.g. http://www.servomech.com/main/screw-jacks.htm). Because location is far away from 220V I suppose powering from SLA 12V battery charged from solar panel. Battery capacity 7-20Ah. Required motor power is 50-100W (torque I think >0.2Nm). Because of outdoor usage I need IP66 or so. Price is also essential.

I did not find any 12V DC motors and seems that 3 phase AC motor (e.g. SIEMENS 1LA7063-6AB, 0.09kW,870 rev/min) produced in large quantities is the only option.

I can use power inverter 12V-DC/220V-AC and 3 phase frequency changer (e.g. Sinamics G110) to power motor even with trapezoidal profile. Expected efficiency 85%*95%. It could be assembled from stock products and it should work. I don't think it's worth to do it as home-made application.

I wonder if I can do it much simpler when I make simple inverter (IRS2153+current sensing IR2127+FETs+toroid transformer 2x12V/220V) and connect to 3 phase motor using Steinmetz method. Output of inverter is rectangular 220V voltage with adjustable frequency (easy to implement IRS2153 has option to force switching frequency from MCU).

The questions are:

1) Steinmetz decrease motor power to 70% and starting torque to 50%. But I believe efficiency remains unchanged, i.e. in other words I can use stronger motor without power loss compared to regular 3-phase triangle connection. Is it true ?

2) Is it possible to regulate motor revolutions via changing of inverter output freqeuncy (i.e. apply trapezoidal profile) ? I'm uncertain how Steinmetz capacitor value (70uF/1kW) is related to voltage frequency (50Hz).

3) how motor copes with rectangular AC waveform? I think it may affect insulation bacause of voltage peaks.


texts:
I would like to know what are special requirements for an Electric Vehicle Charger. Specifically, how does it differ from a regular Battery Charger?
I have heard of Level1, Level2, and Level3 charging. However, other than the side-band access to Vehicle capabilities and higher power levels, what other features would differ in an Electric Vehicle Charger?
Also for getting to know the Vehicle capability, are there any standard data formats which are employed?
One thing I could think of is pre-paid access to Charging power, what else?

Help me finalize a spec, Please :)

Best Regards,

Vishal Sapre


texts: Why do a lot of new low cost IoT modules use a MIPS 24K processor rather than ARM?

texts:
it seems like a lot of new low cost (< $20) IoT modules that pair a microcontroller with 802.11 networking rely on the MIPS 24K processor. Based on my experience this is a relatively obscure choice, as opposed to an ARM microcontroller. Is there a reason why the MIPS processor is more appropriate for this application than say an STM32 (ARM Cortex M3)?

Why is this?

Examples of MIPS-based IoT modules:

The Omega, contains the Atheros AR9331
The Omega 2, contains the MediaTek MT7688
The Black Swift, also contains the MT7688

I could imagine a reason to be cost, ease of electrical integration, or driver support.


texts: Eagle PCB change drill size of all vias of a specific size

texts:
I have designed a board and there are many vias with 8mil drill sizes. I just found out from the manufacturer that the smallest drill size is 12mil.

Is it possible to change all 8mil drill sizes to 12mil? Or I should do this manually?

Another problem would be the outer and inner diameter of via pads.

For currently 8mil via drills, the outer and inner pads are set to 17.84252 mill (automatically by eagle)

For 12 mil vias eagle has set the outer and inner pads to 21.84252

I have no expirience with ULP scripts, but I believe there should be an easy way to achieve this. I think it is possible to do this by carefully find and replace the numbers in the .brd file...but I would like to avoid that and do it the official way!


texts:
I'm working on my raspberry pi door bell and facing the electricity problems that is beyond my knowledge, please help

What I have:
one AC wire from door bell, it's around 0V when Idle, then when someone press the door bell button, it increases to 5V AC

What I want to achieve:
My RPi needs the 3.3V DC input to monitor the "Button Press" action, so my first thought was to get a relay or transformer to convert the 5V AC to 3.3V DC.
So I brought one from amazon, something called Adjustable Power Module/Regulator, here's the link: http://www.amazon.com/gp/product/B0052YHXOA?psc=1&redirect=true&ref_=oh_aui_detailpage_o02_s01

What's my problem:
well, it doesn't work, the multimeter shows 0 or a very low voltage (around 0.3V) from the DC output from that Module, so I guess that I was getting the wrong thing

I'm asking around to find out any idea or any solutions to convert my 5V AC to 3.3V DC, so I can connect to my RPi to continue the project

tks in advance and Merry Christmas to everyone!


texts:
I'm designing a circuit with a uP (5V logic), Bluetooth module (3V3 logic) and a voltage level translator (TXS0102).
Is it up to my consideration on where to do the cross-over? 3V3 side or the 5V side.


texts: How performant are the arduinos as keyboard controllers? E.g. for a gaming application

texts:
Issues I'm concerned about are:

Latency (e.g. approximately seconds between key press, and key reaching PC or OS).
Ghosting.


texts:
I am working on a FPGA project where a host CPU writes a 10,240 x 16-bit look up table into FPGA logic. To implement this, I've utilized on-chip memory to store the values and read them out when ready.

An external trigger/go pulse kicks off a processing cycle which lasts several hundred thousand clock cycles. Once we get this trigger, the state of the 10,240x16 LUT needs to be frozen or latched, so it can be utilized during the processing cycle. Unfortunately, the data needs to be available fairly soon after this "GO" pulse, so there is not enough time to do a complete buffer copy.

The host also needs to be able to continually update some values of the look up table while the current cycle is being executed, in order to setup for the next processing cycle. To allow for both cases (latching the state of the lookup table, but also letting the host update it whenever), I think that double-buffering ping/pong style is the way to go: The host writes to one buffer until we get to "GO" command, then the host writes to the other. The FPGA logic always reads out of the buffer not being written to.

However, since the host is not rewriting all 10,240x16 values when it does its sporadic updates, the buffer that is not being written to is essentially "dropping" the updates while it's frozen.

Is there a novel way to handle this scenario? I'm thinking there needs to be some kind of buffer resynchronization process once the buffer is unfrozen.


texts:
I am trying to write verilog code that will set the initial value of the output of a positive-edge triggered flip-flop to 0. The behaviour of the flip-flop circuit is exactly what I want AFTER the clock or the input c hits. Unfortunately, at the very beginning (before any activity in c or clk) the x value is wrong because my initial statement seems to have no effect:

I understand that the problem may be that the Q output of the flipflop is always initially 0, and the inverter sets the x value to 1. Therefore, could someone suggest how to change the code so that the initial value of x is 0? Maybe use a series of latches? Essentially, the behaviour I want is that when the c value is high, x is also high, but when the clock hits, x is always reset to 0.

module test (c, x, clk);
   input c;
   input clk;
   output x;
   reg x;
   initial begin
     x = 0;
   end
   always @(posedge clk or posedge c) begin
      if (c) begin
        x = c;
      end else begin
        x = 1'b0;
      end
   end
endmodule


texts: I am using JST SM connectors for connecting two sets of wire. There are two slots in 2-pin connector. I wish to know, what is general convention for assigning the polarity to these slots? Is it slot 1-ground & slot 2-Vcc or slot 1-Vcc & slot 2-ground? Also how should I assign these slots for control pins(like clk/sw/sck)? Is there any uniform convention? And what is general assignment of slots in case of 3-pin connector? I have attached an image of the connector with visible slot numbers. Any Help is appreciated.


texts:
Is it safe to use a CMOS IC? For instance I'll be using a CD4017 in this circuit:
 http://www.555-timer-circuits.com/police-lights.html

Will it still function correctly? Any further modifications needed?


texts: How to choose value of resistor in voltage divider?

texts: I understand that the output voltage is determined by the ratio between the two resistor values, and that if the both resistors are same then output voltage will be exactly same for all; but what's the basis of picking the resistor values?there is any need of consider output current to choose resistor value.


texts: 50/60 Hz signals and ADC sampling frequency

texts:
As some of my previous posts, I'm trying to find the RMS of sine wave during the first cycle, but I still have some questions as for the sampling frequency.
Let's say I choose a sampling frequency of 1 kHz. That's one sample per millisecond.
For a 50 Hz signal: 20 ms/1 ms = 20 samples per cycle.
For a 60 Hz signal: 16.67 ms/ 1 ms = 17 samples per cycle
But my system won't know if it's a 50 Hz or 60 Hz signal to adjust the number of samples, so is there a way to capture both frequencies with a common number of samples and sampling frequency? My application is to measure only earth leakage current. No intention to find power.


texts:
I have a circuit that takes 12V AC as an input but my bench power supply only delivers 12V DC, is there any issue if I give the device DC instead of AC? (Same voltage)

Straight after the input there is a 4 diodes bridge to make it DC so I would say that it's not a problem since the current would flow only through 2 diodes instead of 4, just want to be sure.


texts: Resolving an issue with syntax in SystemVerilog

texts:
I am trying to build a 4:1 multiplexer using 2:1 multiplexers that I've built. I am getting a few errors whenever I try typing the command:

vsim mux4_test

Array connection type 'reg$[1:0]' is incompatible with 'wire[1:0]' for port (sel): can't mix packed and unpacked types.
** Error (suppressible): (vsim-3053) mux2.sv(19): Illegal output or inout port connection for port 'Z'.
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2a/g6 File: NOT.sv
# ** Warning: (vsim-3015) mux2.sv(19): [PCDPC] - Port size (1) does not match connection size (32) for port 'Z'. The port definition is at: NOT.sv(3).
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2a/g6 File: NOT.sv
# ** Error (suppressible): (vsim-3053) mux2.sv(19): Illegal output or inout port connection for port 'Z'.
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2b/g6 File: NOT.sv
# ** Warning: (vsim-3015) mux2.sv(19): [PCDPC] - Port size (1) does not match connection size (32) for port 'Z'. The port definition is at: NOT.sv(3).
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2b/g6 File: NOT.sv
# ** Error (suppressible): (vsim-3053) mux2.sv(19): Illegal output or inout port connection for port 'Z'.
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2c/g6 File: NOT.sv
# ** Warning: (vsim-3015) mux2.sv(19): [PCDPC] - Port size (1) does not match connection size (32) for port 'Z'. The port definition is at: NOT.sv(3).
#    Time: 0 ns  Iteration: 0  Instance: /mux4_test/m4a/mux2c/g6 File: NOT.sv

And here's my attempt in doing it:

For 2:1 mux:

module mux2 (
    input logic d0,          // Data input 0
    input logic d1,          // Data input 1
    input logic sel,         // Select input
    output logic z           // Output
);

logic w1,w2,w3,w4,w5,w6,w7,w8;
NOT # (.Tpdlh(10), .Tpdhl(8)) g1(.Z(w1) , .A(d0));
OR2 # (.Tpdlh(2), .Tpdhl(6)) g4(.Z(w5), .A(w1), .B(w4));
NOT # (.Tpdlh(10), .Tpdhl(8)) g2(.Z(w2) , .A(d1));
OR2 # (.Tpdlh(2), .Tpdhl(6)) g5(.Z(w6), .A(w2), .B(w3));
NOT # (.Tpdlh(10), .Tpdhl(8)) g3(.Z(w3) , .A(w4));
NOT # (.Tpdlh(10), .Tpdhl(8)) g6(.Z(w7) , .A(w5));
NOT # (.Tpdlh(10), .Tpdhl(8)) g7(.Z(w8) , .A(w6));
OR2 # (.Tpdlh(2), .Tpdhl(6)) g8(.Z(z) , .A(w7), .B(w8));

endmodule

for 4:1 mux:

module mux4 (
    input logic d0,          // Data input 0
    input logic d1,          // Data input 1
    input logic d2,          // Data input 2
    input logic d3,          // Data input 3
    input logic [1:0] sel,   // Select input
    output logic z           // Output
);

logic w1,w2;

mux2 mux2a(
.d0(d0),
.d1(d1),
.sel(sel[0]),
.z(w1)
);

mux2 mux2b(
.d2(d0),
.d3(d1),
.sel(sel[0]),
.z(w2)
);

mux2 mux2c(
.d0(w1),
.d1(w2),
.sel(sel[1]),
.z(z)
);

endmodule

Testbench

module mux4_test;
logic d0,d1,d2,d3,sel[1:0], z;

mux4 m4a(
.d0(d0),
.d1(d1),
.d2(d2),
.d3(d3),
.sel(sel),
.z(z)
);

initial begin
d0=1'b0;
d1=1'b0;
d2=1'b0;
d3=1'b0;
sel[0]=1'b0;
sel[1]=1'b0;

#20
d0=1'b1;
d1=1'b0;
d2=1'b0;
d3=1'b0;
sel[0]=1'b0;
sel[1]=1'b0;

end

endmodule

NOT:

module NOT (
    input logic A,
    output logic Z
);

parameter Tpdlh = 1;
parameter Tpdhl = 1;

not #(Tpdlh, Tpdhl) not1 (Z, A);

endmodule

OR:

module OR2 (
    input logic A,
    input logic B,
    output logic Z
);

parameter Tpdlh = 1;
parameter Tpdhl = 1;

or #(Tpdlh, Tpdhl) or1 (Z, A, B);

endmodule


texts: What does 'Voltage is the energy per particle' expressions mean?

texts:
I recently heard the expression that "Voltage is the amount of energy per electrical particle". I am confused about what it means. Isn't every particle have a certain amount of electrical energy?

How can an electron have a different amount of energy.

What is the difference of charge and particle energy ?
Is there an analogy between this and a water circuit or other physical system ?


texts: Does the AC analysis on LT spice find the voltage and current due to both DC and AC sources? Or must i do an op point analysis and a DC analysis? Im being asked to plot the voltage across Rs as a function of time.


texts: How to get constant 5v power supply when using same power supply for motors & micro controllers

texts:
I have made a wifi controlled car using nodemcu. It works fine if I connect nodemcu to a separate 5v supply.

But if I use the same power supply for both the motors and nodemcu, it resets automatically sometimes when the load is high & I lost my wifi connection with the mobile.

I am using L298 motor driver to drive 4 plastic geared motors and two 18650 battery (8v Approx).

Reset happens when I use inbuild 5v supply from L298 to power up the nodemcu. Also, I tried a separate 7805 regulator for nodemcu, but same problem.

I believe this problem happening due to high load on motors. But I don't want to use a separate power supply for nodemcu since my space is very small.

simulate this circuit – Schematic created using CircuitLab


texts: Magnetic Field around step-down converters

texts:
I'm courious how strong is magnetic field around step-down conveter? My plan is to use one LM2596 @ 12V(1A at maximum load) and one LM2596 @ 5V for STM32.
I Know that coils generate MF around itself and in, lets say normal use I don't have any problem with magnetic field. But in this project I want to use MPU9250 for compass. I'm pretty sure magnetic field interferes with magnetometer, am I?
Is magnetic field strong enough to disrupt MPU9250? Is there any way I can protect MPU9250 from magnetic field? Anti magnetic field shield? Enough space from step-downs and MPU9250?
I hope that exists way to use step-downs and MPU9250 in same housing.
I can separate them cca 15-20cm max. Will it be enough?

Simple: Is it possible to use magnetometer(MPU9250 module) near two step-down converters?


texts: How to build an 8 output demultiplexer, using only the two output demultiplexers?

texts: I think its some basic question but I'm really confused about MUX/DEMUX. Should I use 2-output  demux's outs for in?


texts: VHDL - Send string using a function or similar

texts:
I've been toying for a few months with the GO board to start getting some bases on how programmable logic works.

I've managed to get through pretty easy stuff and the basic one byte UART, here's where my dilema and frustration begin. How the hell can i implement a simple function in my UART module to send a multibyte stream?

It'd be nice (maybe it's not the way you're supposed to work with FPGAs) to be able to have a function and pass the text/value to output via UART as a parameter.

Is it possible (of course almost everything is possible) to do such thing in a nice, handy way? Am i too wrapped up in the microcontroller mindset and this is not feasible?

Can someone outline me the structure to do it?

Thanks,


texts:
I am designing a small (10mm^2) resistive-based heater. I wish to heat a ceramic surface to about 250°C, via some high frequency AC-current. My aim to is have some sort of high-temperature PCB printed in order to fit long enough (to get high resistance/low current) and counter-winded trace (to avoid induced magnetic fields). I am looking for some high-fusion point and high-resistivity traces and a proper material to print the circuit (PCB will melt at those temperature...).

Could anyone let me know which materials are available?


texts: NAND equal rising and falling time in Spice

texts:
I have written a spice code to implement a NAND gate. Then I measured the switch time of that. (The time between change in input which effects the output). I want the rising and falling time to be equal. I tried changing the width of the NMOS and PMOS but I can't find the width in which the rise and fall time be equal. Any idea? Here is my code:

*hello spice
.include "22nm_HP.pm"

.subckt nand in_a in_b out vdd gnd

.param  Lmin=22e-09
+ wm=44e-09
Mqna w1 in_b 0 0 nmos l=Lmin W= 3 * wm
Mqnb out in_a w1 0 nmos l=Lmin W= 3 * wm
Mqpa out in_a vdd vdd pmos l=Lmin W=wm/2
Mqpb out in_b vdd vdd pmos l=Lmin W=wm/2
.ends

X1 in_1 in_X out_11 vdd gnd nand
X2 in_1 in_0 out_10 vdd gnd nand
X3 in_0 in_0 out_00 vdd gnd nand

.param pvdd=2.0v
* Power supplies
Vin_a in_1 gnd pvdd
Vin_b in_0 gnd 0.0v

vin_X in_X gnd PWL 0ns pvdd 1ns pvdd 2ns 0 5ns 0 6ns 0 7ns 0 8ns pvdd 9ns pvdd 10ns pvdd 11ns 0 12ns 0

vvdd vdd 0 pvdd
vgnd gnd 0 0

* Control statements
.option post=1
.TR 0.05ns 30ns

.print DC Vm(out_11 out_10 out_00)

.print TR V(in_X out_11)
.measure tran delay1 trig v(in_X) val='0.5*pvdd' fall=1 targ v(out_11) val='0.5*pvdd' rise=1

.print TR V(in_X out_11)
.measure tran delay2 trig v(in_X) val='0.5*pvdd' rise=1 targ v(out_11) val='0.5*pvdd' fall=1

Vin in gnd PWL 0ns 0 1ns 0 5ns pvdd 6ns pvdd 7ns pvdd 8ns 0 9ns 0 10ns pvdd 11ns pvdd 12ns pvdd 13ns 0

.END


texts:
Theoretical questions with ideal components.(R2 is 10 Ohm)
1) parallel circuit. R1 and ammeter,
If I have a parallel circuit of 2 resistances, both zero Ohm, the current would split to 2 and each current would be half. If the resistor R1 would be 1 pico Ohm, and the ammeter zero Ohm, there would be no current through the resistor, and all the current would go through the ammeter?
2) Ohms law. R2 is 10 Ohm, current is 1A. voltage between point A and B is 0 volt,
resistance between A and B is 0 Ohm,  according to Ohms law, I = V / R = 0 / 0 = 0 A. Correction, 0/0 is not 0, it is undefined.(edited after posting)
Is it telling me that it sees this as 2 circuits, with a common wire, and the circuit between A and B has no current, but the circuit between (+) and (-) has 1 Amp. Correction, the current between A and B is undefined. (edited after posting)
Both questions are theoretical with ideal components, and the voltmeter and ammeter are connected this way on purpose. I would like to get some feedback on this topic.


texts:
I'm designing a device with a central MCU/MPU and two external peripherals. The MCU has an internal clock frequency of 110 MHz. I'd like to use the MCU to generate separate clock outputs for each of the two peripherals, but the frequencies needed by the peripherals aren't even factors of the internal clock frequency of 110 MHz. One peripheral requires either a 26 MHz or 38.4 MHz clock, and the second requires a 42 MHz clock.
There are multiple timer modules within the MCU that are capable of pulse width modulation (PWM). From what I gather, PWM can be used to generate different waveforms from a clock signal. Is there a way to use PWM to generate a "custom" clock signal? For instance, to use an input frequency of 110 MHz to generate a square pulse with a frequency of 26 MHz?
Edit: Adding information about MCU
To give some additional information, I'm currently looking at the STM32L552ME microcontroller from ST. The microcontroller has 3 PLL's: two are linked only with SAI modules. The other PLL drives the system clock, peripherals, and timer modules. From that PLL, the timer can have a base frequency of 220 or 110 MHz.
The external modules I'm going to drive are an ADC (42 MHz) and a 5 GHz wireless communication module (26 or 38.4 MHz). From what I understand, the timing for these devices is critical. I was hoping that I'd be able to run the clock generation with the MCU to save PCB space.