texts:
To my shock, Atmel has restructured the way they do port addressing in the ATtiny-avr-one series (1616 for example.). I am writing a function that takes in a pin and a port and sets the corresponding pin control variable to have a pullup. The problem is, a PORT struct is defined as follows:

typedef struct PORT_struct {
register8_t DIR;  /* Data Direction */
register8_t DIRSET;  /* Data Direction Set */
register8_t DIRCLR;  /* Data Direction Clear */
register8_t DIRTGL;  /* Data Direction Toggle */
register8_t OUT;  /* Output Value */
register8_t OUTSET;  /* Output Value Set */
register8_t OUTCLR;  /* Output Value Clear */
register8_t OUTTGL;  /* Output Value Toggle */
register8_t IN;  /* Input Value */
register8_t INTFLAGS;  /* Interrupt Flags */
register8_t reserved_0x0A;
register8_t reserved_0x0B;
register8_t reserved_0x0C;
register8_t reserved_0x0D;
register8_t reserved_0x0E;
register8_t reserved_0x0F;
register8_t PIN0CTRL;  /* Pin 0 Control */
register8_t PIN1CTRL;  /* Pin 1 Control */
register8_t PIN2CTRL;  /* Pin 2 Control */
register8_t PIN3CTRL;  /* Pin 3 Control */
register8_t PIN4CTRL;  /* Pin 4 Control */
register8_t PIN5CTRL;  /* Pin 5 Control */
register8_t PIN6CTRL;  /* Pin 6 Control */
register8_t PIN7CTRL;  /* Pin 7 Control */
register8_t reserved_0x18;
register8_t reserved_0x19;
register8_t reserved_0x1A;
register8_t reserved_0x1B;
register8_t reserved_0x1C;
register8_t reserved_0x1D;
register8_t reserved_0x1E;
register8_t reserved_0x1F;} PORT_t;

The datasheet specifies the memory offset of the port registers:

And the PORTn macros, are declared as follows:

#define PORTA  (*(PORT_t *) 0x0400)
#define PORTB  (*(PORT_t *) 0x0420)
#define PORTC  (*(PORT_t *) 0x0440)

What does the pointer and the dereference together do? More importantly, how can I write a function (without using switch statements) that takes in a port macro and a pin number (like 1 or 4 for example) and sets the pincontrol register?


texts: Is it normal for a Guitar amplifier to have dc voltage across the output before a blocking capacitor?

texts:
I don't tend to post questions on online forums so I apologise in advance if I've messed up here.
I'm currently trying to work on an old transistor guitar amp and in taking measurements managed to short one of the output transistors with my multimeter, blowing the other transistor and a fuse (as far as i could test nothing else was damaged). After finding a suitable replacement the amp works exactly as it did before, with the same issues it had before.
However when measuring the voltage across the speaker out BEFORE the DC blocking capacitor it measures 20v! (approximately the half rail voltage) After the capacitor across the speaker there is no DC. I stupidly didn't perform the measurement before trying to work on the amp so I don't know if this is how it's supposed to be and if this is normal, and if not what I need to change to fix it.
For a bit of background the amp is (as far as I can tell) a Quasi complimentary push pull with a single rail design. No service manuals available, I couldn't even find any documentation on the amp at all.
Edit: Thanks for the help!


texts:
Sir/Madam,
Kindly explain how is the following equation derived for the polarised condenser microphone?
The output voltage V0 fed from
the microphone to the preamplifier will be

how is it derived?
Thank you,

circuit diagram


texts: How to calculate the Back-EMF energy on an Inductor?

texts:
The Back-EMF generated by an inductor in Volts is: \$V = -L\dfrac{di}{dt}\$

Where \$L\$ is the self-inductance and \$\dfrac{di}{dt}\$ the rate of current change.

Now, let's say I want to store those Volts on a capacitor \$(F, V_0)\$ where \$F\$ is the capacitor capacity in Farads and \$V_0\$ is the initial voltage on the capacitor.

How can I find out the final voltage on the capacitor? How much energy stored on the Back-EMF field?


texts: Where should I put a 3.3V Voltage Regulator?

texts: I've stumbled across lots of schematics and one thing that I find is almost never consistent is where a certain regulator should go. I'm going to be using the LM1117 series. Should the 3.3V regulator go on the output of the 5V regulator, or should it be seperate from the 5V regulator and connect directly to the VCC Input?


texts: As I understand, all MOSFETs have body diode. But I see some symbols have body diode shown while some not. Is there a difference in such MOSFETs?


texts: Is it possible to vary an LED from low to high brightness at any frequency without MCU?

texts:
I am trying to think of way to vary an LED like in a christmas light where it just goes from max intensity to lowest intensity at any frequency without using an MCU. The reason is I don't want to use an MCU is I am trying to make it as small as possible and keep it cheap.

I am not sure yet of how many LEDs I will be driving and at what currents. However, my first attempt at thinking about how I would do it is by varying mosfet with a capacitor on the gate to slowly ramp up the MOSFET and keep it at the linear region longer. However, I don't know how to discharge the cap back to GND.


texts: A question on CMRR of in-amp and difference amplifier

texts:
When reading this article, I couldn't understand the reason why CMRR is much higher in 3 op-amp topology:

Here is the difference amplifier:

And below is the in-amp with 3 op-amps where the difference amplifier inputs are buffers and the texts says this topology has higher CMRR:

In both above the resistor mismatch of the difference amplifier sections can be the same. What increases the CMRR in the second one. Can it be explained in simple terms?

In other words, how do the buffers which are added to the difference amplifier inputs have effects on the CMRR?

edit:
According to this, the common mode voltage of A1 and A2 is buffered to A3, but what makes it reduced more? It is only subtracted at A3 as in differential amplifier. I dont get this. What increases the CMRR in the 3 amp model?


texts:
I'm using C language to implepement a simple 4th order lowpass IIR filter. I used ellip on matlab to get my coefficients,more specifically ellip(4,0.25,10,0.25). This is the frequency response on matlab.

Since my sampling rate is at 48KHz the filter should cut off frequencies above 6KHz.

Now, I know that something might be wrong with my code, which I will upload if necessary, but this is the output and input for some sounds:

Low frequencies seem to pass with mild decrease while frequencies above 6 KHz are not completely cut off until about 11KHz although there is a sensible decrease above 6KHz. Is this to be expected or should I start looking at my code?

UPDATE:
I haven't heard about passband ripple and stopband attenuation before. I just had a look at this question : what's the pass band ripple and stop band attenuation of a digital filter?

So now my main focus is to understand ellip. We have 0.25 dB passband so the small decrease in frequencies below 6 KHz makes sense( if I'm connecting this right). We also have 10dB stopband attenuation which justifies the high values for high frequencies. But why does the stopband attenuation stop at very high frequencies? Do passband and stopband ripple apply for frequencies only close to the 'cut-off' frequency?


texts: In serial communication, is the RX pin pulled high by default?

texts:
I would like to establish one way uart serial communication between an Arduino 5V and an ESP32 3.3V module.
The communication would be ESP32 TX pin ---> Arduino RX pin
I wouldn't use the second serial line, since I only need to transmit one way.

Now my question is, does the arduino pull its RX pin to high at any time during the serial communication?

If I understand serial correctly, the device only manipulates it's own TX pin, but leaves its own RX pin floating, is that correct?
The reason I need to know is that ESP32 is not 5V tolerant, so I need to make sure the arduino won't pull its RX pin high at some point and fry my poor ESP32.


texts: Switching between sequence different sequence lengths in pseudorandom number generating

texts:
I was reading Use Readily Available Components to Generate Pseudo-Random Binary Sequences and White Noise, by Art Pini, to understand generating pseudorandom numbers.

I understand that broadly speaking, you need a shift register and an XOR gate.

I was wondering if there's a way to design a pseudorandom bit generator that switches between different sequence lengths (between 11 bit and 7 bit random number generation) with the change of a single digital input value (high <-> low for example).


texts: The materials used in an electrical grid going from power station to house

texts:
In getting an overview about how Electrical Grids work, I was hoping to connect the dots from voltage up to the materials (used in modern electrical grids).

I am wondering if one could outline briefly the high-level materials / components used in building one. This could just be as simple as a stereotypical design, or a more modern idealistic one.

I am basically hoping to get introduced to the structure of some of the main pieces so I can look further. The wiki page only talks about voltage and distributing electricity. The Power station page has more of what I am looking for but doesn't describe materials/construction. As an example, my attempt at describing an electrical grid system is this: "An electrical grid is composed of a set of power stations (which generate the energy) and a set of wires? (which transmits the energy) to a green box in your neighborhood. The wires to the green box are wrapped in x rubber and made out of 70% copper and 30% x generally. They are on average 1-inch thick, so they can carry x voltage. The power station stores the electricity in big batteries made out of x, surrounded by concrete to prevent electricity leakage. They have motors made out of x, y, and z typically too.." As you can see, I don't know what I am talking about lol, this was just a demo. Essentially, just a high-level intro to the materials and components when going from power station through the grid to the house. Thank you so much for your help. I know it sounds broad but I am really just hoping for a few sentences to get introduced and get started with learning more, given the terminology.

I have seen basic documentaries describing aspects of wind/solar/energy production, so I understand the gist of that. But hoping to put names to the materials of things so I can learn more about the physics of it.


texts: Physical intepretation of the absolute value of impedance

texts: If \$\rm{Re}( Z)\$ gives the reactance of a circuit, then what is the physical meaning of \$|Z|\$? How do they differ, and when would one use one over the other? (Where \$Z\$ is the impedance of an arbitrary circuit)


texts:
What are the cheapest microcontrollers available?

This would be in volumes over 1000, though hobbyist availability would be nice.

I'm looking for the cheapest of all microcontrollers - my requirements are minimal, 1 IO pin, any supply voltage, single chip.

(This is a "community-wiki", so anyone with >100 reputation can refine and improve answers)


texts: How to open 8-pin Mini-DIN female connector?

texts:
I have a female connector that looks like this.

I want to use it in the panel of my product, so I have to remove the outer black sheath. Any tips on how I do it?  I can't get it to open.  Even to solder a wire into it, I need to open it, and I have no idea how to do it...  I'm guessing it'll look something like this once its opened.


texts: How does an active filter transfer function translate to a block diagram?

texts:
I am having troubles trying to translate when finding a transfer function of an active filter is it in a 'Close loop' or 'Open loop' state?

When finding the transfer function of these active op-amps how come we don't include the characteristics of the op amp itself?

For example a Op-Amp has an Op-loop gain I would imagine you need to include that in your transfer function otherwise you could use any op amp/disregard any op amp?

Example: Sallen-Key Butterworth Filter of 2nd Order

$$ H(s) = \frac{1}{C_1 C_2 R_1 R_2 s^2 + C_2 R_1 s + C_2 R_2 s + 1}$$

Its confusing as the OP-amp has a feedback of 1.

Closed Loop:

Open Loop:


texts: Managing addresses of interrupt service routines and functions of the program in cortex M0

texts:
I am working with nordic nRF51422 uC with cortex M0 core and I have to store data in Non-Volatile Memory but to do that properly I need information where exactly code of the program is stored in flash.

The vector table is fixed at address 0x00000000 and it tells me the start of each interrupt service routine I have implemented but I struggle to find information what is the length of each ISR. It would be also useful to know where each function of the program starts and ends.

Summarizing, is there any easy way to spy how the code of program is mapped into flash? Is it compiler dependent? Can I set my own boundaries for each function? Are there any mechanisms that enable dynamically checking end address of the code while executing program on uC ?


texts: LM317 - Why could I not get more than 200 mA from the output?

texts:
My task is to heat a coil, with a resistance of approximately 0.8 ohm. I need to make a constant current source to make it work correctly. I want to use LM317T as a constant current source, but I could not get more than 0.2 A. Even when R1 is a 1 ohm resistor. I am using this schematic.

Can you help me please?


texts: Are current and voltage orthogonal in a transmission line?

texts:
If there is a phase difference on a lossless transmission line between current and voltage, is it always 90deg? Assume the Load matches the transmission line characteristic impedance.

If not what are the conditions for the phase not being 90deg (load or no load)?

Anyway to show this orthogonality or phase difference in the equations?

Source: https://www.ibiblio.org/kuphaldt/electricCircuits/AC/AC_14.html


texts:
The project must be able to detect the amount of water in tanks and transmit the information to a farm house it must be wireless and unfortunately there is no cell phone reception in the places that need to be monitored.

I have a way of measuring the water that is pretty easy, going to use ultrasonic distance measuring and some maths unless anyone else knows something better?

My problem is to transmit around a max distance of 400 km and must be done with as little power and setup as possible. Going to be using solar panels and will research that later but for now its getting the comms down.

Does anyone have suggestions for the equipment to use for this project? I have looked into a few applications but most require big antennas that need to be setup. The transmission rate is not a problem as it can be as slow as needed really because of minimal data to be sent.

The line of sight is not too great as I'm told but not horrible either.

I would like to use Arduino as I am familiar with it. Repeaters are an option, but would increase the cost a fair amount.

I am willing to get a HAM license but would prefer not to as I'm not really going to use this for "talking" just sending data once every day or so.

Any suggestions and pointers would be of great help.


texts: Why is the range of an FM signal shorter than AM signal? I thought it was due to the high frequency of FM signal getting absorbed by physical barriers. Is it so? Does power of a signal has any role to do with range?


texts: NPN Transistor switching two loads with common ground

texts:
I have a 12V siren (speaker that includes a driver) that has two positive leads, one for steady sound and one for a yelp sound. There is also a shared negative lead.

I want to control both sounds from two Arduino output pins. I currently have this schematic but I'm not sure how to hook up the other positive lead.


texts: Pololu S7V8A strange voltage drop when connected to load

texts:
I've bought new S7v8A step-up/step-down voltage regulator which should give me on output 2.7-8V. However, when using multimeter I am adjusting correct value let say to around 5V (it really doesn't matter it happens all the time) and then connect it to my board (Teensy 3.1) it immediately drops the voltage to 0.84V.

What can cause this error and is there a way to fix it?

EDIT1:
According to documentation the microcontroller max current value is 185 mA. I didn't find any information about minimum load. The regulator has 4 pins connected as shown below:

simulate this circuit – Schematic created using CircuitLab

According to the info from the website:

  The SHDN pin can be driven low (under 0.4 V) to power down the regulator and put it in a low-power state. The quiescent current in this sleep mode is dominated by the current in the 100k pull-up resistor from SHDN to VIN. With SHDN held low, this resistor will draw 10 µA per volt on VIN (for example, the sleep current with a 5 V input will be 50 µA). The SHDN pin can be driven high (above 1.2 V) to enable the board, or it can be connected to VIN or left disconnected if you want to leave the board permanently enabled.

The SHDN pin can be left not connected and it should still work correctly.

So as you can see it is quite strange behavior (at least I guess so).


texts: how to calculate maximum temperature of wattage on wire?

texts:
how do a calculate the maximum temperature that a certain wattage can get on a wire?
I know how to convert wattage to "Celsius heat units (IT) per hour", but eventually the wire has to stop heating up, right?
EXAMPLE: if i have 144 watts, converting it to Celsius heat units (IT) per hour would be 272 degrees Celsius. But i still don't know, if that is the hottest it will get.


texts: Ammeter changes the behaviour of my circuit – how?

texts:
Calling it a circuit is perhaps overstating it, as it's essentially three black boxes: a Dell MK394 external power supply originally for a desktop PC, a DT9205A multimeter, and a Yaesu FT-450D HF transceiver. The power supply is quite straightforward: it outputs +12V on a bunch of pins, 0V on another bunch, has a sense pin which powers the thing on when grounded and some other pin of unknown purpose but which doesn't seem to be important.
I was hoping to use the power supply for my transceiver, but it keeps tripping the overdraw protection when the radio powers on. When troubleshooting, I connected my multimeter in series, expecting to see a brief spike in current before the protection circuit kicked in.
Instead, the transceiver now reliably powers on and works just fine, with the amperage showing about what I'd expect when sending and receiving.
What exactly is going on here? I was under the impression that the shunt resistor in an ampere meter was practically insignificant, but here it's apparently enough to placate the protection circuit? Or could something else be going on here? Ideally I'd like to replicate it so I can complete my project.


texts: How should a USB C connector be wired to support 3.0?

texts:
I'm investigating developing a board with a USB-C connector, tied to a USB 3.0 hub, which would have various downstream ports connected to an MCU, thumbdrive, etc.  My question is about the four pairs of SS TX/RX signals on the connector.  I understand the CC pins can be used to determine the connector/cable orientation.  So would I need to use switches to select between the TX1/RX1 and TX2/RX2 pairs based on the state of the CC pins, and connect the outputs to the hub?  Are there components that incorporate all this (detecting the CC and switching the USB-C signals to provide the SS TX/RX pairs)?

Are the second set of SS pairs used only by USB 3.2 devices?

I'm looking at TUSB8040A from TI currently for the hub, and PI3USB302-A from Diodes for switches. Any thoughts or other suggestions?


texts:
I'd like to design a buck converter using MCP19035, I've gone through the datasheet of this component and and the design procedure using it. In the datasheet, it says that the component provides Two options for the frequencies (300kHz or 600kHz), but nothing says who to select one of two frequencies, which is a critical parameter for power train component selection.
Can you please go through the datasheet and help me to understand this component ??


texts: Functional difference between various astable 555 circuits

texts:
Looking through some 555 square-wave-generator circuits (possibly with variable duty cycle for 4-wire PWM fan control) I've found three different circuits:

From the Wikipedia 555 article, a "standard 555 astable circuit":

From DPRG, a "simple PWM circuit":

From Overclockers.com, originally from Nidec:

Functionally, these circuits all seem to do the same thing, but seem to be vastly different in design, particularly the last two (the Wikipedia circuit lacks variable duty cycle, though the article briefly mentions it); short of simulating them, is there a way to determine which is "better" or are they equally valid?


texts: PCB Design: Strange 'whiskers' from PCB pads?

texts:
Regarding the attached PCB image, you'll notice that there are odd 'whiskers' from PCB pads. I'm curious as to their purpose.

The board isn't high frequency, so I doubt it's for any fancy RF-magic.

My best guess is that because it is a home-etched board, these are intended to aid with component placement in the absence of a silk-screen layer: i.e., pointing out which way resistors go, etc., but there don't seem to be many places where components match.

Equally, it doesn't seem to match with another guess that they'd identify pin-1 on an IC or a common pin on switches, etc., so I'm at a bit of a loss.

I've never seen anything like it before. Any other suggestions welcome.


texts: What is does a resolution of "11.8 bits" mean when looking at a digital signal?

texts:
I recently picked up a project at work involving a magnetic sensor. When reading the data sheet, it lists a range of resolutions from 11-bit to 12.8 bits,  11.8 bits being nominal. I can understand these maybe being an average, but they are listed as output resolutions. Is this common and something I have simply never seen before, and if so, what is meant by "11.8" bits?

Thank you.


texts: Is it Possible to receive the phone calls through GSM Modem Interfaced with Computer in Computer?

texts:
Actually I am doing a Project. GSM Modem is interfaced with the PC. Remotely a mobile phone will dial to GSM Modem(SIM inserted). Is it possible to receive the voice signal trough the modem to PC? For SMS there is no any problem, we can easily receive using the AT commands.

I was wondering is there any AT commands to receive the Voice Signal and Transmit it to Computer?


texts: Why is phase margin considered more important than gain margin in dc-dc converters?

texts:
Control theory text books say both gain margin and phase margin give information about relative stability. These quantities also give an idea about the corresponding closed loop system's transient response.

In dc-dc converters analysis, all the papers and books are talking only about phase margin(~45 deg) to keep the loop stable and to achieve a reasonably good transient response.

Why is gain margin not given much importance in dc-dc converter analysis?


texts: I am trying to build a switch: I have to batteries both 12V, I want to minimize voltage spikes when switching from one battery to another. the switch is essentially being made as an emergency. One battery will operate, if it goes out then the other will begin to operate.


texts: Transfer function_Approximation of second order system for a linear actuator

texts:
I am trying to approximate a transfer function of a system. The system is a linear actuator, connected to a feedback potentiometer. The actuator has a mass on it. The following figure is a step response, with 24 V as input, and the potentiometer position as output.

by this, I found out it is totally impossible to approximate this system as a first or second order system. Is there a way to experimentally find an approximation(I mean transfer function) of this behavior?


texts:
I am adding Power over Ethernet functionality in my Toradex's System-on-module (Colibri iMX6ULL) based carrier-board design. I am having confusion in selecting the MagJack for the design. I want to implement Mode A and Mode B. However, It would be great if someone can comment on the designs for 4-pair mode.

The MagJack that I am considering is SI-52003-F. The schematics presented in their datasheet has been posted below:

Since, the schematics shows center-tap on network side of the transformer and the Power Pins are brought out. I think it will work for my application but I am not 100% sure. The rectification designs that I am considering are given below:

Design 1 is simplest and requires less space and components. It assumes the pinout and polarity as given on wikipedia.

Design 2 assumes the polarity can be different and makes sure non-IEEE 802.3af PSE works with my PCB.

My earlier version of the PCB (without PoE) has a MagJack (without centre-tap transformer). The Ethernet part of the schematics is below: (R19 is unassembled)

My questions are:

What would be best Design (1 or 2) for my application?
The MagJack that I have been considering, Is it suitable for PoE (Mode A and Mode B both)?
The last question could be a stupid question but still I want to be sure before proceeding further. I was using this MagJack in earlier version of my PCB and it was working perfectly. However, I am moving with SI-52003-f Magjack for PoE capabilities. Will it make any difference for the Ethernet Controller if I switch the MagJack?


texts: How is a transformer working at 10's of MHz designed?

texts:
In this answer a switching power supply using a transformer operating at 10's of MHz range to reduce size is mentioned.

How would such transformer be designed? Would it still have a plain old design with a core and windings, just smaller, or would it have some alternate design?


texts: How does the number of poles in an induction motor determine its speed and torque?

texts: I notice that the higher the number of poles, the slower the induction motor spins. Likewise, the lower the number of poles, the faster it spins. How does the number of poles affect its speed? Also, does the number of poles have any effect on its output torque?


texts: Saturation voltage of diode connected mosfet?

texts:
I am trying to build and simulate current mirror using discrete components.

Below picture shows circuit configuration in OrCad for simulating in PSPICE.

The problem is that the large signal voltage at the drain stays around 3.1V(3.146V shown above), and I can only control using voltages from 3.1V~4.3V.
I tried changing R3 from 100Ohm to 2K Ohm, but it doesn't seem to affect that voltage significantly. I checked datasheet, and Rds On is 13Ohms in saturation, so the transistor doesn't seem to be in saturation. Is there any way I can lower that voltage?


texts:
While going through the solution of the above problem i noticed something like below.

 Address of port A becomes 11100000. Can't get that.  I am confused why it's not 01100000. Thank you!!


texts:
I'm trying to estimate the battery life of my device and just need a sanity check since numbers I'm getting are wildly different depending on the method I use to calculate battery life. For brevity I'm going to write first method that I've tried.

Device will spend 7 seconds in active mode, during which average current is 5mA. After that unit spends 600 seconds in sleep mode, where average current is 70uA.

So total period is 607 seconds, meaning ~0.012% of the time unit is drawing 5mA, while rest of the 99.988% it's drawing 70uA. So assuming this logic is sound (which might not be the case) my unit is drawing

(0.012*5 + 99.988*0.07)mA = ~7.06mA

On 1000mA battery with 0.7 factor (700mAh), that means my unit will run for ~99 hours?

Does this makes sense?
Is there a better way to calculate/estimate battery life if your unit is not drawing constant current like in this case?


texts: Cheapest communication solution including wifi bluetooth and ethernet

texts:
A few friends and I are underway designing a senior project. We are looking for ways to make our product cheaper, and of course it comes to our most expensive ic components. We haven't gotten very far into the development of all the desired communication schemes, and I'd like to take a lot more time into researching the best approach rather then delving into writing code for a chip I wont use. I'm looking for the cheapest way to get wifi, ethernet, and Bluetooth capabilities. I'm also interested in PLC (power line communication) and AM radio though these are bonus aspects if you will. All things, considering time is a cost as well, I don't mind putting in the effort to get a cheaper final solution. This could very well turn into a long journey, but so be it- just looking for some guidance in the best way to progress forward.

Note: I'm not looking for a panda board or arduino packed with sheilds... I want some IC's such as WIZnet W5100 (for wifi)  or  TDA5051A ASK power line modem (PLC)...but I'd love one package...or some suggestions!


texts: Explain currrent and voltage in this circuit?

texts:
Please help me to understand.According to me if there is no voltage drop across an element the voltage at its trailing end must be same as the supply voltage.
  1: http://i.stack.imgur.com/LW32B.png
But in the above simulation there is no voltage drop across R1 and the voltage at its trailing end is shown as 0.23v.the ammeter shows 0A.Without current(I) there will not be any voltage(V).


texts: Maximum voltage divider resistances for sensing LiPo battery voltage over 10bit ADC: is MOhm range working?

texts:
I've designed a PCB that should contain as few components as possible but it should have a simple way for measuring the battery voltage using an ADC channel and a simple voltage divider. My current design with 100k-220k division:

Consumes around 12µA, which is still a bit much for my project constraints.
I'd like to use resistances with 10x that value so around 1MOhm-2MOhm. The readings don't have to be accurate, I just want to have a rough estimate of the LiPo voltage to know when it is empty. I guess if there's too little current drawn over the voltage divider, the noise will be a problem for the ADC.
Is there a best practice for my application or some reference on estimating the noise caused by such high resistances?
EDIT: I am using an ATMEGA1284p AVR MCU, which has an input impedance of 100MOhm

Reference1
Reference2


texts:
I'm working on some old school Zetron consoles for my summer job.  They provide 2/4 wireline control to some base radios as well as I/O for aux operations like triggering relays to open/close doors and turn lights on/off.

Generally they get installed in sets of two(2) or more.  When installed together one of them needs to have an impedance jumper set to high impedance while the other is set to low.  If you have more than two(2) then the farthest one from the base stations is set to low impedance while the others are set to high.

I understand that the setting of the high impedance is so it doesn't load the audio on the system and make it weak but my question is why don't we just set them ALL to high impedance?  What does the single low impedance unit do to the system?  What disadvantage is there to having them all be set to high impedance?


texts:
I am trying to find information on formulas used to calculate capacitance required for a given circuit. Not a circuit in particular, just in general how to figure out what value should be used. I know about selecting voltage ratings at least 20% higher than the max possible voltage, or even more cautious selecting at least double the expected voltage. But have not found much on finding the value in capacitance that will be needed.

It is beginning to look as though there are many different formula depending the the specific capacitors application in a circuit. For example I found to calculate a filter capacitor in a power supply, C = I / (Vripple x 100).

So as I said, I am just trying to find a good resource (or a few) about calculating values of capacitors for various applications. Thanks for checking out my question, I am excited to get reading and figure this out.


texts: How to hack a walkie-talkie to light up LEDs when it receives a signal

texts:
Rookie circuit-bending question: I am trying to hack a walkie-talkie to light up some LEDs when it receives a signal. I figured the easiest thing to do would be to have the LEDs light in relation to the audio signal, but I don't want to compromise the sound quality too much.

Someone on another forum suggested the following:

  Some explanation:
  1: This is the speaker, just hook up the transistor to one of the ends of it. If one end doesn't work, try the other.

  2:The transistor will be triggered by the voltage on the speaker, and charge up the capacitor. The capacitor will retain it's charge for some time while triggering the Transistor in 3. Then you can hook up whatever you want to the transistor, like an LED. You might want to use a darlington transistor (just 2 transistors cascaded like this: http://i56.tinypic.com/5nm683.png ).

  You will have to play around with the values for the capacitor and the right resistor, but something along the uF range and 1-10 kOhm should do the trick. The resistor on the transistor at 1 should be rather more than less if you don't want to impact the sound quality too much, so also something along the 10 kOhm range.

I tried this out, but no luck.

EDIT:
I tested the + to - leads on the speaker. When it is making a sound, it goes up to about 30V AC.

I also tried variations on the circuit below.

It is not lighting up the LED.

I read on this Transistor Circuits page that transistors require .7V between B and E to switch on. As shown in the color sketch, the voltage measured is much lower than that.

I'm not sure where to go from here. I assume I just need to increase the voltage between B and E on the transistor, but how?


texts: Are IR LEDs placed under the same category as lasers?

texts:
I am creating a device which uses IR LEDs to illuminate the human eye, while an IR camera records the pupil dilation.
From my research, I see that there are two standards which are related to the wavelengths (950nm) of my IR LED. These are:

"IEC 62471:2006 Photobiological safety of lamps and lamp systems"
"IEC 60825-1 SAFETY OF LASER PRODUCTS - PART 1: EQUIPMENT CLASSIFICATION AND REQUIREMENTS"

If I use the 1st standard the equation is:

My exposure limit is: 18000.7^-0.75 = 4182.63 W/m²
And the 40 IR LEDs that I have produce: 40 * 0.011W/sr/0.120² = 30.55 W/m² (at a distance of 120mm)

Therefore, this is well below the limit.
But if I follow Standard 2 for "Maximum permissible exposure (MPE) at the cornea for direct exposure to laser radiation", the equation is this:

where

and C6 = 1 (I am assuming from reading the standard)

MPE = 18*7^(0.75)10^(0.002(950-700)) = 244.96 J/m² = 24.49 mJ/cm²
Q = 24.49π(0.35²) = 9.427 mJ (Assuming worse case: 7mm pupil)
Power Φ = 9.427 / 7 sec = 1.346 mW

and the total radiant flux of 1 of the LEDs is:  35 mW -> This is obviously higher than my calculated limit (assuming that my calculations were correct)
Therefore, my question is simply: Which of these standards does a IR LED (or array of IR LEDs) need to satisfy?
Thank you.


texts: Create a pulse that is active from ~0.3 to 0.4 times the clock period

texts:
I'm sorry if the phrasing is somewhat weird, but the question is hard to articulate. I've created an IC Sample-and-Hold where I have a hold capacitor at the output. I want to charge this capacitor while the clock is high, but also after the signal has stabilized. Is there anyway to delay the clock signal for around 0.2xPeriod (to make it sample after stabilization), and make it fall off again after around 0.4xPeriod (before the clock turns off).

Attached is a figure of what I'm looking for. Above is the clock signal supplied to the circuit, below is the ideal sample signal I want to derive from the clock signal.


texts: Limits on frequency generation using nonlinear device + resonator cavity

texts:
I recently saw a schematic of an RF device which supposedly could generate a ~1GHz sine waveform via a 50MHz square wave run through a diode and fed into a cavity resonator.
What I'm curious about is if this degree of frequency multiplication is even possible.
In general, when would you want to design an oscillator at the target frequency versus when would you want to use some form of frequency multiplier + bandpass filter?
It seems easier to generate a stable 50MHz square wave than a 1GHz sine wave but there must be some down side.


texts: 'Contains FCC ID' compare to just 'FCC'. Certificate of conformity

texts:
I wanted to get FCC certification for my device.
The device uses WIFI module (FCC approved).

The testing house said the test will leverage on the WIFI module FCC test.
Instead of getting FCC certification, I will get Certificate of Conformity.

I need to put "Contains FCC ID" xxx-xxxxx" on the product, instead of just "FCC" logo.

Is there any difference between putting "FCC" and "Contains FCC ID"?

Thanks!


texts: Why MIMO antenna system performs better in multipath environment?

texts:
I have read about MIMO (Multiple IN Multiple OUT) multiple antenna system help mitigate the multipath effects (like fading), otherwise occurring in a SISO i.e. single antenna system.

But I have been claims that MIMO antenna system is more productive if the multiple channels used by multiple antennas are highly uncorrelated with each other. If the channels are correlated then, the MIMO performance is as good as a SISO.

Any insights on why MIMO, to perform better, 'needs' to have an uncorrelated channel in a multipath environment.

Thanks.


texts:
My test says the answer is c) A OR B.

To me it looks like: Q = AB + (A+B)

What am I doing wrong?

Which of the following is a logical expression that is equivalent to the logic circuit shown below?

Answer is c.

a) A AND B
b) A AND (A OR B)
c) A OR B
d) B AND (A OR B)


texts: SPI transaction between FPGA and Microcontroller

texts:
I'm trying to write a communication protocol between an FPGA and a Microcontroller through an SPI, the µC being the Master here.

FPGA: Lattice iCE40 Ultra Breakout Board Rev.A (iCE5LP4K)
µC  : Nordic
nRF52 (PCA10040)

Here's the code I'm using for the FPGA part, simulation works nicely within Active HDL with process simulating the Master behavior. Here's how the transaction is supposed to look like (as explained in the link above):

There is data available in tx_load_data registry --> trdy is high
Master send command "0000 0000" instructing the slave to load the subsequent MOSI data into the receive register, while simultaneously outputting the transmit register to MISO (Master receives tx_load_data)
trrdy goes low when the last bit is sent
Likewise, rrdy goes high to assess that new data sent by the master has been received.

This works in simulation, I've managed to get the same as Figure 4 (see link above).

Trying to reproduce the same behavior with the µC attached, data is loaded, trrdy goes high, I send a command like "0x0A", it gets transmitted and there's something going on the MISO link, but I can't read it properly.
From what I understood with SPI communications, I'm supposed to receive the response while I'm presenting data through MOSI. Is that right?

The following are samples of my C code, I'm pretty sure I'm doing something wrong but I lack experience.
When debugging, the registers of the receive buffer are often filled with "111111" (words of 6 or 8 bits, it's inconsistent).
The sendByte function is called within a button handler, and the rx buffer is printed out in the spi event handler, called at every transfer.

 /*
 * This function is supposed to ouput 00000000 01000001 to MOSI
 * Data received is buffered in m_rx_buf[20] array, declared in the header
 */
 void sendByteTest() {
    ret_code_t err_code;

    uint8_t m_tx[2];
    m_tx[0] = 0x0;
    m_tx[1] = 'A';

    m_length = sizeof(m_tx);        /**< Transfer length. */
    err_code = nrf_drv_spi_transfer(&spi, m_tx, m_length, m_rx_buf, m_length);
    if (err_code != NRF_SUCCESS)
        NRF_LOG_PRINTF(" Error during transfer.\r\n");

    memset(m_rx_buf, 0, m_length);
}

int main(void) {
    /** CLOCK, BUTTONS, GPIOTE initialization omitted **/

    nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG(SPI_INSTANCE);
    spi_config.ss_pin = SPI_CS_PIN;
    spi_config.mode = NRF_DRV_SPI_MODE_2;   // ss_n is active low, set accordingly
    spi_config.frequency = NRF_DRV_SPI_FREQ_125K;
    spi_config.bit_order = NRF_SPI_BIT_ORDER_MSB_FIRST;
    APP_ERROR_CHECK(nrf_drv_spi_init(&spi, &spi_config, spi_event_handler));
    int i = 0;

    while(1) {
    nrf_gpio_pin_toggle(LED_1);
    nrf_delay_ms(200);
    }
}


texts: Change Schematic Background to custom color in Eagle

texts:
I am still using Eagle 7.7 and I know how to change the schematic background to black, white or colored. Under Options>Set>Colors I have the option to change each color but all 3 seem to be locked, you can go through the motions of changing the color but the color does not change.
I would like to change the colored of the background in the schematic area to grey.
Is there anyway to do this?


texts: For an electronic device the the MTBF requirement is 4500 hours per year for 10 years, what does this MTBF mean and how to convert it into hours?


texts: What type of connector is this, and how to connect cable into it?

texts:
The remote control for the boiler fall into the flor and one of the cables got disconnected from a connector. I don't know how am I supposed to put it back in, because the red seems to be really well placed, but I can't put the black.

This is the picture of the connector, and I would like to know what type of connector is it and also how to properly put the black cable in.


texts: Arduino I2C communication between 2 master networks

texts:
I have 2 Arduino microcontrollers, each with a network of I2C devices connected to them (one has 2 ADCs and the other an LCD display and a RTC). How can I use the I2C connection to transfer the values obtained by the first uC from the ADCs to the second ? Both uC are masters on their I2C busses.
I was thinking of making a software I2C on the second uC and connect it as a slave to the first one (so the second controller would have 2 I2C ports: one hardware and one software). Problem is, I can't find any software I2C library that works as a slave. All are masters.

Waiting for your ideas.

Question is, can I make 2 I2c networks using one Arduino Mega2560 ? One as master on the hardware port to communicate with the LCD and the RTC and one as a slave on a software port on 2 other pair of pins (for SCL and SDA) for receiving data from another master arduino...

After analyzing all the data, I reach the conclusion that the 2 I2C busses cannot be linked together. On the external I2C port I have available on the data acquisition uC, I will connect another arduino as slave that will receive the information an pass it on by using a wireless adapter (probably a NRF24N01). That way, I don't need to have wires from my solar controller to the arduino that reports the production to pvoutput website.


texts: 3V Air Pump loses force when drived by a TIP120 transistor

texts:
I'm doing a project driving a 3V air pump motor with a TIP120 transistor connected to an Arduino board.

The schematic is the following:

When I connect the motor directly to the battery it has almost 50% more force than when it is connected to the transistor.
Anyone knows why this is happening?
Thanks!


texts: Double Shielding -- Insulator between shields?

texts:
To minimize RFI and provide maximum shielding on an enclosure, a double shield will be used. I need 120dB of isolation over a certain range of frequencies and will be testing using a reverberation chamber.

Are there any benefits from electrically isolating the second shield from the first or will both designs have the same RF isolation?


texts: which of these is more efficient for AC coupling

texts:
In the beginning I was using  the circuit  (at the bottom) to separate the AC from the DC ( the second order filter ) which in fact is just a second order high pass filter and the DC is a zero Hz component, it performed as expected as its cut- off freqency is 11 Hz and the output follows the frequency response

and here is the output

however today I came across another circuit which uses just a capacitor for AC coupling

what concerns me is the part of the coupling which I simulated it in my previous schematic in circuit at the top (with 20 uF capacitor),

at the end I suppose they are both high pass filters, and the (20 uF capacitor ) is supposed to be connected to a load to form the filter, in this case my load is supposed to be the impedence of the the analog pin ( I guess) to which I am connecting my signal ( I am using Arduino Mega )

but still I couldn't figure out which one will perform better in my case ? do I just need 1 capacitor and that is it ? or do I have to implement a complete filter as I did first with this second order filter

Thanks


texts: Design of 5 - 15 MHz Voltage Preamplifier

texts:
I'm trying to design a power amplifier for the HF band to drive an inductive charger. The stage I'm working on now is a voltage amplifier which needs to be able to amplify 1 Vpp to 10 Vpp.

The input signal (1 Vpp) can vary from 5-15 MHz. The output signal will drive the MOSFET gates of the second stage, so it doesn't need to be able to provide a lot of current.

The question is what kind of circuit topology should I be looking at to solve this problem? Some configuration of BJTs, mosfets, op-amps? Also, what parameters do I need to look for in choosing the proper components?

It would be great if it was non-inverting, with little or no phase offset, but that is definitely not a necessity.

My First Try:
I tried to build the circuit from this page, which says that a common-base amplifier is well suited for high voltage gain, and high frequencies. I chose this BJT to build it since it's specified as an RF transistor. Unfortunately, I can only get a little bit of gain around 10 MHz with the right biasing, but not with a 1V input, not anywhere near 10X, and it only works really close to 10 MHz.


texts: What happens to the maximun operating ratings when the device is unpowered?

texts:
I have a circuit with an OpAmp and a current transformer. My circuit applies a DC bias to the CT to be able to process the signal with an OpAmp with a single power supply, because the CT provides an AC signal. So far, so good.

I am wondering about what happens when the circuit is unpowered but the CT is still connected. In this case I don't have a DC bias, so I could have ±1V RMS at the OpAmp input pin and its datasheet clearly specifies that absolute maximum ratings are -0.5V and Vcc+0.5V. This is not a problem when I have the DC bias working, but it will disappear when power is off.

So the question is simple: what happens with this circuit when unpowered but the current transformer is still providing an AC signal?

Should I do something like adding a FET in parallel to the current transformer to short-circuit the CT when no power is available?

I am concerned about the OpAmp health and the transient at switch on/off.


texts: I'm building an H bridge and I'm stuck at some point

texts:
Here's the H bridge I'm building

Vcc = 9v
10 k resistors for the pullup
1k resistor for the transistor
2 PNP BC557
2 NPN BC547
2 push buttons

It should have a DC motor but I'm using LED and a resistor instead for safety purposes.

(original)

so I'm connecting everything exactly like the sheet, but still not working.


texts:
Can I use a 2.4 GHz rated parabolic MIMO antenna for 700 MHz Verizon 4G LTE data?

It seems 700 MHz are a long ways from the range of a 2.4 GHz antenna, but I have seen people marketing similar looking parabolic antennas that claim they are wide spectrum and go down to 600 Mhz and up to 5GHz... I'm just not sure at what attenuation though?

Will the same Verizon tower switch me from 700 MHz to one of their higher frequencies with better reception?

Verizon Wireless appears to utilize multiple 4G LTE frequencies like 2.1 GHz, 1.9 GHz, 1.7 GHz, 850 MHz, and 700 MHz. I don't know if they would they would responsively switch me from 700 MHz to a higher frequency if my signal improves though as some people report??? This would be important if I need an antenna that capable of working from 700 MHz to 2.1 GHz.

How I know the band I'm using: I used my iPhone to figure out I'm using band 13 for communication with my local Verizon tower, which is 700 Mhz by following these direction. I have LTE data miles away from the tower but it's not a good connection so I'm looking to get a highly directional antenna for my JetPack 7730L.

Specific use case

Here's the 900mm-wide (about 3 feet) parabolic antenna I'm looking at so you can have a specific example to pick on.

Added 2020-01-28: I did my own test to see if Verizon switches bands based on signal quality. You can see the video here.


texts:
I've run across a triac circuit which has a huge 510 ohm 50W load resistor tied to a 115V 1.6A PSC fan motor. I'm not quite sure what that big resistor is for. Ideas?

simulate this circuit – Schematic created using CircuitLab


texts: Putty won't allow me to type. Can only type the letter 'A'

texts:
I connected a SIM7605CE module to the PC (Image shown below).

I downloaded and installed all the necessary firmware for the device. I connected the device to a 5V DC power supply and connected it to the PC using a USB connection. The COM ports are as shown below.

When I try to connect to COM9 and open up putty to try and communicate with this device using ATI commands, I can't type anything. The only thing that goes through is 'A' or 'a'. Nothing else. What could be causing this issue? Strange thing is, it actually worked some time ago. I was able to communicate using AT commands. (The usual 'AT', 'ATI', etc.). Baud rate is 9600.

The current situation looks something like this.


texts: How can I flash an AVR using an Arduino without using Arduino IDE?

texts:
I want to program an ATTiny microcontroller using an Arduino Uno board via AVRdude. According to the Arduino Uno schematic, there is a direct line from the USB controller to the ICSP1 header:

I connected the wires from the icsp header (also removed the ATMEGA328P chip) to my breadboard and then to the attiny chip, then ran this command:

$ ./avrdude -p t13 -c arduino -P com3

I also tried -c avrisp

However, there is no response. I'm sure the port is com3, because I can read the ATMEGA328P using com3 on avrdude.

Is there anything else I need to set to be able to program the attiny with avrdude?


texts:
I am trying to design a simple FMCW radar for the ideal case. Below are steps I planned.

Transmit signal, Tx = cos(T)
receive signal, Rx = cos(R)
Mix transmitted signal and received signal, Sx1 = cos(T) * cos(R) = 0.5 * {cos(T+R) * cos(T-R)}
Apply Low Pass filter, Sx2 = cos(T-R) (I won't consider 0.5 because what I need is phase and frequency)
Apply FFT (Fast Fourier Transform) to get beat frequency to calculate range and velocity of the target.

In the process, I have a problem with step 5.

After mixing the transmitted signal and received signal, LPF is applied to get only the difference of two frequencies. And then FFT is applied to extract beat frequency. However, in sawtooth chirp, there are two values. f_b (frequency difference in T_valid region) and B - f_b (frequency difference in t_d region. Assume B is bandwidth.). The value we need here is f_b. Since we don't know t_d yet, how do I apply FFT over T_valid?

Similar question. I want to extract the up beat frequency and the down beat frequency. However, there are regions where beat frequency is not constant. I'll call this region T_invalid. If I include T_invalid region in FFT, I won't be able to get the constant value I need. How do I apply FFT over only the T_valid region?


texts: Are there high quality alternatives to Sigma-Delta for Audio

texts:
Is Sigma-delta pretty much the only game in town when it comes to ADC in the audio world (min 20-20k frequency response) ?

By looking at some of the major players and chip manufacturers like TI, Analog Devices, and few others, that certainly seems the case.

Looking for maximum performance--linearity, timing, F response,  S/N (if that is even a factor).

I think $100 max per stereo pair. That seems crazy given you can get a Burr-Brown Ti or others for under $30.


texts: What's the name of this NPN configuration?

texts:
I can't find it anywhere. I know it's not a darlington pair. I tried looking at the 'common emitter' configuration but the explanations of that all talk about a single transistor.

The switch on the left is actually the collector of an optocoupler and I'm trying to switch the load (the 50 ohm resistor and the LED) so that the load is connected when the optocoupler LED is on.

I should have used a PNP and switched the load from the high side but I didn't have a suitable transistor at hand so I came up with this. I did build this circuit and it works, but I don't know whether I just got lucky.

Do you think there is anything wrong with this circuit? I don't know much about the internal workings of transistors, so I might be missing something very important.


texts: I'm trying to establish communication between two boards, one of which has an RS232 output and the other with an I2C input. I've looked for adapters online and the only ones I've found seem to be RS232 to USB, which is not what I'm looking for. Is there a limitation in the technology that I've overlooked? What is the difficulty in converting RS232 to I2C?


texts:
A necessary condition for absolute stability of a system is

Gain cross over frequency < Phase cross over frequency

Where Gain cross over frequency is the frequency at which Gain = 1 or 0 dB

Phase cross over frequency is the frequency is the frequency at which phase = -180 deg

Can anyone please tell me why?


texts: Adding a NTC thermistor inline with a pot

texts:
I'm follow the simple design above that I found online and it works as expected. The IC is a 555 and I'm using it to drive a few 12v fans via PWM. The only things to note is that R3 & R4 are not used. I hope to add in a NTC Thermistor inline with the pot so I could fine tune the max fan speed point. I don't think I'm understanding the way this circuit is intended to function. I thought it would be as simple as adding the NTC in as R3 or R4. Then adjusting the value of pot to get the range I was looking for. I have pots of all sorts of sizes as well as 100 ohm, 1k ohm and 10k ohm NTC's. However adding them to either R3 or R4 does not effect the duty cycle. I might be using the wrong term but on a scope the duty cycle stays the same but the timing changes. I.e. no change in fan speed. But adjusting the pot changes the duty cycle as expected.

Should adding the NTC in R3 or R4 work as i'm expecting and i'm just missing something in the math?


texts:
How do we calculate the total resistance from A to B R1||(R2+R3) but the same can be said for R2 so how does it work?

simulate this circuit – Schematic created using CircuitLab


texts:
As you know most of the MCU's has several Vdd and Vss pins. In the case of two-layer PCB it seems convenient to use some polygons beneath MCU (like on the figure below). The first option is treat the top polygon as a ground and bottom as a power. The second option is treat the top polygon as a power and bottom as a ground. There is a third option: don't use two polygons and route power or ground by individual traces even though it's not very easy.
So which options is preferable in terms of a better chance of a good prognosis? Maybe there are other options?


texts:
I am simulating a model in LTspice and I Need to add the LTC1485 IC in the model. Unfortunately I could not find it in the LTspice library can anyone help me get this component model?

Many thanks


texts: Is a 555/6 suitable for generating a 1-3000Hz square wave from 0-5V control voltage

texts:
The goal is to use a control voltage from 0-5V to generate a square wave signal from 1 (ideally, but around 10 would be acceptable) to 3000 Hz (linearly, although I could work around it not being linear).

I've been experimenting with a 555 (556 actually) and can easily achieve that by altering R1, R2 and C, but I need to keep those fixed, as the only variable input I'll have is the voltage.

Duty cycle is not particularly critical here although around 50:50 would be nice - it's to control a stepper motor driver which needs a minimum 1.5uS pulse, so only the most ridiculous duty cycle would not conform at those frequencies.

I've looked at the formula at What is the equation for the 555 timer control voltage? (the one at the top of tardate's answer; the one in the question appears to be wrong) and by applying it it appears clear that the range I want is not possible with just Vcontrol.

I'm open to using both timers in the 556 if that could work, but I haven't been able to figure out a solution.

If a 555 is just not appropriate for this, can someone suggest an alternative?  I could always dust off the PIC programmer and get it to do this but I was hoping there was a simpler alternative.


texts: What does banking mean when applied to registers?

texts:
This answer to a question on StackOverflow about what banking means in the context of ARM's banked registers indicates that there is some confusion about the meaning of banking when applied to registers.

What does banking mean with respect to registers?


texts: How to use a capacitive touch screen without a human hand

texts:
I'm a programmer, and I usually hang out over on stack overflow, but I have a electricity question.

I'm trying to interact with an APP on my phone by indirectly touching the the screen.  Modern touchscreens, as I'm sure everyone here knows are capacitive rather than resistive, so that means that I should be able to interact with it as long as I can bring a small current to the screen where I want to touch.

I'm experimenting with using some speaker cable and a couple other wires I have laying around the house to see how far away I can be and still pass enough current through the wire to register a touch on the screen, based on my distance and the size and quality of the wire.

What I'm finding though is that touching wire to the screen seems to register a touch even without me touching the wire.  So is there already a current inside wire? Is it the type of wire I am using? I was under the impression that a wire on its own had no current and only passes electricity when there is an outside source.

Is there anything I can do to decharge the wire, or block it somehow?

Thanks for everyone for letting me know how exactly capacitive touchscreens work.  I had it wrong in my head.

The problem that I'm trying to solve is that I want to interact with my phone through its touchscreen from a distance.  Is there any material I can use to attach to my phones screen that will essentially extend the touchscreen to where I am?  I will only be a few feet out of reach, and it doesn't need to be fancy, just basically detect a touch event.

I realize it might be a strange question, so if I don't get any answers to this I will still choose an answer below, I've learned a lot from this question already.


texts: Doing logical operations on Port PINS in Assembly

texts:
I'm trying to do those following the operations on PINS, but not sure how to do the not operation on a port, do xor ..etc?
would someone show me an excrept psesuod code ?


texts: Using DC current to operate a fish feeder that takes 2 AA batteries

texts:
I'm a complete electronics newbie.

I have a auto fish feeder that takes 2 AA (1.5V) batteries. After changing the batteries quite often I got curious to find out if the feeder can be modified to run using the electricity at home. Some research led me to find these:

The AC current has to be converted to DC
An adapter is needed that converts 220V AC to 3V DC
I need a multimeter

So I looked around and found an adapter at home which says: Output:3VDC 1000mA 3VA. I actually have no clue what that means but I'm guessing that it will output the 3V required to run the auto feeder.

Bought a multimeter and used it to measure the output of the adapter. I was expecting to see 3.00.

Nope. I'm getting a reading of 6.46 every time.

So this is my question - is it OK to go ahead and wire the adapter to the fish feeder despite the higher reading? Will everything magically work or something is sure to blow up? Will adding some register help? I would've gone ahead to find out  if the feeder was available in my Country. I imported it from the US so I don't want to mess it up.

Could you guys please give me advice on how I can accomplish what I'm trying to do?
I'm totally ok to start from scratch.

EDIT: As for the adapter, it's from an electric shaver and this is how it looks:


texts:
I'm fairly new to electronics, and I was recently looking at some LEDs listed for sale online. Some LEDs were mounted on "star pcb":

From the picture, it looks like there are 6 connections. I'm pretty sure the LEDs just have 2 (an anode and a cathode).

Can someone explain the purpose of the other connections, or what the star shape pcb is used for? I tried googling, but all I could seem to find were more star pcb items for sale.


texts: A question about earth ground and current loop

texts:
If the live wire in above illustration touches to the metal case, a high short circuit current will flow to the earth through the safety earth wire and the fuse will trip.

Now imagine a 9V battery staying on a wooden table. If now its plus terminal is tied to the earth through a wire almost no current will flow.

Above two points shows that it is not the case that the earth is a reservoir that sucks all electrons, but simply current needs a loop to flow.

In the battery case it is obvious that there is no loop because the negative terminal is floating.

But what is the loop in the first AC case? Is that the AC generator star connection? Can you draw this loop to illustrate better?


texts: sampling rate and frequency response of a vibration sensor

texts:
I am trying to measure the vibrations of a lathe machine using a piezoelectric accelerometer sensor. I want to know if the sampling rate can be set at a value greater than the flat response frequency range of the sensor ?

For example, the datasheet of the sensor I am considering to use says that based on the mounting method (stud, adhesive and magnetic) the frequency response changes. If I decide to use adhesive, the mounting resonance is lower (45KHz) than when a stud(80KHz) is used and the frequency range over which the gain is flat also reduces from 0.002~25kHz in case of stud mounting to 0.002~10kHz in the case of adhesive. In the adhesive mounting the, frequency range increases by 1 dB at 20 kHz to reach its peak at 45 kHz and then falls. Suppose that I want to measure the sensor output at 25 kHz sampling range but the condition of my machine only allows for adhesive type mounting, do I have no choice but reduce the sampling rate ?


texts:
The LTC1668 is a 16-bit, 50Msps differential current output DAC.

The datasheet say that the COMP1 pin and COMP2 pin should be bypassed to VSS (-5V) with 0.1µF.

COMP1 is for Current Source Control Amplifier Compensation, and COMP2 is for Internal Bypass Point...

But in my own PCB, I unintentionally connected both COMP1 and COMP2 to GND with 0.1µF!

Everything is fine in appearance!

Can this lead to an error?


texts: How should I write a simple *.cir file in LTspice

texts:
I want to build a schematic block with four pins as follow in LTspice:
pins: Vin,out,Vres,nbit

function:
if abs(Vin)>=Vref
Vin=1
end
Vres=Vref/(2^nbit)
out=int(Vin/Vres)

Thanks


texts:
I have been looking at AC frequency responses for op-amps and I was wondering how an op-amp's pole and the frequency at the -3dB point are the same? They both mark the location where the gain starts to decrease by -20dB/decade, but I am not sure why.
How are the -3dB point and the pole of an op-amp related?


texts: How do I make a Polypropylene box static resistant?

texts:
I am beginning to organize my collection of electronic components and parts but have run into a roadblock of not knowing how to properly store anything that is ESD sensitive. I have been using ESD shielding bags that I have acquired over the last few years to store those components and parts, but now that I have implemented a drawer system I would like to keep those parts accessible in the same manner as my passive components.

By perhaps lining the the drawers with the ESD shielding bag material would the components be safe from ESD, or will another approach be necessary?

For reference:

Oh and as a side note, if anyone has a good schema for keeping resistors quickly accessible I would love to hear it!


texts: What makes this voltage regulator special?

texts:
I'm working on digesting the data sheet for the Texas Instruments bq34z100-g1 fuel gauge IC. I'm looking to use this chip with a 2 cell lithium polymer battery pack. If using a multi cell pack the data sheet recommends using the following voltage regulator setup. I'm assuming it's low power but i'm not sure how. I've never seen this setup before. What makes it special.

simulate this circuit – Schematic created using CircuitLab


texts: What is the purpose of the series of actions: amplification, band-pass, rectification, and low-pass?

texts:
Can someone describe for me in simple words (if possible) what happens to a signal if we:

Amplify it by $\times 40,000$
Band pass filter it (750-5000 Hz)
Full wave rectify it
Low pass filter it (<200 Hz)

This series of actions is taken from this paper (page 7 - recording of neuralactivity)

Thank you!


texts: I am a newbie, i have 2*7.4v LiPo, i need 11.1v, can i wire 2 of the charging wires of 1st lipo to another to obtain 11.1v(1S+2S=3S), will it be safe as i have heard that lipo's are less stable.


texts: Analyzing the SX1276 FIFO implementation

texts:
I've been through the HopeRF95W datasheet a couple of times; some parts less and some parts more.

The Payload Data Extraction from FIFO on page 36 is really very clear and concise.

Once the FifoPtrAddr is set to the end the written segment on the buffer (using FifoRxCurrentAddr), we check the number of bytes (NB) received, loop through that number and read the RegFifo; which is an 8bit register, that NB of bytes times.

This github implementation follow this as well:

uint8_t currentAddr = ReadRegister(REG_FIFO_RX_CURRENT_ADDR);
uint8_t receivedCount = ReadRegister(REG_RX_NB_BYTES);
*p_length = receivedCount;

WriteRegister(REG_FIFO_ADDR_PTR, currentAddr);

for(int i = 0; i < receivedCount; i++) {
    payload[i] = ReadRegister(REG_FIFO);
}

All clear and easy to understand.  I am only curious how the SX1276 knows to load the next 8 bits of the FIFO into the RegFifo by simply looping through it?

Is it one of those things where a read triggers some internal event/mechanism on the chip?

My lack of understanding here is probably just lack of experience, since my training and experience is in python.

I am also curious whether this payload extraction procedure is the typical FIFO implementation, or are they always chip dependent?


texts: I have a small toilet fan which is quite noisy and far too powerful for what we need. I'm looking for a solution where I could reduce AC 240V to AC 110-150V with minimum amount of components. Any transformer is out of question. Simply, no room for it. Initially, fan had a PIR sensor in the middle which was removed and now I have some space for components. 6x5cm and 2cm height. I know, it's not wise to use a resistor to reduce the voltage. Is there anything simple I could use in that space? I have more than basic experience in electronics but I didn't practice for 30 years. Sill, I understand components, diagrams, PCBs, multi-meters and can use a soldering gun. Anything I could get on ebay or assembly myself? Thank you all.


texts: P/N mosfet and Ideal Diode, how does this circuit works

texts:
This is what I found in http://durdoor.com/bin/ideal-diode when I search up some Li battery charger and UPS (Uninterruptible Power Supply) circuit.

I realize Q3+Q4 makes an ideal diode (for battery supply) and MAX920 (comparator) makes the switch for Vdc(IN) and battery. Q1+Q2 is the Vdc power path.

The question is how does this circuit works, special how does Q5 works? and C1, R2.

How to roughly estimate the switching voltage and time for this circuit when Vdc lost)?

Is there a mistake in use of Q1 (part of IRF7304)? I suppose its D-S inversion.

Thanks all.


texts: Why include frequency dividers in this PLL circuit?

texts: I found replicated in few sites this PLL diagram and I'm wondering why the authors included frequency dividers on the input and output signal, since the two signals to be compared have the same frequency magnitude? Why make the PLL working at 1:16 frequency?   Any benefit?


texts:
I'm trying to find out if there is a clock fanout buffer with two-input multiplexing that allows each output to select the the input independently.

I found an IDT part that is a two-input multiplexing 12-output fanout but it appears you can only select one input at a time to fanout to all 12 outputs:

I.e. for that part, all outputs are outputting PCLK0 at the same, or PCLK1, not a mix of the two.

What I'm looking for is something like that only where each output Qn can be independently configured to buffer either input clock PCLKm. E.g. So you could have Q0, Q1, and Q3 outputting PCLK1, while Q2 and Q4 are outputting Q0, etc.

Here's a block diagram of what I want to do:

The PLL and receivers can't really change, and I need to be able to select each output to buffer one of the input frequencies independently (as shown) and change them at runtime (not shown, but imagine I want to change output 3 to 160MHz while this is running). I imagine this would require a control interface like I2C or similar, not just config pins like most 2-input fanout buffers have.

Does something like that exist, and if so what would it be called? Obviously this could be done with a PLL, but I'm hoping to reduce space/cost/ etc with a buffer solution.

Thanks.


texts: Minimizing impedance mismatch in complicated HDMI routing

texts:
I have a slightly complicated routing issue with an HDMI project I'm working on. The project will allow you to plug two HDMI cameras and flip between them on a display. An HDMI 2:1 mux chip acts as the switch.

For proper differential pair 100\$\Omega\$ impedance routing for HDMI, I've chosen a trace width of 10mil and spacing of 6mil on my 4-layer board. PCB stackup spec here.

The complication is caused by the orientation of one of the HDMI connectors and the geometry of the ESD protection chip (On-Semi ESD8040). The pins of the HDMI connector are on the "far side" of where I need to route the traces, so I have to first traverse under the connector. Then I go through the ESD chip and then into the HDMI mux. Because of how small the ESD chip is, I have to reduce the trace widths to 6mil to fit in between the pads.

You can see the the undesirable 6mil traces going from the connector (J8) to the ESD chip (U14). Routing them as close together as I can, their differential impedance is 120\$\Omega\$, which is beyond the HDMI spec. The total length of the traces from the connector to the mux are about 0.5 inch.

In order to make the 6mil traces achieve 100\$\Omega\$, the spacing would need to be less than 2mil, which is well beyond the capabilities of my PCB fabricator. You can see in my layout above, I chose to run the 6mil traces from the connector to the ESD chip and then jump back to 10mil downstream of the ESD chip. I doubt that's the optimal solution.

What would be a better way to reduce the unavoidable impedance mismatch? Here's what I've come up with so far:

Route 10mil traces under the connector and then shrink the traces down to 6mil to go through the ESD chip (introduces another reflection point).
Use 6mil traces all the way to the mux chip (reduces the number of reflection points but increases the length of higher impedance).
Put ground pours on the top surface next to the 6mil traces to reduce their impedance.
Use different ESD components (however I really like the ESD8040 - it's made for high-speed video and keeps the BOM count low).
Not worry about it at all because it won't make any noticeable difference to the signal.

I know that the comprehensive answer to this question is to use a simulator. However, I haven't found a simulator within my budget as an individual. There are free 2D simulators out there, but I don't think a 2D simulator will help me in this scenario.


texts: Isolated Modbus (RS485) ground and UART noise

texts:
I build an isolated RS485 (Modbus) interface board for a sensor. I use ADM2682 as transceiver and VAQE6W-Q24-S12-D as isolated DC-DC converter. All is managed my a STM32L412.
There is 2 interesting screw terminal :

"Power" (CN6) : With "+" and "-" (power ground)
"Modbus" (CN4) : With "Signals" (x4) and "common" (signals ground)

Here is the relevant schematic parts :

I actually use a laboratory supply at 12V and a USB to RS485 converter on two wire mode, with short ~20cm twisted pair (with 3 wires : D0,D1 and GND) at 19200 bauds. The ground of USB to RS485 is connected to my COMMON on CN6. The USB to RS485 is connected to my PC through a HUB with it's own power supply. All are on the same power strip. All pair bridge, bias and termination resistor are in place.

My board can transmit data to PC without problem, but when PC send data, STM32L412 rise a "Noise Error" Interrupt. (The received byte is still ok)

When I connect "signal ground" (CMN) and "power ground" (VPWR-) all is OK, no more noise error occur...

I read this answer, but I don't understand why I need to brake my isolation between transceiver and power ground, I think I miss something important, please can you help me to understand ?
(I there a case where I don't need to connect signal ground and power supply ground ?)

Thanks in advance

EDIT 1 : THE POWER SUPPLY

There is no information about "isolation" on laboratory power supply documentation. I just found a basic schematic here :

I open the case and I found a transformer, power cord go directly to the primary of the transformer (through fuse and main switch) so power supply seem to be isolated.

EDIT 2 : SOLVED

Big THANK YOU to Frank I apply your "back to basic" procedure

  General advice: use an oscilloscope, put the ground clamp of its probe
  to some ground potential that you deem trustworthy, and try
  measuring/probing other "isolated ground potentials" in your RS485 bus
  topology (while the bus ground is not connected yet). This way you
  should find your culprit. Start with the 'scope set for the fastest
  timebase, then gradually slow down if you find something interesting.

All power supply seem very clean and flat on there own reference, but I find a 55kHz 400mVPP signal between Lab power supply ground and USB-RS485 ground. In fact I find this signal between ground and PE. I dont know how I dont see this before.

After unplug all my equipment from the power strip I find the guilty.
Since 2 week I buy a signal generator TENMA 72-14111. There is a front "tactile" power switch (In fact it's a standby switch) and a real power switch at back (I just discover). When back power switch is on, the signal generator produce a lot of noise (especially the big 55kHz and harmonics) over all my power line and PE.

When the signal generator is really shutdown or unplugged my isolated modbus interface work very well, without ground shunt. (I can even remove the ground and biasing resistor from the bus just for testing).

I am not very confident on my signal generator now, but I am relieved. Many many many thanks to @Justme and @frr to take on your time to help me and psychological support.

I encourage all to read the Frank answer here about gound and coupling, really helpfull and instructive


texts:
I want implement the state diagram using D flip flop without using K-map because of the complexity of 5 variable K-map.Is there any other method by which it can be implemented.

The state diagram is shown here:


texts:
In all split power supplies there will be at least two capacitors, one in between +V to ground and another in between -V to the ground. In an 300W (RMS output power) amplifier there are two 10 000uF 63V capacitor in each voltage lines.

I have one unit of 68 000uF 125V capacitor which I am planning to install straight between the +V and -V in that power supply.

This will improve or degrade the performance of the amplifier? This connection is obviously safe in electrical perspective, but such connection, at least in my knowledge is never been used in any power supply design.

Pls advice.


texts: Can Neutral terminal stay connected to a power supply and Live terminal switched?

texts:
I bought the following  switch which I would like to control the AC power (230V 50Hz) to an AC/DC converter with. This switch only permits one terminal to connect/disconnect, meaning I could control whether or not the Live wire is connected to the converter or not. But I cannot control if the Neutral wire is connected/not connected.

Is it safe/functional to keep the Earth and Neutral terminals connected from the power supply to the AC/DC converted while switching on and off the Live wire? Attached is a diagram illustrating this.

I ask since the previous designer used a double throw switch, meaning the Neutral and Live wire were connected/disconnected at the same time. Whereas now I'm connecting/disconnecting just the Live wire and I'm not sure if that is rational.

Thanks for your input!


texts:
simulate this circuit – Schematic created using CircuitLab
I assumed the MOSFET operates in the ohmic region.
Id = 1/2k × VDS(VGS - VTH - VDS / 2) and for VTH = 1 V I get 2 results ID1 = 3 mA. Okay.
ID2 = -5 mA. Not okay.
So how do I continue from here? How can I prove my assumption is correct or am I done here?


texts: Power relay makes ESP 07 to reboot(trying to control an electrical motor)

texts:
I have a 5V electric motor powered by a 220V-5V adapter.
On the command side I have an ESP07 that controls the above motor through a relay.

If I put the relay before the adaptor(220V), the esp works fine.

But if I put the relay after the adaptor (5V) the ESP07 is resetting and I cannot use it.

Is it because the reactive power? Would a diode solve this problem?

simulate this circuit – Schematic created using CircuitLab

Observation: the esp 07 power source is different
The first schematic breaks the ESP


texts: Can you measure the voltage produced in the heart using an oscilloscope or multimeter

texts: Can you measure a PQRST wave using a multimeter or oscilloscope, it you can will two leads be enough and why are 12 leads standard tor ECG monitoring?


texts: Arduino thinks I pressed a switch when I touch anything

texts:
So I have found something very strange and confusing, When I touch anything even my desk my arduino thinks I connected to the input of any pin I pick.

here is a video of what is happening

it even does it when connected directly to a battery

here is the video


texts: Sampling of non-baseband signals - Shannon sampling theorem

texts:
In the example on Sampling of non-basedband signals on Wikipedia,

the author said it is sufficient to sample at 4 MHz (twice the width of the frequency interval). But how did the author calculate the width of the frequency interval which in that case is equal to 2? Any explanations to how he came up with 4MHz

Wikipedia - Shannon sampling


texts: Are there dangers to humans from PCB/Circuit Corrosion?

texts:
A buddy of mine has a bunch of old electronics that were his fathers that were in storage for a long time, and some of them look pretty bad.

Some of the items look similar to what is shown in this picture:

With blue spots, nasty oil looking brown spots, and similar brown damage/build up on chips and parts.

I am curious how dangerous stuff like this could be for human handling, as well as being in his attic breathing while around this stuff?  Are there any worries one should have?

NOTE:  I'm not sure if this is a question better suited to biology/chemistry due to the nature of interaction with humans/chemicals, but figured since this is about electrical components it would best be suited here.


texts: I have just finished a basic lesson in electronics, an i have become interested in micro-controller programming.  I have decided i would learn on the PIC micro-controller because it looks simple and their are many tutorials available.  When researching the pic to start with the 16f877a was recommended.  However when i was researching it I think i heard somewhere that it could not be reprogrammed.  I was wondering weather it could be reprogrammed using a pickit programmer after having previously been programmed.


texts: rewinding AC induction motor to work with lower supply voltage

texts:
I have small single phase AC induction motor. It runs on mains voltage
(230 V) and I'd like to modify it to run from 12 V transformer. Motor has two stator coils.

How to calculate new number of turns for the coils?

My guess is that stator must give same magnetic flux before and after
rewinding. Therefore number of ampturns must stay constant.

Current with no load is 0.09 A and with blocked shaft it is 0.1
A. Apparent power is about 230 * 0.1 = 23 VA. To get the same power
but with 12 V current must be about 23 / 12 = 1.9 A. Solving for new
number of turns I get: old number of turns * 0.1 / 1.9. Does it
sound reasonable?

As for wire thickness I guess that I have to keep DC resistance constant and scale up the wire size.


texts:
I am trying to fit a Mini-ITX PSU into a small custom computer case. However with the PSU metal cage it is about 1/8" too tall. I can make it fit if I remove the cage.

It is safe to run a PSU without the metal cage?
The PSU will be about 1/8" away from the motherboard. Does that cause any issues?

I also tried looking for a smaller PSU and the only thing I can find is a Pico PSU with an external power adapter. However the power adapters seem to be sold out everywhere I have looked. 12V 16A power adapters are apparently hard to find or I am looking in the wrong places.


texts: Building custom hardware for programming boards with microcontrollers

texts:
I have a PCBA that includes a MSP430 microcontroller and another module.   The connection is shown in the photo below where the former (MSP430) is at the bottom and the top is for the other module.
Firmware for the MSP430 is programmed using the MSP-FET.  The other module is programmed with a TTL to USB cable.
I would like to design an approach similar to an in-circuit tester which allows me to program these boards easily by simply placing them on top of a circuit or test equipment which can connect to a PC.   My plan is to write some code which programs firmware, allows a reset to be performed and reads back information from the board.  It may make sense to use National Instruments Labview or some other software. I'm less concerned about the PC software.
I'm simply interested in some directions on building a suitable test-jig. I'm not sure what the approach is here since it needs to be custom enough to handle the location of the connectors? Is there something off the shelf that can be used which can do one or other module?


texts:
I found an interesting simulator for transmission Lines. I can set a precise value for the load and then see what happens. For instance, let's suppose Z0 = 50 Ohm and let's consider these cases:

1) (almost) Open Line (the simulator allows at max 10000 Ohm for a load)

In this case there is total reflection, and the total voltage wave is a standing wave and, if I understood correctly, it is that in red.

2) (almost) Shorted Line (the simulator allows a minimum value of 0.1 Ohm)

Also in this case there is total reflection.

3) Line "slightly" mismatched (with a load of 100 Ohm)

In this case there is a partial reflection.

4) Line matched

In this case there is not reflection.

My questions are:

What do the red and green arrows represent? Why do they have those orientations?
In 3), where there is little reflection, is the total voltage wave a standing wave?
In 4), why is the red line completely flat? I think that in this case the total voltage wave is purely progressive (V+(z)), so it should be a sinusoidal wave, in my opinion.
In 4), why only green arrows?
What are the impedance's values Z1,...,Z7 in each picture?

The simulator has been taken from here, the direct link is here.


texts:
The picture shows an overlap error. I am unable to resolve this error and need to know if any rules are broken?

The component is a flip-flop resistor (0805-THM, AdaFruit).
Wherever I used this resistor, it's throwing the same error.


texts: LED flashlight project: Need transistor ideas

texts:
This question is continuation of this question.

I did some research on previous question and made a circuit as a starting point. Here's a picture:

Now my problem is that TS555 device I plan to use can't drive those LEDs, so I'll most likely have to use a transistor for switching. My problem is that I have no idea where to start looking for a suitable transistor and that I'm generally confused about transistor naming schemes.

Also, general comments are welcome.


texts: What would cause a watch battery to leak?

texts:
I am using a CR1220 Lithium Manganese Dioxide battery to keep a real-time clock chip running during periods when batteries are removed from a device.  The battery is only connected to two pins on the RTC that are designed as battery inputs.

The circuit works as expected for a while, but after several months the battery backup stops working.  The RTC is rated for \$V_{bat}\$ from 1.8V to 5.5F.  The voltage measured on the battery's terminals while still in the circuit is 3.25V, but at the chip's battery terminals, \$V_{bat}\$ is 0V.  There is a white crusty trail leading from the seal between the positive and negative terminals on the battery to the negative electrode on the battery connector which is covered with  a white crust.  When I clean the white crust off, the voltage at the chip's battery terminals matches the battery voltage, and the RTC works as expected.

It appears that something (probably electrolyte) is leaking out of the battery,  coating the negative terminal, and insulating it.  I have seen this on at least four or five our our devices of the same design.

What could causing the batteries to leak?  The spec. sheet lists the maximum battery input leakage current as 100 nA at 5.5V (we are using a 3.3V supply).  Could current leaking from the supply into the battery be an issue?

[ Edit: I now see that battery data sheet says the max reverse current is 1 \$\mu\$A, so I am guessing that is not the problem ]


texts: Second Order Butterworth LPF Cut-off frequency determining from graph

texts:
I am trying to design a butterworth low pass filter with corner frequency at 2khz as seen below.

And my problem is when I find its transfer function It is as follows:
\$H(s)=\dfrac{1}{1+1.414\times (\frac{s}{2\ 000})+(\frac{s}{2\ 000})^2}\$
And bode plot of this function on octave is as folows:

The cutoff frequency occurs at -3 dB on this graph but when I simulate the circuit on LTSpice I found it around -6 dB.

Unfortunately it is around -6 dBs.
I did some research online and I found following graph:

(Source)
Following to the graph above it must be around -6 dB because it is second order filter.
I got so much confused. One of them must be wrong. Either transfer function or simulation.


texts: Is there a rule for DDR4 CA signals reference plane?

texts:
I'd like to know if there is any rule for the reference plane of DDR4 CA signals in PCB layout.
I saw some design guide which specify the reference plane to be VDDQ power plane for CA signals, but I'm curious why.
The reference plane of the data pins is always GND plane.
Can anyone help on this question?
Thanks!


texts: Inequality outside of process (in when statement?) (VHDL)

texts:
I am rewriting a VGA controller in (I hope) a better way; I have a 'blank' signal which means that the current pixel is outside of the visible area, and I have the gut feeling it would be better to branch that signal outside of the "pixel processing" process (race conditions?).

I am trying to translate something like this:

-- Horizontal procedure:
h_proc : process(pix_clk)
begin
    if(rising_edge(pix_clk)) then
        -- counts the pixel clocks
        h_cnt <= h_cnt + 1;
        -- updates the blank signal (whether in visible area or not)
        if(h_cnt <= HRES and v_cnt <= VRES) then
            blank <= false;
        -- generates synchronisation signals
        else
            blank <= true;
            if(h_cnt > HRES+HFP and h_cnt < HRES+HFP+HSP) then
                h_sync <= '0';
            else
                h_sync <= '1';
            end if;
        end if;
    end if;
end process;

Into this:

blank <= false when h_cnt <= HRES and v_cnt <= VRES, else false;
-- And while I'm at it
h_sync <= '0' when h_cnt > HRES+HFP and h_cnt < HRES+HFP+HSP, else '1';

But I end up with a syntax error. Isn't there any way of branching test on inequalities such as greater than / less than outside of processes?

Modified code
Inside the architecture:

-- blank is true outside of the visible area (where synchronisation pulses are sent and black is needed)
blank <= false when h_cnt <= HRES and v_cnt <= VRES else true;

-- Address of the pixel (block of memory containing the color of the pixel)
buffer_addr <= std_logic_vector(to_unsigned(h_cnt+v_cnt*HRES, buffer_addr'length))
                   when blank = false else (others => '0');

-- Colors returned correspond to the aimed pixel, but black if out of the visible area
R <= buffer_data(RDEPTH+GDEPTH+BDEPTH-1 downto GDEPTH+BDEPTH) when blank = false else (others => '0');
G <= buffer_data(GDEPTH+BDEPTH-1 downto BDEPTH) when blank = false else (others => '0');
B <= buffer_data(BDEPTH-1 downto 0) when blank = false else (others => '0');

-- Synchronisation pulses
h_sync <= '0' when h_cnt > HRES+HFP and h_cnt < HRES+HFP+HSP else '1';
v_sync <= '0' when v_cnt > VRES+VFP and v_cnt < VRES+VFP+VSP else '1';

-- Counter update procedure:
h_proc : process(pix_clk)
begin
    if(rising_edge(pix_clk)) then
        -- counts the pixel clocks, update the line counts and reset the counters when appropriate
        if(h_cnt = HRES+HFP+HSP+HBP) then
            h_cnt <= 0;
            if(v_cnt = VRES+VFP+VSP+VBP) then
                v_cnt <= 0;
            else
                v_cnt <= v_cnt + 1;
            end if;
        else
            h_cnt <= h_cnt + 1;
        end if;
    end if;
end process;


texts: Simulating triodes in LTSpice, Long tail pair phase splitter

texts:
I am attempting to simulate a long tail pair phase splitter using two 12AX7 triodes in LTSpice.

I tried multiple subcircuit models for the triode, all yielding the same results.
I want to know if the circuit is wrong, or if the simulation is wrong.

The distortion of the signal is intentional, this is from a guitar amp with high distortion.
I want to build this circuit, but as its from the internet and quite expensive, wanted to make sure it works and understand it by simulation.

Here is the relevant part from the schematic:

VC Approaches 250V, but on the transient reaches only about 120, still the problem is obvious.
VA Approaches 310V
VB Approaches 300V
The phase splitter is supposed to drive a 6bq5 / EL84 push-pull pair.

And here is the transient analysis result.

What am I doing wrong either in the simulation or in the circuit?


texts:
I recently made a slayer exciter circuit in order to determine the resonant frequency of my secondary coil of my yet to build SSTC.

When running the slayer exciter at 40V DC the circuit consumes something like 18W of power. I see a small amount of coronal discharge at end of the secondary coil. The oscillation frequency at the base of the transistor is around 550kHz.

When I touched the corona I got shocked, which was unexpected as the skin effect should have come into play at such high frequencies. What is happening here and why am I getting shocked?

Specs:

Secondary: 1600 turns of 32 gauge copper wire wound around a 4 inch PVC pipe
Primary: 3 turns of 16 gauge wire
Transistor used: D4205d NPN fast switching transistor


texts: How the Kv rating relates to power generation with BLDC motors

texts: I am confused about how the Kv rating of a bldc motor affects the 3 phase ac it generates because, the Kv rating is based on the dc voltages that are applied to the motor by its esc. So for example, if i had a 1000 Kv motor and spun it at 1000 rpm would the motor generate 1 volt rms or something else and what would the peak voltage be?


texts:
I would like to drop a 240V DC voltage to a 5V DC voltage. The 5V stage needs less than 5mA in current.

The solutions I looked at are:

Resistor Divider (Not really interesting because of the power to dissipate)
Voltage Regulator (240V to 5V is hard to find, if it actually exists)
Buck Converter (I don't know well enough those parts to use them in a design)
DC-DC Switching (a bit expensive)

Ideally, I would like something not too expensive. It could be something to build by myself.

Personally, I thought about mixing solutions 1 and 2:

dividing the voltage from 240V to 30V with a resistor divider
then regulating the 30V to 5V with a voltage regulator

What are you guys thinking about it? Do you have others solutions? Do you know parts that could help me?

Is the solution really different if the 5V stage draws 50mA instead of 5mA?

DC voltage as high as 240V is dangerous, I use it carefully.


texts: I academically studied on the synthesis of antenna arrays. I am not in a good situation that provides opportunity for experimental studies. For this reason, I work with computer simulations which I design and write their codes. Hereafter I would like to make some experimental studies with antenna arrays. At least, I believe that I can make control units working with reconfigurable chips. But I could not find which microcontrollers, digital phase shifters and digital attenuators are used. I looked for the literature but they don't mention about the component's name. Could you give some real name for this microcontrollers, digital phase shifters and digital attenuators for reconfigurable antenna arrays?


texts:
I'm trying to simulate an L2577-adj circuit in Proteus software but I can't find it in the local library that come with Proteus.
I could, however, find it in component search engine ,
but after downloading the files and importing them with Proteus they show up, but I get no model specified error.
I found out that if I mark the checkbox attach hierarchy module it should work, and that's what happened: the simulation works but the item that I imported does not work at all. What am I doing wrong?


texts:
For a project I need to handle large current, about 1200A.

To do so I intend to distribute the power using busbar.

Copper would be a good option but is fairly expensive and aluminum has almost the same conductive property, but due to the oxide layer is quite difficult to connect and have good contact.

I'm looking for a reliable way to connect aluminum busbar.

One option is to have screws into a bit smaller than usual threaded holes, while screwing it would damage the oxide layer and provide contact, but I'm not sure of the long term effects and if the screw is being replaced.

I also thought of a self etching conductive primer that would keep off the oxide layer, but couldn't find anything of that sort.

Is there any good way to contact aluminum busbar?


texts: Why is my audio amp picking up AM and FM radio stations?

texts:
I built an audio amp out of the LM386 on a previous question. I when I have nothing connected, I picked up FM radio stations, as well as AM Very loud and clear. Why is this happening? Why AM and FM?
How can I prevent this? Although it is very cool that I picked up the stations, I don't want to have any interference.
I live in Evergreen, Colorado (just west of Denver), and I am picking up 105.1 FM as well as 850 KOA AM
Yes I am sure that the one is FM because I heard them say "KOOL 105!!!!"


texts: Arduino lack of accuracy in AD conversion

texts:
let's consider this simple piece of code:

void setup() {
    Serial.begin (9600);
}

void loop() {
    int code = analogRead (A2);
    double voltage = code *5/1024;

    Serial.print("Voltage is  ");
    Serial.println(voltage);
    delay (500);
}

It is simply the A/D conversion of a voltage applied between A2 and GND. Unfortunately I saw that this reading is not so accurate. Precisely, if I use a battery of 3.5V, on the serial monitor I will see the value voltage = 3.00. If I use a battery of 1.5V, I will see 1.00 V.

This means that the program works correctly, but it is not accurate. Which is the reason for this and how can I solve it? I do not understand the reason for this since the resolution of Arduino as ADC is equal to 5/1024 = 4.88 mV, so I think that we may have a quantizazion error of 4.88mV, and not of 0.5V.


texts: Bidirectional level shifter circuit problem

texts:
Ok, so here is my problem:

I am trying to create a small 3.3V to 5V signal level shifter, using a BSS138 transistor.
This is my source for the circuit: a SparkFun circuit.

This is my circuit:

As you can see, I have one bidirectional and one unidirectional line. On the left is the Low Voltage (3.3V) part and the right is the High Voltage (5V) one. When I connect the TX_LV to the Gnd line, the TX_HV turns to 0V. When I connect the TX_HV to Gnd, it does happen on the other side as well.

But the BSS138 transistor seems to act as a 20Kohm resistor when closed (I even measured it with my multimeter - it was about 19.7Kohms). This results in approximately 4.1V on both the LV (Low Voltage) and TX_LV lines (which should be 3.3V) when 5V is applied to the HV input and neither TX_LV and TX_HV are connected to Gnd...

This is quite a problem as I want to connect a Raspberry Pi to an Arduino via Serial port and I don't want to damage my Raspberry Pi by putting 4.1V on its pins. Could anyone please tell me how to fix this or what could I use instead of this solution?