texts:
I am currently working on a prototype connecting a SOC-board (Samsung ARTIK530) to a LVDS LCD display (DT070BTFT-PTS1).

The display shows a very (!) distorted picture.

I have tried fixing it using software configuration in the Linux driver with no result. The SOC comes with a predefined LCD configuration which exactly matches the timings of my LCD, so I am rather confident that the software side is ok.

The prototype connects the LVDS output of the SOC and the LCD-display using free-floating enameled copper wire.

My questions:

Can a LVDS generally produce a "rather" correct image using this kind of wiring? Or is a LVDS twisted-pair connection mandatory?
I have tried to visualize the LVDS signals using an oscilloscope, with no success.
How can LVDS signals be best measured using an oscilloscope?

UPDATE:
I narrowed it down to a hardware/soldering issue.
As it showed, the LCD is able to display a correct image even with the free-floating LVDS wiring.


texts:
I want to use AD8055 as a high frequency Voltage Feedback Op-Amp. in its datasheet  , on page 1 the pinout shows a V- and a V+ (as expected in many Op-Amps). but in page 5 , the absolute maximum rating table shows that maximum power supply is +13.2v (only positive voltage). In almost all Op-Amp datasheets that I have seen, this is marked as +/-V.

My question is: If I want to use 12v supply, should I connect a -12v to V- pin or it (pin 4) should be simply grounded?


texts:
I'll preface by saying I'm aware of questions like these 1, 2, and 3, but none of them answer my specific question.
All of these questions say that the kickback from an inductor can be given by:
\$V=L\frac{dI}{dt}\$
However, I've seen other sources say things along the lines of "the inductor tries to keep the current flowing through it the same as it was before switching". The exact quote from the above source is:

this component now leaps into action and does everything in its power to maintain the status quo (keep the current flow going just as it was).

To me, keeping the current flowing exactly as it was means the current is the same. As in, if the steady state (i.e. after several time constants) current through the inductor was 1 A, then the inductor would try its hardest to keep the current at 1 A (at least at the instant after the switch switches). The inductor therefore acts as an instantaneous current source. If you had a resistive load connected in parallel with the inductor, the voltage over it would be \$V=IR\$ where \$I=1\text{ A}\$. This voltage will begin to drop though as the current is only 1 A for an instant.
To aid in understanding, I've drawn a circuit below. In this case, I would expect the voltage over the inductor/resistor after switching the current source off to be \$V = IR = 100 \text{ V}\$.

simulate this circuit – Schematic created using CircuitLab
But, as far as I'm aware, \$L\frac{dI}{dt} \neq IR\$. Since everyone says that \$V=L\frac{dI}{dt}\$, I'm inclined to think that it is correct, but I'm struggling to understand why \$V=IR\$ is wrong on this occasion. Surely the parallel resistance must come into play, otherwise flyback diodes would do nothing (as they would count as low resistance, therefore low kickback).


texts: Driving MOSFET with 26kHz PWM from NE555, MOSFET not opening completly

texts:
First sorry for my english. The problem is it looks like MOSFET is not opening completely, and I do not have any equipment except crappy 5$ multimeter. I measured 3 points on the PCB, they are marked on the schematic. What confuse me, is that when I remove motor from circuit, and leave drain not connected to anything, I get 12V betwen VCC and drain, but when I connect the motor, voltage drops. If spinning, the motor consumes ~120mA, also the motor is not rated for 12V, but it's just a test, and I doesn't care. For PWM generating I'm using NE555, and for driving MOSFET BC327, and BC337. I wanted to make a high voltage generator, but for tests, I'm using small DC motor salvaged from RC car.

photos of PCB: http://imgur.com/a/9SDqT (I don't have 10rep, so I can only add 2 links)


texts:
I'm following up on an earlier question I asked concerning a stepper motor failing on a custom made "H" type plotter (Stepper motor failing. Electrical interference?). I now have 18 AWG shielded cable and am about to rewire my machine but I have a couple of very basic questions.

I have two stepper motors driving the Y axis (and it is the far motor on this axis which has been performing erratically). Does it make any difference if I wire the motors as "A" in the diagram below or as "B" with separate leads from the driver? (typo in the diagram: supposed to read "split at rig")
The 18 AWG cable I have has an inner foil wrap plus a bare wire in addition to the four connections. Is it advisable to tie this bare wire to ground at one end of each cable coming from the stepper driver?


texts: Why does SPI flash has HOLD# pin, as opposed to stopping the clock?

texts:
A SPI flash like Micron M25P16 (shown below) has a HOLD# pin, and any input data is ignored if HOLD# is asserted at a rising clock edge.

But can't the clock just be stopped instead ?


texts:
let's consider the so called dielectric slab waveguide (references for image and equations: here, page 53):

I do not know much about it, I know only that it is a planar guiding structure which is used in optics. It is made of two or more dielectrics, in these case there are two layers of different dielectrics, and then a layer of air with infinite height.

I have some questions about this kind of structure:

1) As you may see, the structure is semi-infinite along y axis. But what about the other axis? Is this structure, ideally, infinite along x and z, or are there some "walls"? It is important for me to know this because it determines different boundary conditions for EM field.

2) Now let's consider the following equations which describe the electric field inside each region:

You may see that all the fields depend on z and on y, but not on x. Can you explain me the reason of this?


texts: How the relationship between input and output is derived in a comparator?

texts:
In the slide 6 of the page about propagation delay of a comparator, the time relationship between input and output is as below. However, I am not sure how the function between input and output voltage is derived.
Thank you.


texts: How to offset program location in memory with MPLABX XC8?

texts:
I have a bootloader residing at locations 0x0000 to 0x0fff on an 8-bit PIC18F. How do I tell the XC8 compiler to output a hex file which starts at 0x1000?

With a CCS compiler my friend is using, he's using the following code:

#define LOADER_SIZE                 (0xFFF)
#define LOADER_START                (0)
#define LOADER_END                  (LOADER_SIZE)
#define APPLICATION_START           (LOADER_SIZE+1)
#define APPLICATION_END             (getenv("PROGRAM_MEMORY")-1)
#define APPLICATION_ISR             (APPLICATION_START+8)

#ifdef _BOOTLOADER
    //in the application, this moves the reset and isr vector out of the bootload
    //space.  it then reserves the loader space from being used by the application.
    #build(reset=APPLICATION_START, interrupt=APPLICATION_ISR)
    #org 0, LOADER_END {}
#endif

Digging around the Microchip Libraries for Applications (MLA), I found this for the C18 compiler, however the XC8 compiler does not recognise "#pragma code".

#define REMAPPED_RESET_VECTOR_ADDRESS               0x1000
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS  0x1008
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS   0x1018

extern void _startup (void);        // See c018i.c in your C18 compiler dir
#pragma code REMAPPED_RESET_VECTOR = REMAPPED_RESET_VECTOR_ADDRESS
void _reset (void) {
    _asm goto _startup _endasm
}
#pragma code REMAPPED_HIGH_INTERRUPT_VECTOR = REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS
void Remapped_High_ISR (void) {
     _asm goto YourHighPriorityISRCode _endasm
}
#pragma code REMAPPED_LOW_INTERRUPT_VECTOR = REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS
void Remapped_Low_ISR (void) {
     _asm goto YourLowPriorityISRCode _endasm
}
#pragma code HIGH_INTERRUPT_VECTOR = 0x08
void High_ISR (void) {
     _asm goto REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS _endasm
}
#pragma code LOW_INTERRUPT_VECTOR = 0x18
void Low_ISR (void) {
     _asm goto REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS _endasm
}


texts: How does this MOSFET soft distortion circuit work?

texts:
I have made this simple circuit in LTSpice. I was trying to make a soft distortion circuit for an audio effect, it seems to work very well, but I don't know why.

It only works when the P-MOSFET has the drain and source the other way round from normal use. Maybe the internal diodes have something to do with the distortion.

Am I using the MOSFETs outside of their normal range?

Is it likely to give similar results with real components, without frying them?


texts: Why 60% overshoot with 55° phase margin?

texts:
UPDATE: Based on the answers I received, I got this working beautifully. There's a full outcome report in one of the answers below.

I'm working through the design of an electronic load, basically a power MOSFET driven by an op amp.

I simulated the loop gain frequency response like this:

Producing a frequency response plot like this:

The 0dB frequency is 470kHz, with a phase margin of 55° and a gain margin of about 11dB.

All very satisfactory so far, but when I switch to step response like this:

I get an output waveform with 60% overshoot on both the rise and fall:

What's up with that? I thought phase margin and overshoot were directly related. and expected something with a very small amount of overshoot, or perhaps none at all.

Preliminary tests on the bench confirm the simulation. There is no oscillation, but step response shows a large overshoot. I have to do some mechanical and desoldering to get the signal generator input in there cleanly for a proper test.

I have a couple of hypotheses, but not enough experience yet to know which path is most profitable to pursue, or if the solution even lies in this list:

Hypothesis 1. The method I'm using to plot the loop gain frequency response is not applicable to this circuit for some reason or I've gotten it wrong somehow. I learned this approach from this Linear Technologies LTspice video: http://www.linear.com/solutions/4449

Hypothesis 2. Step response is not always directly tied to loop gain frequency response, and one of the capacitors or something is causing the step response to be strange even though the feedback loop is stable.

Can you help me understand where I've gone wrong?


texts: Failed to connect to esp32: timed out waiting for packet header when flashing

texts:
I have using an esp32 wrover b chip, an esp32 adapter, and a USB-serial converter. I am trying to flash micropython onto the esp32 via the usb-serial connector, but have encountered a few connection problems. My set up is as shown below:
Upon running esptool --chip esp32 --port COM3 erase_flash I am given the output Connecting......._______…………______……………____ followed by A fatal error occurred: failed to connect to esp32: timed out waiting for packet header
I have all the drivers for my USB-Serial converter installed.

Does anyone know how to fix this error and flash the esp32?


texts: using a sim module for sending more than 1kbytes throught htpps

texts:
I'm going to use that module for internet connection and to send data to a server.
https://www.waveshare.com/wiki/SIM7020E_NB-IoT_HAT
My question is I know that TCP stack only supports max of 1200 bytes to be sent to the server.
How do you guys over come that limitation.

The problem is I'm sending a JSON which is more than 1KByte and The server expects a Full Json without chunked ones.


texts:
I have here an FOC controller with encoder and a 2200kv, 40A, 324W motor. I can run the motor just fine and I limited the current to 4A and the motor spins up to around 1400rmp. When I now increase the current limit, I would expect the motor to turn faster, since it allows higher voltage across the phases, but this seems not to work at all and the motor turns maybe around 1450rmp at 10A, where also the PWM on timings are changed only a small amount. I run the motor not in the speed control mode, just in the current control mode, which will spin the motor to the maximum possible rmp.

What could cause the problem here? Is it possible, that the FOC with encoder somehow goes into saturation?

Edit: Here is a plot of (Iq,Id,Vq,Vd) for this motor, with a reference quadrature current Iq=-3A, where I first let the motor run full speed, then I slowly put a load on it with my hand until stall. Is it possible, that if |Vq|<|Vd|, the motor cannot accelerate anymore? Since this is the case here, when the motor holds the speed.

Edit 2 I made now some new measurements, where also the speed is included and the phase currents. Iq_ref is set to 2A and I hold the motor and release it with my hands. I really don't know what really does limit my speed here. Id grows, when the motor reaches the current limit Iq_lim of 2A. The plotter is not the fastest, so that the phase currents could only be truly depicted at very low speeds.


texts: What is the second resistor for in this potentiometer reference circuit?

texts: In the reference circuit from this datasheet for a potentiometer, what is RL for?  Why did they pick 100 x R?  Bonus question, how do I pick a good value for C?


texts: I have stm32f407vet and one joystick and need to read x and y values through same adc channel

texts:
I want to use only one channel adc1 and they have different modes in0,in1,in2,in3,.....I want to read X and Y values from PA0 and PA1 respectively using only adc1 and to store them in different variables.
So when I do pollforconversion each time it returns only X value and Y is the same as X.

my code

HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1, 10);
X = HAL_ADC_GetValue(&hadc1);
HAL_ADC_PollForConversion(&hadc1, 10);
Y = HAL_ADC_GetValue(&hadc1);

What should i do ??


texts: I have been trying to solve this basic FPGA problem with multiplexers, but I cannot garner the meaning of the notation 0/1. Can someone throw some light in this regard? What do notations like 0/1 mean? Is it that the input can be either 0 or 1?


texts:
I have been having some trouble designing a long-tailed pair transistor amplifier.
Vdd2 is 5V and the 6.8k ohm resistors were already given. I am trying to get a bias voltage of 0.8V at the transistor Q3, and the maximum voltage through the emitter of the transistor should be 1mA.
The first thing I did was to select values for Rb1 and Rb2, to set the base voltage for Q1 and Q2. The base voltage I am getting is around 1V. I am getting my calculated result from the LTspice simulation as well.
The emitter voltage of Q1 and Q2 must be 0.6V less than the base voltage. However I am getting 0.946V for the emitter voltage of Q1 and Q2, 0.09V at Vbias and 0v at the emitter of Q3.
How should I change my resistor values for Rc1, Rc2 and Re in order to get Vbias around 0.8V?


texts:
I'm working on a Raspberry Pi Project and I want to integrate the Pi on a PCB. The Pi has a Dual Stack Female USB connector (Link for reference below). Now I need a similar Male Dual USB connector. I tried searching on the internet for such a connector but couldn't find. All I found was single Male USB connector(Image for reference below).
Using two usb cables could be a solution but I would like to avoid cables. Please help me find a part or give any solution to my problem. Thanks guys!

USB Female Dual
http://antenk01.en.made-in-china.com/offer/gqiJeowbXApl/Sell-USB-A-Female-Dual-Port.html

USB Male Single
https://www.sparkfun.com/products/437


texts:
I have faced this problem many times that I connects Relay with pic microcontroller and whenever I put Load on Relay's Contacts PIC16f877a resets. I some time solve this problem by triggering another relay from basic relay attached to PIC. But this is not a solution. Can any one describes Why pic is affected with this relay spark. And what is really happening which causes pic to reset. Following things I have kept in mind while building circuit

I have 1K Pullup resistor on pin 1 (Reset pin) of Pic 16f877a
Fuses are, Power up timer = enable, Brown out detect = enable, LVP= disable, CP=enable
Power supply is filtered, ceramic capacitor of value .1uf connect across both ends of regulator
Crystal is 4MHz, and 33pf capacitor across crystal are close to (Circuit works fine, problem of reset occurs only when relay turns on with Load connected)
Relay is used of 12v/5amp ratings
C945 NPN Transistor is used to drive the relay
Reverse biase 1N4148 diode is connected across relay coil to save reverse leakeage

I never faces such problem in Atmel 89c51 microcontroller with same relay interfacing circuit. It is PIC who goes reset every time. But if do not connect any load to relay the circuit works fine. No reset occurs.
Can any-one describes what is the issue with PIC?

Here is schematic, Crystal is attached as mentioned above


texts:
I have been searching like a maniac for as much info as possible before placing question here, obviously i failed...

The question is about voltage divider, i have an external source that gives me either 12-13V or 10-11V, now looking at voltage divider, if one would be implemented for this signal cable i should be getting out between 2-4V (max that i need is 5V so im gonna try stay below 5 for safety).

Looking at this picture, i saw somewhere if

Vin = 12V
R1 = 100K
R2 = 10K

then i should get Vout at somewhere "around" 5V... now i tried that theory in practice, my supply is dynamic so i can change the Vin to 10, 12 or 15V or what ever, but the voltage never decreased more than 1-2V.

I also tried to chain up with more resistors, like multiple 1M, also with multiple 100K and 47K but the voltage never decreased and pleasurable amount to hook it into Arduino digital pins.

I have a hobby project that i want to finish up before saturday but this "issue" drives me crazy as im not even close to 5V.

Also worth to mention i was suggested to use a comparator (couldnt tho find any comparator that had pull-down output in my local store) but then later on some said a comparator would be "overkill" for my tiny project since i only need to compare this either 10V or 12V in arduino, where divider would be more suitable.


texts: Calculating the resistor for a 12V pushbutton

texts:
Please note: Although this question tangentially involves a Raspberry Pi, this is really more just a pure electronics question at heart.

I'm trying to connect my Raspberry Pi 1 Model A to this pushbutton. I believe my pushbutton will be wired to the voltage source (PWR) which is a 5V pin on the Raspberry Pi (hereafter RPi) as well as to a 3.3V input pin ("GPIO pin"). When you push the button, it's contacts touch and connect the circuit/path between the RPi's PWR pin and an input GPIO pin...I think that's how its supposed to work.

I've also seen wiring diagrams of this in action, and believe I need to put a resistor in between the pushbutton and the input GPIO pin. If this is incorrect, or if the resistor needs to be placed somewhere else, please begin by correcting me!

My question is: how do I calculate the required ohms of the resistor? This particular pushbutton is rated at 12VDC at 500mA.


texts: Diode (Iterative analysis) with exponential model

texts:
Question: Design the circuit in this Figure to provide an output voltage of 2.4 V. Assume that the diodes
available have 0.7-V drop at 1 mA.

My approach:
At first we assume that V0 is 0.7*3 = 2.1V .
Current across the circuit , I = (10-2.1)/R mA (R is in Kilo-Ohms)
V2 = voltage across diode when current is I2
V1 = voltage across diode when current is I1
V2 - V1 = 2.3*n*VT*log(I2/I1)
Here , V2 = 0.8V
V1 = 0.7V
I2 = 7.9/R mA
I1 = 1 mA
VT = 25 mV
n = 1
So , I get R = 139 Ohms
I am confused with my approach in selecting V2 & V1 . I have just made an average for 3 diodes while working with 2.4V and 2.1V which are 0.8V and 0.7V respectively.


texts: I am building an induction heater and connected everything up. Once I connected the circuit the first time I tripped the breaker. The main breaker was only a 20Amp coming from the wall. I realized I needed a bigger breaker running off 120 so Switched to a larger breaker that wouldn't trip from the mains. I connected it up and the circuit arced and blew my mosfet. I then tried re wiring in case i messed something up. Note I also used a different mosfet because I didnt have the an extra in the circuit listed. Once I started it it arced again. Is something wrong with the circuit or is it how I am wiring it up? been doing some research and maybe I am not using high enough gauged wire to pull current. I am at a loss on what to do now. Any help would be appreciated.


texts: On average what length power loss will trigger a microprocessor to reset?

texts: Given a recently manufactured microprocessor operating at 3.3v from such standard manufacturers such as Intel, AMD, Samsung, Qualcomm, Broadcom, etc, how long would a loss of power need to be before the chip is guaranteed to reset? A nanosecond, a picosecond, a femtosecond? Something else?


texts: THINNET 10BASE2 Network using RG-58 Coaxial Cable operating frequecy?

texts:
I am trying to figure out what the signal frequency of a 10BASE2 network is. Specifically the frequency of the signal being carried over coaxial cable. Data transfer is 10Mbps and the network adapters conforms to IEEE Standard 802.3-2012 for 10Base-2 networks. From reading the standard I would assume that the operating frequency is 10MHz but I know it's probably not that simple and there isn't a 1-1 corresponence between bits per second and frequency of the analog signal being carried over the cable and I don't have an o-scope.

Can any one with experience in coax networks comment on this?


texts:
I would like to use the pin mux in the SAMD21 mcu, to set different pins for the USB peripheral. The datasheet makes it sound like it is possible, but is very confusing.

datasheet : https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Atmel-42181-SAM-D21_Datasheet.pdf


texts: Input and output oapacitor for PoE + DCDC controller

texts:
I am trying to design a PoE solution using MP8007. It has an integrated PD interface and isolated/non-isolated DC-DC Converter.

The DC-DC converter uses fixed peak current and variable frequency Discontinuous Conduction Mode (DCM) to regulate constant output voltage.

I am using it in Buck mode and following the reference circuit given in the datasheet.

The datasheet has input capacitors (C1A and C1B) (47uF and 2.2uF) of voltage rating 100V. These input capacitors are very expensive and large. However, on page 23, the vendor has given a formula to calculate Input Capacitors. For my application, Ilim = 2.68 A, L = 22uH, Vin (min) = 37V and Vinp_p = 0.3V (This is what I have assumed). By using these values, I have calculated the required Input capacitors to be 10uF.

However, the reference design has used much higher input capacitor. I am confused over using calculated capacitor (with some margin) or reference design capacitor values.

The recommended minimum output capacitor is 44 µF and much higher output capacitors are being used in the reference design.

The datasheet says:

  Normally, a 44μF or higher ceramic capacitor is recommended as the output capacitor. This allows a small Vo ripple and stable operation.

I am planning to use two 44 µF capacitors (25V). But the values in the reference design are troubling me. Please advise.


texts: Different sampling rates for half and full channels on oscilloscope? How is it done?

texts:
In the documentation for the Keysight DSOX1204G, it has the interesting note for the sampling rate of:

2 GSa/s (half channels)
1 GSa/s (all channels)

So, if I use all 4 channels on the scope, I get GSa/s, and if I use only two channels I get 2 GSa/s.  I would assume at the core of the scope there's some low resolution ADC with a convert line that is tied to a 1GHz signal.  For the 2 GSa/s are they just tying two ADCs together at the inputs but putting the convert lines 180 degrees out of phase, or is it something more interesting?


texts: Lets say we have a typical automotive alternator (as shown in the picture) and we are measuring voltage between red and blue dot. How do we calculate voltage between green and red dot?


texts:
I am trying to understand a bit how the IO pin works. I took as an example this PIC.
The image of the IO pins are like this :

What does the symbol in yellow mean? Does it mean that the Q takes the value of D only on falling clock edge?

I think I understand how the red connection work. if D=1, than after D is transferred to Q, we will have Q=1 so Q'=0 (Q' is Q-bar, it is more easy to wright). So on the push-pull, the gate of the P-MOS is 0 and the gate of N-MOS is 0 so we have VDD on the I/O pin.
If D=0, Q=0 so Q'=1 and the gate of the P-MOS and N-MOS are 1 so the have VSS on the I/O pin.
I also understood more or less how the lower part (for input) works.
But there are many things I don't understand :

What is the purpous of the blue connections?

What exactly is the data bus? I thought the data were written in the LATA register and red in the PORTA register.

How exactly do the D-latches put the correct values on the I/O port?


texts: Calculating number of errors that is undetected by a CRC using a particular polynomial

texts:
My goal is to determine optimal generator polynomial and size of the Frame Check Sequence (CRC field) for protocol that I am developing. Reading the paper, "Cyclic Redundacy Code (CRC) Polynomial Selection For Embedded Networks" by Koopman and Chakravarty, provided me with a solid understanding of the topic and proved to be a valuable resource.

Especially interesting for me is Table 1. (provided below), "Example Hamming weights for data word size 48 bits".  My question is how to come up with this table on my own? That is, how to calculate number of undetectable errors, provided generator polynomial and data word size? I am not sure if this number is also dependent on bit error ratio (BER).

Namely, I want to write script to calculate these, as data provided by authors of the paper do not cover polynomials and data lengths that I have at hand.

Any reference to the material where I could get necessary knowledge to come up with an algorithm is welcome (preferably without entering into field theory).


texts:
I have just started developing a tiny GPS trackingdevice that (eventually) will be able to log positioning-data on demand -  via SMS commands and/or via a smartphone-application.
The device should be able to store the last known location when turned off (i.e with internal memory). It should be a battery-driven device with re-charging functionallity.
The GPS logger is going to be very small, so the size of PCB and IC´ chips has to be small as well.

I am not very familiar with microcontrollers so I need some guidance in what controller to choose for my project. As you can understand - Size matters!

I have no idea on:
-how many bits I need.
-how much storing space I will need

The microcontroller must have the following features:

-Easy-to-program ( I am no super-guru-programmer. But I have been through some C / Java / Atmel programming )

-Secure

-Firmware-upgradeable (Hopefully USB compatible, but I can live with RS232… )

-Good hibernate/sleep functionallity when tracking isn´t activated.

-Low energy-consumtion

-Small

How do I determine what microcontroller is the right one for my project?


texts: Having an issue of implementing an 8 bit counter from two 4 bit counters

texts:
So I'm having an issue of implementing an 8 bit counter from two 4 bit counters. The first 4 bit works when initiated by the clock pulse and so does the second separately with its own clock pulse. How could I use just one clock to send pulses to have the counter count from 00000000 to 11111111 without having to use two clocks to do so? I'm planning to make a 12 bit and 16 bit the same way and since I plan to make devices out of these to use for a bigger project it'd make sense to understand how to make an 8 bit first.

Key information : I3 is the most significant bit, I0 is the least significant.
Cout is the probe connected to the d flip flop in each 'circuit'.


texts: Arduino driving mosfets powered by a single source

texts: I am attempting to test discharge of a large battery pack. I am trying to set up an arduino that controls the discharge by using a bank of 75W bulbs. I have set up my system like shown in the picture. The issue is that the second I turned on the mosfets with the Arduino the first mosfet blew fairly quickly. In my mind this set up should work, but its oviously not...what am I doing wrong? I'm using some spare FQPF20N60 mosfets I had. From what I can tell the Vgs(th) on this mosfet is 5V and is well under the Vgs which is 10V.


texts: 0 definitions of operator "*" match here for signed type (numeric_std, VHDL)

texts:
I'm writing a package to add supporting functions and types for creating an FIR filter. In the mult function, I'm trying to multiply two signed types, which should be supported in IEEE.numeric_std library. The error I'm getting (using Libero IDE) is:

0 definitions of operator "*" match here

Here's the code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;

package fir_pkg is
    constant taps : integer := 8;
    constant bit_width : integer := 8;
    type fract is array(bit_width-1 downto 0) of std_logic;
    type fract2 is array((2*bit_width)-1 downto 0) of std_logic;
    type fract_sequence is array(taps-1 downto 0) of fract;
    type fract2_sequence is array(taps-1 downto 0) of fract2;
    function mult(a,b: fract_sequence) return fract2_sequence;
end package fir_pkg;

package body fir_pkg is

    function mult(a,b: fract_sequence) return fract2_sequence is
        variable a_s, b_s:signed(bit_width-1 downto 0);
        variable seq: fract2_sequence;
    begin
        for i in a'range loop
            a_s := signed(a(i));
            b_s := signed(b(i));
            seq(i) := a_s * b_s;
        end loop;
        return seq;
    end mult;

end fir_pkg;


texts: How to fit RF, power, analog components all together tightly on PCB?

texts:
Whenever I go through datasheets of boost ICs, MCUs, RF power amplifiers, filters, they have recommended designs for best performance.
For example, where decoupling capacitors should be placed or how X track should be as far as possible from Y domain components.
But when I see teardowns of big tech company products, I see tightly packed passive components right next to each other holding hands.
How is that possible? What am I missing? What do those engineers do to put components so close to each other as shown in image below Galaxy watch teardown and still get the best performance out of them?

EDIT: What are these dashed lines marked by red arrow? seems like separation of analog and digital domain. But how are they achieved in inner layers?


texts: Derivatives in time and phasor domains do not match

texts:
Given that voltage can be represented in the time domain as the following:

$$V(t) = \vec{\mathbf{|V|}}\cos{(\omega t + \phi_V)}$$

It can be shown that in the phasor domain, this is the equivalent expression for V(t):

$$V(t) = \frac{1}{2}\vec{\mathbf{V}}e^{j\omega t} + \frac{1}{2}\vec{\mathbf{V^*}}e^{-j\omega t}$$

The time derivative in the first case is:

$$V'(t) = \vec{\mathbf{|V|}}(-w)\sin{(\omega t + \phi_V)}$$

My solution for the time derivative in the second case is:

$$V'(t) = \frac{1}{2}\vec{\mathbf{V}}(j \omega)e^{j\omega t} + \frac{1}{2}\vec{\mathbf{V^*}}(-j \omega)e^{-j\omega t}$$

$$V'(t) = (jw)(\frac{1}{2}\vec{\mathbf{V}}e^{j\omega t} - \frac{1}{2}\vec{\mathbf{V^*}}e^{-j\omega t})$$

Subtraction of the complex conjugates yields 2 times the imaginary part:

$$V'(t) = (jw)(2*Im{\frac{1}{2}\vec{\mathbf{V}}e^{j\omega t}})$$

$$V'(t) = \vec{\mathbf{|V|}}(jw)\sin{(\omega t + \phi_V)}$$

It appears that the derivatives vary by a factor of j.
What is happening here?


texts:
I have a circuit that can use a 9V battery for power, but also want to alternatively connect to a power supply (usually higher that 9V) without taking out the battery.

Is it OK to just connect the power supply parallel with the battery? Or add a diode between the power supply and battery?
Will it still use the battery power even it is always connect to power supply?

I have an idea that to add a JFET between the battery and the circuit, and connect the gate to power supply. So that when there is power supply, it with cut off the battery. Is it necessary?

Given that the power supply can be a few volt higher than the battery, such as 12V. The circuit has used zener diode to regulate voltage, so the supply voltage is not a problem.


texts: Estimate temperature for silicon (p-n junction)

texts:
I need to estimate the temperature at which p-n junction made of silicon lose it rectifying characteristics. (\$N_A=N_D=10^{15}\,cm^{-3}\$)

\$E_G\$ is independent of the temperature and are 1.12 eV for Si. Intrinsic carrier concentration at room temperature (T=300 K) is \$n_i^{Si}=10^{10}\,cm^{-3}\$.

I try to solve this problem with this argument: p-n junction stops working when concentrations of electrons and holes equalize.

It happens when \$N_D(N_A)\approx n_i=\sqrt{N_c N_v}exp(-E_g/2KT)\approx T^{3/2}exp(-E_g/2KT)\$. The maximum temperature is \$T_{Si}\approx 650 K\$ (result).

I tried to replace the values in this previous formula to see if I get the Nd value but I did not get this value, or anything of the same order of magnitude:

\$ T^{3/2}exp(-E_g/2KT)=650^{3/2}exp(-1.1/(2\times 8,617\times 10^{-5}\times 650))\approx 0,901 \neq N_D\$

What is escaping me in reasoning?


texts:
For a 1.4 GHz radio telescope project I'm working on, I need to know the power level of noise an outdoor dipole antenna will be outputting in order to determine the amount of amplification needed. Most probably I'll end up using a variable gain amplifier to fine-tune the amplification but it would certainly help to have a ballpark estimate.

I guess this is something most RF engineers will have to consider, but I couldn't find any concrete information on it.
To my knowledge the noise is partly internally generated and partly picked up from ambient/sun/astronomical RF noise.

Is there any rule of thumb for estimating the noise temperature of an antenna?
What factors does it depend on (i.e. physical antenna temperature, antenna type, frequency, etc.)?


texts: Circuit that acts like a NO DPST relay, but only allows switching back to closed when a reset button is pushed

texts: I have a water pump in my van that is activated by a DPST relay when a water level switch in a water container closes. When I drive the van, the water in the tank will slosh around causing the water level to turn on and off the relay constantly. Being annoying and possibly damaging, I’d like a mechanism that will turn off power altogether to the water pump as soon as the water level sensor closes until a reset button is pushed.


texts: How to show field strength varies as 1/r

texts:
This is a question, from a radio amateur, that should have a straightforward answer: but I cannot find one on the Web.

Is there a robust but simple explanation, not needing advanced maths, as to why the field strength in the far field falls off as \$1/r\$ and not \$1/r^2\$ ?


texts:
I have an RPi and a freescale FRDM-KL25z controller which will talk over serial protocol. I'm using the pyserial library on the pi:

import serial
ser = serial.Serial('/dev/ttyAMA0', 9600)
ser.write('hi FRDM')

and using the serial protocol from the mbed library will generate interrupts to process the data from the Pi.

https://developer.mbed.org/users/mbed_official/code/mbed/docs/4fc01daae5a5/classmbed_1_1SerialBase.html#ae67fb9b5a2ee2f4e98a39cdab10ed090

My question is, having two devices which talk over the same protocol at the same potential and in close proximity, do I need a logic level converter or some form of UART chip?

I would think not, but I am aware that RS232 is a +-12V protocol so would just like to ensure that this assumption is correct.


texts:
Can you please tell me the difference between DMOSFET and VMOSFET?
 Or can suggest any good ebook regarding power MOSFET?


texts: PWM bahaving OPPOSITELY as expected on dsPIC33EP256MC506

texts:
The PWM module on my dsPIC33EP256MC506 is behaving opposite as it should. When I set the duty cycle equal to the PWM period i.e. 100%, the duty cycle is treated as 0%. Now I have checked it against the Microchip datasheet definition of the duty cycle which states that The duty cycle determines the period of time the PWM output should remain in the active state (ref doc: DS70645C page 14.73). I am also setting both the PWMxH and PWMxL signals to active high in the IOCONx register. I have observed the same behavior both on the MPLAB X simulator (attached snaps) and hardware LEDs (MCLV-2 demo board). On hardware, the LED driven by the master duty cycle PWMx stays off under a 100% duty cycle. Here's how I am configuring my PWM module.

/* PWM initialization */
    TRISB = 0x01FF;     //Set PWM as outputs
    PWMCON1 = 0x0100;       // use master duty cycle MDC
    PWMCON2 = 0x0100;       // use master duty cycle MDC
    PWMCON3 = 0x0100;       // use master duty cycle MDC
    IOCON1 = 0xC300;        // initialize with override low
    IOCON2 = 0xC300;        // initialize with override low
    IOCON3 = 0xC300;        // initialize with override low
    FCLCON1 = 0x03;         // fault 4
    FCLCON2 = 0x03;         // fault 4
    FCLCON3 = 0x03;         // fault 4
    PTPER = 999;         // 999 Tosc ticks
    MDC = 999;           // Initialize Global Duty Cycles @ 499 (50% duty cycle)
    PTCON2 = 0x00;          // 1:1 PWM clock prescaler
    PTCON = 0x8000;         // Enable PWM peripheral

I'm passing the following table values to the IOCONx<9:6> for driving the PWMxH in override high, and the PWMxL with the master duty cycle MDC.

unsigned int StateTableFwd1[] = {12U, 8U, 14U, 12U, 12U, 8U, 14U, 12U}; // PWM1H and PWM1L states
unsigned int StateTableFwd2[] = {12U, 12U, 8U, 8U, 14U, 14U, 12U, 12U}; // PWM2H and PWM2L states
unsigned int StateTableFwd3[] = {12U, 14U, 12U, 14U, 8U, 12U, 8U, 12U}; // PWM3H and PWM3L states

Is it how it should behave, or something really IS wrong here? Baffled and confused. Any help will be much appreciated. Thanks!


texts:
I'm designing a battery-powered circuit in which a power MOSFET, controlled by an ATtiny85 MCU, switches a resistive load (very, very low frequency). The battery is Li-Ion, fully charged at 4.2V. Maximum load current is about 16A. Board real estate is really limited, so I'm trying to keep the component count to a minimum. I need overcurrent, overdischarge and reverse polarity protection. I handle the first two directly in the MCU (with calibrated internal reference) to reduce board size: overcurrent is sensed over differential ADC from a shunt resistor, and overdischarge is measured by reading the internal reference and back-calculating the supply voltage. This is the relevant part of the schematic (GATE/SCK is the MCU output, the resistive load is between +V and LOAD_GND):

The problem arises with reverse polarity protection. I need to deliver as much voltage as possible to the load, dropping at most 50mV (I chose a PSMN0R9-25YLC MOSFET, which has 1mOhm Rds, i.e. 16mV @ 16A). Of course, even a series Schottky diode drops too much, plus it has to stand the load current (= bigger, and board size is important). I'd usually do this with another MOSFET to break the power line based on polarity. But in this board adding another MOSFET is a problem, due to its size.

On the other hand I can stand the drop of a Schottky diode on the MCU supply, since it'll run down to 1.8V at the clock I set it to and the overdischarge protection will keep the battery from going under 2.7V or so. I thought about protecting the MCU with a diode and leaving the MOSFET unprotected, since it can stand -20V. The problem with this is that, once the polarity is reversed, no damage will occur but the load will always be powered through the MOSFET body diode.

So here comes the question: does somebody know of a creative solution to protect this circuit that drops at most 50mV @ 16A and uses very little board space? To clarify on how much space is available, I can probably get another PSMN0R9 in there, but it would be really crammed and I'd prefer a smaller solution. Cost is not too much of an issue.

UPDATE: a few things that may not be clear and to which I replied in the comments:

There is no charger involved. The battery is a user-removable 18500 or 26650. The user will charge it with an external separate charger.
The circuit is already 3mOhm, but I can drop the shunt (R1) to 1mOhm by sacrificing some accuracy in the overcurrent protection.
The load is purely resistive. Reverse polarity protection is needed in case the user wrongly inserts the battery (since the battery form factor makes this possible).


texts: Open and Close Circuit automatically (Automate Push Button)

texts:
I have a simple circuit board with a push button on it. I just want to automate the pressing action every 0.2 sec or so. The push button has two terminals underneath and I understand that I should connect both terminals in order to close the circuit and simulate the pressing action.

Having this in mind, how can I automate this action every 0.2 sec or so? I guess that I should use a "Timer Relay Delay" like this: DC 6V~30V Multifunction Trigger Delay Time Module Switch Control Relay Cycle Timer Digit LED Display Micro USB 5V

However, I don't know where I should connect both terminals of the push button.

Can anyone give me some advice?


texts:
I am working on a project where we are using 28 - 30 AWG wire with the Molex picoblade and Molex picolock connectors. Does anybody have any recommendations for strain relief for wires and connectors that are very tiny? The wires themselves should not expect any strain, but the device itself will be moving, and I'm worried about possible reliability issues if the wires are flexed near the connector.

I've already popped out a bunch of wires just connecting and disconnecting the connectors. (During actual use, the connectors should never need to be disconnected).

Thanks.


texts: Effect of BJT common emitter amplifier resistor(Rc,Re) ratios? How to select it?

texts:
Above is a part of a BJT common emitter amplifier with 15V Vcc(all caps ignored for DC). I was following a tutorial which explains how to setup parameters step by step. When explaining the DC biasing section, the tutorial first sets up values for Q point Vce i.e VceQ, Rc and Re.

For a maximum Vout swing, we should choose VceQ as Vcc/2. This can be seen by a DC load-line. I think it is because the maximum change in Vce will logically yield a maximum swing in Vout. At Q point we can then take VceQ = 7.5V. So far so good..

Then the tutorial chooses the ratio of Rc/Re as 3 i.e Rc = 3*Re. And then it goes to investigate other parameters without explaining why the ratio is 3.

I tried to setup this ratio first 3 and then 4 and then 14. What I found out is the more the ratio the more swings the Vout.

Since we know Vcc = 15V and at Q point VceQ = 7.5V, we can check Vout for different Rc/Re ratios.

Case_1:

Lets first take Rc/Re as 3 as the tutorial suggests:

Vout_max (when Q1 is in cut-off) becomes: 15V

Vout_middle (when bias current is zero) becomes: VceQ + (15-VceQ)/4 = 9.5V

Vout_min (when Q1 is in saturation and Vcesat = 0.2) becomes as follows:

Vcesat+(15-Vcesat)/4 = 3.9V

So what we see above is a Vout which has a middle point at 9.5V when no bias current exists and which swings up to 15V and down to 3.9V. This corresponds a total swing of 11V.

Case_2:

Now lets take Rc/Re ratio as 14 and redo the same calculation:

Vout_max (when Q1 is in cut-off) becomes: 15V

Vout_middle (when bias current is zero) becomes: VceQ + (15-VceQ)/15 = 8V

Vout_min (when Q1 is in saturation and Vcesat = 0.2) becomes as follows:

Vcesat+(15-Vcesat)/15 = 1.2V

Here what we see above is a Vout which has a middle point at 8V when no bias current exists and which swings up to 15V and down to 1.2V. This corresponds a total swing of around 14V.

Here is my question:

1-) If my logic is right it seems to me Rc/Re ratio determines the Vout swing (after setting VceQ as Vcc/2). And the Vout swing increases with Rc/Re ratio. Is that right?

2-) Of course Re shouldn't be too small but  what is the rule of thumb here for Rc/Re ratio? And why?


texts: Potentials at terminals of battery connected to ground

texts:
If we have a battery connected like so:

simulate this circuit – Schematic created using CircuitLab

Am I correct in thinking  voltage on the positive terminal relative to ground is +9V and on the negative terminal is -9V?


texts: Circuit Design to Power the ADH8066 GSM Module

texts:
I am struggling to find the proper circuit design layout to properly power the ADH8066 GSM module and communicate with my Arduino.

The ADH8066 requires a 4V power supply and can have a brief spike of up to 2A during the start of communication.

I have been able to use an adjustable voltage regulator to provide a clean 4V from my power supply, but I have been informed on a forum that I must also use capacitors to cover the amperage spikes (since the Arduino cannot permit that high of amperage to be pulled, even if the power supply supports that rating).

I am a new entrant into the EE space, so I am trying to determine the ideal capacitors to purchase and where they need to be introduced into my circuit.

If anyone has had experience getting the ADH8066 to operate (even if they have a different circuit design than I'm referencing above), any insight into the proper layout would be immensely helpful.


texts: Syntax and/or best practice for buffering a vector in Verilog or VHDL

texts:
I have a Verilog block (Block A) that samples a serial signal with a relatively slow clock and then puts data in several registers based on the contents of the serial data.

Ultimately, these data need to go into several AXI slave register, since Block A is part of a larger AXI slave peripheral. A faster AXI clock drives another block (Block B) that handles the AXI transactions with the ARM core.

The sampling clock clocks the data into the Block A output registers, so these data are sitting there waiting to be placed in the AXI registers. (I think) I want some kind of multi-dimensional shift register to get these data into the AXI clock domain, something like:

...
input wire axi_clk,
input wire [5:0] data_in,
output wire [5:0] data_out,
...

reg [5:0] data_buf[2:0];
assign data_out = data_buf[2];
...

always @ (posedge axi_clk) begin
    data_buf[2:0] <= {data_buf[1:0], data_in};
end

Instead of shifting one bit at a time every clock, I want to shift all 6 bits of data_buf in parallel each clock.

How should I set this up? Forgive the pseudocode; everything I've done so far has thrown errors, and I haven't found example code of what I'm trying to do, or confirmation that it's even possible with easily readable code.

PS - My team does not want to use SystemVerilog, but any version of VHDL or Verilog is acceptable.


texts: Induction motor slip speed stator and slip difference

texts: This is an induction motor question. What is the difference between 'synchronous speed of the stator field' and 'the slip speed of the rotor'? If you know the equation that would also be appreciated.


texts: What is the result of 1 and float on OR gate?

texts: If only one input is 1 into an OR gate, the output is 1, but does that still count if there is no input from other sources? (like float) Or is the output simply float as well?


texts: Power rating not equal to voltage rating times current rating

texts:
I am looking at the 10.1 inch touch screen for RPi, and am puzzled by its power specifications.
Under Features tab in the above link, it says:

Power: DC12V/2A
Consumption: 5W

Obviously \$12 \times 2 \neq 5\$, I wonder what those numbers mean now. How can I correctly estimate the power consumed by the screen under normal operating conditions?


texts:
I found this circuit in a schematic I'm reviewing, which supposedly provides a regulated +5 V supply.  The primary side of the transformer includes a flyback controller that switches ~340 VDC on the primary coil.  The secondary coil is labeled as '5V @ 0.1A.'

What kind of IC is U1?  At first I thought it was some sort of in-rush current limiter given the large amount of bulk capacitance (C2 - C10) but I don't see a way of the IC measuring current.  Maybe an ideal diode?  The 'TON' and 'TOFF' labels throw me off, though.

Not shown:  the +5 V is fed back to the primary-side controller via an optoisolator and bias circuitry (voltage reference and some passives).  This circuitry can be provided but does not seem relevant to the question.

(Also, apologies for the sub-par schematic layout.  I only have access to the PDF, else I would have laid it out so that it's easier to read.)


texts:
I need to read one type of rtd sensor using  linked datasheet(page5) but as far as i know there must be a temperature vs resistance table. Am i missing something or given datas are enough to read temperature. I will use 1 ma constant current. Thanks.

http://www.jumo.de/attachments/JUMO/attachmentdownload?id=3404&filename=t90.6121en.pdf


texts:
I'm trying to bias the inputs of an op amp, I can't simply use a resistor because there is a tiny cap at the input and it forms a voltage divider and I get no signal through.

Can I use a JFET like this?  I have the gate attached to the bias voltage (1.65V) and the source connected to the input and the drain to the op amp.  It works in pspice but I'm not sure if this is a proper JFET application.  I haven't really seen one used like this before.

The source is floating but it rises to the bias voltage.


texts:
I have a simple (maybe dumb) question about the specifications of a Square D float SW. This is the source:

Link to switch store

What is the meaning of  575 Vac 1/3 Phase, 230 Vdc?

is the nominal voltage between terminals? 1/3 is from one up to 3 phases or one-third of the phase?

Thank you so much


texts: Where to apply manual delay in character LCD

texts:
I went to http://www.elm-chan.org/docs/lcd/hd44780_e.html in an attempt to find out how to make an LCD module work with the shortest timings. While the site does help with the initialization of the LCD, I feel as if it is not helping me enough.

Various sources state that for each LCD command or data processed, there is roughly a 40uS to 1.7mS delay before the command is complete.

The website mentions that I could poll the busy flag on the LCD but that would be too long of a delay (Its mentioned under the CPU load heading on the site).

So what I want to do is create a fixed delay in software so that the software continues to function even if the LCD gets disconnected from the circuit during operation.

The question is, where exactly do I implement the long microsecond delay in the code?

Do I insert the delay after I set enable to high (where green question mark is) or do I insert the delay after I set enable to low (where blue question mark is)?

I think its the latter, but I want to make sure.


texts: how to remove this error "ERROR 152: Port on instance does not exist in entity declaration for instance"?

texts:
I am new to Cadence Allegro HDL for schematic design and for my first design i got this error.
In 728 page document provided by cadence its is mention as follows,
"Open the symbol for the component in Concept HDL or Part Developer and delete the port
on the symbol, if it is not required. Then save the symbol. This will bring your symbol and
entity ports in sync."

but I am not understanding what to do,please help.


texts: The LM317 Data Sheet doesn't appear to specify a dropout voltage in the table of electrical characteristics. 1.2V - 1.3V sounds about right for the dropout voltage; is "reference voltage" an alternate name for it?


texts: Can I use ghdl or some other VHDL compiler/simulator than WebPack with a Spartan 3E?

texts:
I'm struggling with WebPack's bloat and random broken pieces when running in Linux. So, I'm thinking it may just be easier to use a different compiler/simulator.

Is it possible to use something different? Note, all I need to do is get a .bit file. I have the Butterfly One which has an external programming application. (which only requires a .bit file)


texts: In Eagle, red area(i guess top layer) doesn't appear when i click on ratsnets tool

texts:
After autorouter was done, i clicked on ratsnets tool and i expected top layer area to be seen, however nothing appears.

This is my project.

I expected to see top layer like in this picture after i clicked on ratsnets.


texts: How a register shifts information to right at positive egde of clock

texts:
We have given the following question:

Design a 4-bit, shift-right register with D flip flops, and use two of these registers to implement a circuit that detects the sequence (x1,x0)=3,0,2,1 (the rightmost digit, "1" in this case, is the first going in, see example). Information shifts one position right each time a positive edge of CK arrives.

I know how a shift register works, but this thing Information shifts one position right each time a positive edge of CK arrives is confusing me a lot. I do not understand how can we implement a shift-register that shifts the information to right at positive edge of a clock.

MY ATTEMPT:

I have made the following circuit which is wrong:

I would be really thankful if someone would help me out and tell me if I a missing something or if I am wrong anywhere. Thanks in advanced.


texts: Does the voltage drop "pass" like current?

texts:
Q: Suppose this diode is silicon. So it can't have more then 0.7 voltage drop. If,after the diode has aquired 0.7 volts,
more voltage comes from the voltage source,then what happens? Does the diode "passes" the voltage and takes more from source?


texts: Altium: Unconnected port "xxx" at 550,430

texts:
As a new in Altium and trying compile my PCB project. I got a warning which says:
Unconnected port "xxx" at 550,430

It seems really strange since I see a normal port which is connected to a BUS at 550,430.

How can it be Unconnected ?!


texts: Why do offline switching converters often use discrete rectifiers for bridge?

texts:
In conjunction with my independent study of switching converters using textbooks, I am more or less obsessively tearing apart all the low-ish power (say 5 - 25 Watt) switching converters I can find. I'm finding myself increasingly able to explain what's happening inside and generally learning a lot about the practicalities of the topic:

I was surprised to discover that all but one of the offline converters I've explored so far use discrete rectifier diodes to form the mains voltage rectifier bridge. This has a few downsides I can see:

increased PCB area
increased component population effort
perhaps increased parasitic C and L, although I don't know that for a fact nor whether anyone would care at that particular part of the circuit

I have a couple hypotheses about why these downsides might be outweighed:

Lower cost?
Increased thermal coupling for better dissipation without a heat sink?

Anyway, can someone with experience with these designs help me understand the design reasoning that might explain this apparently common choice?


texts: Is there something wrong with the way this thing is connected?

texts:
I have this mosfet connected to motor, to control it (on / off).
I use 5V arduino signal to do that, but motor doesn't spin.
I connected the grounds, checked motor and transistor - they work. What could be the problem here?

Update: MOSFET does not work with 5V, even though it should according to datasheet's threshold voltage (which is 4V)
Update 2 : it works just need to put mosfet after load


texts:
Many picture of SAR ADC blocks from the internet show that the output of SAR logic is the output of the SAR ADC, but I also found that lots of papers show the output by using the \$V_{DAC output} \$ and the \$V_{in}\$ ,like the picture below.

So I am a little confused now: is the output of SAR ADC equal to the output of SAR logic, and the value of SAR Logic output equal to the \$V_{DAC output} \$, and the \$V_{DAC output} \$ must be approximate the \$V_{in}\$ ?


texts: Do PIC micorcontrollers NEED an external oscillator?

texts:
I'm trying to write my first and a simple program on a pic16LF84, but I'm confused as to whether an external oscillator is required or optional.

I'm reading a pdf called "Book: PIC Microcontrollers Programming in C" and it states:

  CLOCK SIGNAL Even though the microcontroller has a built-in
  oscillator, it cannot operate without external components which
  stabilize its operation and determine its frequency (operating speed
  of the microcontroller). Depending on elements in use as well as their
  frequencies, the oscillator can be run in four different modes: ·
  LP - Low Power Crystal; ·  XT - Crystal / Resonator; ·  HS -
  High speed Crystal / Resonator; and ·  RC - Resistor / Capacitor.

^It's actually referring to the pic16f887.

I just want to make a simple LED blinker and ADC, so do I need an external oscillator?


texts: You have this large water reservoir, for example, a bathtub. How can you detect when an object is thrown (rock, etc) into a big water reservoir? Vibrating sensor, ultrasonic etc?


texts: Measure temperature on a moving engine valve: transfer voltage and reading wireless?

texts:
I am an automotive engineer with very very little or almost zero electrical/electronics experience. I am working on logging real time temperature values on an engine exhaust valve and mounting a thermocouple and routing the cable through the valvetrain and valve cover. Instead of that, someone asked if the thermocouple voltage values can be transferred wirelessly (a sender unit mounted on valve tip, i.e. top most on the pink thingy and a receiver on the spring seat)

I would like to know if this is even possible and how difficult will this project be for an automotive engineer?


texts: A simple apparatus to detect whether my ear touches a metal plate lying on the floor

texts:
For the sake of simplicity, I just want to create a simple apparatus that produces blinks when doing push-up exercises. However, in the future, I will probably combine this system with a digital counter.

A metal plate is laid on the floor. When I touch the plate with my ear, the bulb will turn on. How to setup such a apparatus?

I have:

battery
bulb 3 volt
metal plate
cables

Making battery, bulb, my body and plate in series might be the simplest way, but I am not sure the voltage of battery needed. Is it safe? Is there any better way?


texts:
I have heard about DC DC converters and I understand what they are but what is a DC DC controller? What is the difference between the two? Like this LM5085, I cannot understand the major difference between the converter and controller. Hoping for an explanation.

Thanks in advance!


texts:
I'm looking to shift 10-15v to 0-5v to read with the Analog input of an arduino.

I've seen some solutions with an OpAmp but all require a negative rail which I do not have.

I know I could use a simple resistive divider but then I lose out on resolution.  Any suggestions or a direction you could point me would be greatly appreciated.


texts: Asynchronous Down Counter using D Flip Flops

texts:
After fixing my Up Counter, I'm having troubles writing structural verilog code for an Asynchronous 4-bit Down Counter using D Flip Flops.

Here's the D Flip Flop code (which was tested and works):

module DFlipFlop
(
  input wire    reset_n,
  input wire    clk,
  input wire    d,
  output wire   q,
  output wire   q_n
);

  wire w1, w2, w3, w4, w5, w6;

  //master
  nand na1(w1, d, ~clk);
  nand na2(w2, ~clk, ~d);
  nand na3(w3, w1, w4);
  nand na4(w4, w3, w2);

  //slave
  nand na5(w5, w3, clk);
  nand na6(w6, clk, ~w3);
  nand na7(q, reset_n, w5, q_n);
  nand na8(q_n, q, w6);

endmodule

And my Down Counter Code using this image:

module Count4Down
(
  input wire      reset_n,
  input wire      clk,
  output [3:0]    q
);

  wire qn0, qn1, qn2, qn3;

  DFlipFlop ff0(reset_n, clk, qn0, q[0], qn0);
  DFlipFlop ff1(reset_n, q[0], qn1, q[1], qn1);
  DFlipFlop ff2(reset_n, q[1], qn2, q[2], qn2);
  DFlipFlop ff3(reset_n, q[2], qn3, q[3], qn3);

endmodule

And the Testbench:

module testbench;
  reg clk, reset_n;
  wire [3:0] q;

  Count4Down u1(.clk(clk), .reset_n(reset_n), .q(q));

  initial begin
    forever begin
        clk <= 0;
        #5
        clk <= 1;
        #5
        clk <= 0;
    end
end

  initial begin

    $dumpfile( "dump.vcd" );
    $dumpvars( 1, testbench );
    reset_n = 0;
    #12
    reset_n = 1;
    #170
    reset_n = 0;
    #12
    reset_n = 1;

    #200  $finish;
  end

endmodule

When I run it, it only displays a series of x's. I tried the testbench with some working code of a down counter I found online and it displayed things correctly, so I'm led to believe the problem lies within my Down Counter Code. So what am I doing wrong? Thanks in advance!


texts: Why does a foster seeley circuit need transformer coupling?

texts:
Having read most of the online references to this circuit and performed some simulations, I still don't have a firm grasp on how this circuit functions.

Here's a schematic to refresh (possibly painful) memories:

and here is one of the better intuitive explanations (in my opinion) of how the circuit works.

If you simulate this circuit and make a tight coupling between the primary and secondary of the "transformer", the circuit will not work as expected.  If the coupling is tight, the top of the secondary will be in-phase with the primary, as you would expect.  But, as the explanation above describes it, you want the secondary windings acting like inductors so that there is a 90 degree phase shift at the top and bottom of the secondary with respect to the centre tap (at the resonant frequency).

So, if my understanding is correct and the secondary winding halves are acting like inductors to the current arriving from the top of the primary tank (via C at RF) why does this circuit need transformer coupling at all?

Anybody care to confirm or reject my speculation in the comment section?  Anybody - sob!


texts: Closed enclosure thermal design the right way

texts:
I have a circuit board that works quite well (processor, screen, power supply).
It has been tested successfully for an open aluminium enclosure, but now it will need to fit a rugged 100% closed box.

I know that some people use simulations or excel tables to estimate the power, heat, volume, dissipation and element layout.

What would be the right way/process to design a such enclosure?

is there any software or other tool to optimise thermal performance?

I feel like we do it mostly by trial and error and experience only, and would like to have more elements to have success with less iterations.


texts: Raspberry Pi: Do the electrons flow from the power pins or ground?

texts: I'm rather new to this and am slightly confused about which direction the electrons actually flow. Using an LED with the knowledge that conventional current flows out of the cathode, and hence the opposite is true for electron flow, it seems electrons actually flow out of the ground pin. Is this correct?


texts: Digitally controlled potentiometer X9C103P gives erratic resistance measurements

texts:
I have a digitally controlled potentiometer (DCP) X9C103P (datasheet) which I am trying to operate. Following are the pin connections I've made refering to its datasheet:
Pin 1: INC (resistance increment/decrement) - connected to programmatically controlled digital output port of a I2C device (NI-8451)
Pin 2: U/D (resistance change up/down)- tied to Vcc
Pin 3: VH (Pot end terminal 1) - floating
Pin 4: Vss - grounded
Pin 5: VW (Pot wiper terminal) - floating
Pin 6: VL (Pot end terminal 2) - floating OR grounded
Pin 7: CS (pot enable) - tied to ground
Pin 8: Vcc - +5V
The pot resistance is incremeneted when the INC terminal is given a trailing edge (clocked from high to low), and I am doing that programatically using a DIO port controlled by LabVIEW. However, when I measure the resistance between VH and VW, the measurement at times comes out to be 20 Ohms and at times >100 kOhms or even a NO CONNECT (NC). I even checked the voltage on the Vcc and Vss pins to check whether there was a lose connection (since I am using a breadboard), but all the pins gave me the expected voltage.
Upon clocking the INC terminal too, this problem persists i.e., the resistance between VH and VW is either 20 Ohms or an NC. What is also worrisome is that the resistance should increment after clocking, which isn't happening. I contacted the manufacturer and he has suggested me to tie the VL pin to ground and repeat the procedure. I did that but it still is giving me the same error.
Hence, can anyone help me with resolving this issue?


texts: Simple circuit reacts to touching a node

texts:
I am trying to repeat a circuit from this post. For some reason it does not work properly, and trying to fix it I figure out strange behavior. LED turns on if I touch R3 with my finger or with something that conducts electricity. What can be the reason of that? Here is the video.

Since the voltage supply is 3.3V instead of 5V, I changed resistors correspondingly: R1 = 66k, R4 = 99k. Also by mistake I changed the value of R3 to 150. Looks like the value of R3 is crucial. If make it large enough, the effect is gone, but the switch becomes proportional rather than discrete (lesser light leads to brighter LED).


texts: Help me identify this smd component marked. GMCAA

texts: This smd is in the power supply section of a small monitor. Size of ic   8 pin  5 x 3.5 mm.


texts: I made a board with the Analog Devices ADXL345. I then attached it to my robot and did obstacle avoidance with data logging for about 10s. The robot made 4 turns. Here is a graph of z-axis readings. I set the ADXL345 to +/- 2g. It is 10bit. This data doesn't look right. Is this what I would see from vibration, or is this what I should see?


texts: BC547 base current and collector current

texts:
I am trying to make some simulations of the BC547, but I have some problems.
I adjusted the hfe (beta) to 320 and measured the base current and the collector current as below:

The RMS value of the base current is 33.552uA. RMS value of the the emitter current is 1.17mA.
If we multiply base current by hfe, the result is 10.73mA but Multisim shows it is 1.17mA.
Why are calculation and simulation so different? Are my calculations wrong ?
If I wait some time, the base current becomes 68uA and the emitter current 1.4mA.
The values of the components are as below:


texts:
I have this code from 2002. I had to update the macros but I still get 'poisoned' error messages from the compiler (AVR Cross Compile, MAC OS X) in Eclipse:

Description Resource    Path    Location    Type
attempt to use poisoned "SIG_2WIRE_SERIAL"  test        line 533, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_ADC"   test        line 470, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_COMPARATOR"    test        line 480, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_EEPROM_READY"  test        line 475, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INPUT_CAPTURE1"    test        line 417, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT0"    test        line 367, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT1"    test        line 372, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT2"    test        line 377, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE0"   test        line 437, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE1A"  test        line 422, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE1B"  test        line 427, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE2"   test        line 407, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW0" test        line 442, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW1" test        line 432, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW2" test        line 412, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_SPI"   test        line 447, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_SPM_READY" test        line 539, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h

Here's the full code (Atmel128):

http://pastebin.com/uAnb2R0v

As far as I know, the SIG_ prefix means these are interrupt vectors. While there aren't interrupts in the code, it still complains. Any idea what am I doing wrong?


texts: Amplifier stopped working completely after changing op-amp

texts:
After replacing op-amp given in the picture

with LM386L the amplifier pretty much stopped working entirely. There is only a faint sound on the output - as if the gain was way below 1.

Given the characteristics and my ignorance I have no dea why this happened.


texts: How to design voltage ladder on ADC for non linear purposes

texts: I'm designing a 4-bit ADC for a project that receives a reference voltage that ranges from 1.0 to 1.25. The problem is, it's not a linear variation, as in 0001 can be 1.05V, 0010 1.1V but 0011 could be 1.2V, instead of the 0.05V increase shown from 0001 to 0010, there was a 0.1V increase to 0011. So the first comparator will need to have the 1.05V reference, the second one the 1.1V, and the third one the 1.2V, and as this is, I can't use a bunch of resistors with the same resistance, I need different resistors, and I can't imagine how to calculate their values. Considering it's a theoretical project, so it doesn't matter if such resistor is manufactured or not, how can I calculate resistor values to input in comparators a non linear voltage decrease?


texts: Measuring the output of a phase control triac

texts:
I have an air compressor I'm trying to troubleshoot and I'm trying to determine if the problem is with a small circuit board with a triac. The board takes as input an ac wall outlet (US) and outputs to a motor. The triac is a BTA24 600BW (datasheet: http://www.st.com/web/en/resource/technical/document/datasheet/CD00002264.pdf).

I understand how using a triac as a switch works but this triac is used to control motor speed so it is using phase control which I have zero experience with. How do you measure/test the output of a triac using phase control? I've got two multimeters and one shows output of 0 volts while the other shows 110 volts. The one showing voltage is a more expensive meter so I'm not sure if it is just more sensitive or picking up some slight current leakage that the other isn't or if the phase control stuff is throwing the meters off.

Can you use a multimeter to measure the output of a triac which is being used for phase control? If so, how? And any causal explanations of phase control would be appreciated.

Edit: Originally I thought it was a regular transistor and not a triac.


texts: Can someone tell me how to wire the MX mechanical keys to an Arduino?

texts: I am thinking of making a custom keyboard for a VJing software. I couldn't find momentary switches of size greater than 15mm, so I am thinking of buying these MX keys (they have 3 pins.) I could'nt find a wiring diagram online. So will you be able to help me out with the wiring diagram (I will connect them to an Arduino Uno R3.)


texts: High Voltage Serial-to-Parallel Over Many Channels

texts:
I've been using the HV507 for parallelization of a 300VDC supply, but the chip only has 64 channels. I was wondering how to drive this voltage to a much higher number of channels (say, 1,000).

Is this just a question of tracking down the highest-channel alternative to the HV507, and using as many in conjunction as necessary, or is there some special circuit I should employ for parallelizing a high DC voltage to an arbitrarily large number of channels? Is a custom IC necessary?

I'm very new to electronics and thus also to multiplexers and shift registers.


texts:
Is there more information about the effect of an output capacitor on a circuit? That is, does an output capacitor with (parallel) resistive load contribute any poles or zeroes, and how can I determine the location of said poles and zeroes?

I assume there is probably some relationship similar to an RC filter where ω = 1/RC, but in my case, I do not have a series resistor. Furthermore, is there any contribution by the ESR of the capacitor itself?


texts: How to calculate the current produced by a solar panel?

texts:
The equation for calculating current when given voltage and temperature is known as the 5-Parameter model ie.

\$I = I_{ph} - I_o[\exp(\frac{V + R_sI}{nV_t})-1] - (\frac{V+R_sI}{R_{sh}})\$

Since this is a non-linear implicit equation, we use the Lambert W function to solve for \$I\$, so the equation becomes

\$I=\frac{(I_{ph}+I_o)-V/R_{sh}}{1+R_s/R_{sh}}-\frac{nV_t}{R_s}W(\frac{I_oR_s}{nV_t(1+R_s/R_{sh})}\exp(\frac{V}{nV_t}(1-\frac{R_s}{R_s+R_{sh}})+\frac{(I_{ph}+I_o)R_s}{nV_t(1+R_s/R_{sh})}))\$

where \$W(x)\$ is the Lambert W function.

Now, assuming that these 5 parameters are known,

(\$I_{ph}=6.6, I_o=1.297*10^{-7}, R_s=0.33, R_{sh}=198.88, n=1.038\$)

and the input voltage and temperature are,

\$V=200, T=45^0C\$

Now if I substitute the values into the equation, the current turns out to be negative infinity, and only when the voltage is around 1V, the current is normal. Am I missing something? The value inside the \$\exp(x)\$ turns out to be more than 1000, and this is the reason it becomes infinity. I am not able to produce a normal I-V curve for the solar panel because of this.

Here is the code that calculates the value

from scipy import constants
from scipy.special import lambertw
import numpy as np

# Iph, Io, Rs, Rsh, n
params = [6.6, 1.2E-7, 0.33, 198.88, 1.038]

def func(V, T, Iph, Io, Rs, Rsh, n):
    RsRsh = 1 + Rs/Rsh
    print(RsRsh)
    Ipho = Iph + Io
    firstTerm = (Ipho - (V/Rsh)) / RsRsh
    thermalVoltage = (273.15 + T)*(constants.k) / constants.e
    secondTerm = (n*thermalVoltage) / Rs
    thirdTerm = (Io*Rs)/(n*thermalVoltage*RsRsh)
    fourthTerm = (V/(n*thermalVoltage))*(1-(Rs/(Rs+Rsh)))
    fifthTerm = ((Iph+Io)*Rs)/(n*thermalVoltage*RsRsh)
    exp = np.exp(fourthTerm+fifthTerm)
    secondPart = thirdTerm * exp
    value = firstTerm - secondTerm*lambertw(secondPart)
    return value

def main():
    V = 200
    T = 45
    print(func(V, T, *params))


texts: How transmission line repeats after \$ \frac{\lambda}{2} \$ distance?

texts:
Following two statements made me think that the transmission line repeates after \$ \frac{ \lambda}{2} \$ distance:

A complete revolution around the Smith chart corresponds to \$ \frac{ \lambda}{2} \$ distance on the line
Distance between two successive voltage Maxima is \$ \frac{ \lambda}{2} \$

In order to proof that the line repeates after \$ \frac{ \lambda}{2} \$ distance, my thoughts are as follows:
Consider a two conductor transmission line as shown below:

The instantaneous voltage expression at a distance \$ z \$ on the line is given as :
$$v(z,t)= V_o^+ e^{(- \alpha z)}cos(wt - \beta z) + V_o^- e^{( \alpha z)}cos(wt + \beta z)$$
$$\implies V_s(z) = V_o^+ e^{(- \alpha z)}cos(-\beta z) + V_o^- e^{( \alpha z)}cos(\beta z) \quad \dots (1)$$
Now, \$ cos(\beta z) \$ repeats after a distance of \$ \lambda \$ , then \$ V_s \$ is also supposed to repeat after a distance of \$ \lambda \$;
but according to my conclusion (made in the first line) \$ V_s \$ should repeat after a distance of \$ \frac{\lambda}{2} \$ (as the line repeats after \$ \frac{\lambda}{2} \$ distance)
so, can anyone tell me how \$ V_s \$ repeats after a distance of \$ \frac{\lambda}{2} \$ ?
or any other approach which will prove that the line repeates after \$ \frac{ \lambda}{2} \$ distance


texts: A confusion on the current gain of an NPN transistor

texts:
In above screenshot V2 is increasing ramp voltage from 0 to 12V, which accordingly increases Ib. Transistor is an NPN type.

Ic(q1) is the collector current.

Vce = V1 is a constant 1V.

So it means Im keeping Vce constant and only increasing Ib.

Many tutorials say in amplification region Ib/Ic is constant and called beta i.e. hfe.

But the blue plot which is Ic/Ib is very different than what I expect.
What is wrong?

edit: Here is after I decreased the base current with  FakeMoustache's suggestions:


texts:
I'm building a circuit that uses a 32:1 mux (ADG732) to feed the selected channel into an amplifying stage so I only need one amplifying circuit. The input signals are from pressure sensors which have a capacitive nature and produce ~10mV of amplitude. The problem is that when I try to feed the channels through the multiplexer the sensors connected to the off channels are still affecting the output of the multiplexer; essentially bleeding across the channels in low-frequency operation. I think it might have something to do with the high impedance of the sensor. Is there any way to deal with it or is there a better mux for this purpose? I've tried to separate the input and multiplexer  from the rest of the circuits (amplifiers, filter) but there is still crosstalk.

Edit 1:
I'm not switching channels at the moment so I doubt the settling time would be an issue. Also, the original plan is to do the amplifying after mux so I don't need to install 32 amps. The schematic is quite messy but it is basically sensor inputs through header are fed straight into mux then to the amp/filter stages.

This is the circuit with mux

Amplifying/filtering circuit only

Edit 2:
All sensors are on separated sheets of PVDF. The electrodes are attached to copper tape contacts on both sides of the PVDF with a little bit of solder. I do not have sufficient knowledge with ground design so I just tie all the things I want to ground to the GND pin on my microcontroller. Let me also note that when the system is tested with a function generator (20mV sine wave of 5Hz) everything works just fine. The multiplexer has no problem switching and the amplifying and filtering stages also perform as expected.

For example, say channel 1 and 2 are PVDF inputs and channel 3 is the 20mV sine wave at 5Hz. If ch1 is selected and no pressure is applied to ch1 sensor, the output of the multiplexer would just be flat as expected. However, if pressure is applied to ch2 sensor while ch1 is on and ch2 is off, we can observe variation in output caused by ch2 as if ch2 is also on. The same effect applies vise versa. The exception being channel 3 (sine wave) which does not create interference or get interfered by the first to channels.


texts: Atmega1284P-PU - how to connect more than one device through SPI?

texts:
I need connect 3 modules via SPI with ATMEGA1284P-PU. I looked on datasheet, but I found only one SPI.

On which pins are other SPI?


texts: Question about the superposition-theorem

texts:
I had this exam question, where I was asked to solve a circuit with the superposition theorem. I did it by mesh analysis because I didn't read correctly, but to check my procedure I did a different version of the superposition theorem.

The superposition theorem states that you should consider the influence that each element taken separately has on the circuit, and then sum those influences.

What I did was that I didn't consider them completely separately. The thing worked and got the right results.

Important to note here is that no separate case had repeated elements, OK? For example if I had three elements A,B and C; I would consider the influence of A,B then of C. I did not repeat elements in the distinct scenarios. For example I wouldn't have done A,B and A,C and then sum them.

How can I show that my procedure is in line with the superposition theorem?

Thanks!


texts: 0,5m led strip (15 leds) Phone Power Supply

texts:
I have a 15 led 0,5m led strip (ws2812b). Since it's such a limited amount of leds, I'll try to power the strip with an old phone power adapter (5v / 750mA). I looked at the ws2812's data sheet and it says

  Each RGB LED draws approximately 50 mA at 5 V with red, green, and
  blue at full brightness

So that's 15 x 50mA = 750mA

I'll call that one tight, but won't it be all right because these leds are never gonna run full power all the time.


texts: How to distinguish a DC generator from an AC generator

texts:
I have an electrical generator (a tachometer really) and I want to know how can one detect if it is AC or DC? (what if it is dead and can not be tested for its output?)

I add the image if some of you guys can read Russian
I


texts: Using Git version control software with IAR Embedded Workbench

texts: I have been using Git / Bitbucket to manage versioning for Altium and MPLAB and have recently started using IAR for the STM8 series MCUs for a series of projects. Is there any Git integration to IAR Embedded Workbench or will this be a more manual / external process of versioning? I see that SVN is supported, but am not interested in going back to SVN only for this IDE. Help is appreciated, thanks!


texts:
Suppose one uses a poor 18650 (low quality and without a datasheet) to charge a phone and the phone tries to draw 3A-4A (2A @5V) from it. Would this be hazardous even with a protection circuit built in the device (lock out at 2.7V)? Or would the voltage drop low enough even if it's a low-quality 18650?

Thanks


texts:
What is the use of this diode in the circuit?
I guess it is used for short circuit protection and turning off the LM2576.


texts: PIC - Accessing udata through pointer in another file

texts:
So I have a list of clockings in my udata in, let's say, clock.c.
I have read that udata has to be accessed through a pointer, well okay, fair enough.

Above defines.h

//Warning! This has to be conform the linkerscript, you can not just increase it.
#define CLOCKINGLISTLENGTH 50
#define KEYLENGTH 6

//A clocking consists out of a key, time and in/out (and status)
//All the clockings together are the "clockings" list.
//These clockings will await to be transmitted.
typedef struct
{
    unsigned isActive:1;
    unsigned needsTransmit:1;
    unsigned inOut:1;
    unsigned val1:1;
    unsigned val2:1;
    unsigned val3:1;
    unsigned val4:1;
    unsigned val5:1;
} byte;

typedef struct
{
    byte bits;
    unsigned char key[KEYLENGTH];
    unsigned char time[6];
} Clocking;

Above clock.c file.

#include "defines.h"
#pragma udata large_udata
Clocking clocking_queue[CLOCKINGLISTLENGTH];
#pragma udata
Clocking *clockings = clocking_queue;//Access udata through pointer!

In eeprom.c file.

#include "defines.h"
extern Clocking *clockings;

void writeClockingToEEPROM(char clockingIndex){
 int eepromIndex = 0;
 Write_b_eep(eepromIndex,clockings[clockingIndex].key[0]);
}

So my question is: "How to access udata from another file through a pointer".
I simply want to use my clockings_queue (which should be accessed through *clockings pointer) in my EEPROM.c, so that I can store clockings in EEPROM.


texts: Wrong frequency with Timer1 on Atmega328p in CTC Mode

texts:
I want to make a LED blink at a frequency of 0.5 Hz. So, I use an Atmega328p, clocked at 16 MHz, and the Timer1 in CTC mode, which triggers an interrupt every milisecond. Yet, my program, in Atmel Assembly, looks like this:

.include "m328pdef.inc"

.def     WR1 = R16    ; the working registers
.def     WR2 = R17
.def     WR3 = R18

.def     T1 = r13     ; A 24 bits value used to hold the
.def     T2 = r14     ; number of milliseconds
.def     T3 = r15     ; In T1 is the LSB, and in T3 the MSB

.cseg
.org  $0000
    RJMP    Start

.org OC1Aaddr         ; The address of the Timer1A compare match interrupt
    JMP     Timer1comp
    NOP

.org INT_VECTORS_SIZE

;---------------;
;   Settings    ;
;---------------;
Start:
    ; Initialize the Stack Pointer
    LDI     WR1, HIGH(RAMEND)
    OUT     SPH, WR1
    LDI     WR1, LOW(RAMEND)
    OUT     SPH, WR1

    ; Timer1A setup
    CLR     T1        ; Reset the ms counter
    CLR     T2
    CLR     T3

    LDI     WR1, (1<<WGM12)|(1<<CS10)  ; Timer in CTC mode, TOP = OCR1A
    STS     TCCR1B, WR1

    LDI     WR1, HIGH(15999)  ; Must wait 16000 clock cycles in order to
    LDI     WR2, LOW(15999)   ; have a frequency of interrupt of 1 kHz.
    STS     OCR1AH, WR1       ; ISR doesn't interrupt timer, so have
    STS     OCR1AL, WR2       ; to set OCR1A to 16000 - 1

    LDI     WR1, 1 << OCIE1A  ; Enable Output Compare A match interrupt
    STS     TIMSK1, WR1

    ; I/O settings
    SER     WR1               ; The LED is plugged on any pin of port D
    OUT     DDRD, WR1
    OUT     PORTD, WR1

    ; Enable interrupts
    SEI

;---------------;
;  Main Loop    ;
;---------------;
Loop:
    CLI                    ; Reset the ms counter
    CLR    T1
    CLR    T2
    CLR    T3
    SEI

    IN     WR1, PORTD      ; Toggle port D
    SER    WR2
    EOR    WR1, WR2
    OUT    PORTD, WR1

    ; HERE WAS MY ERROR
    ;LDI    WR1, BYTE1(988)  ; 12 clock cycles are passed
    ;LDI    WR2, BYTE2(988)  ; We want to wait 1000 ms
    ;LDI    WR3, BYTE3(988)

    ; CORRECT WAY
    LDI    WR1, BYTE1(1000)  ; We have already spent 12 clock cycles (750 ns)
    LDI    WR2, BYTE2(1000)  ; which is totally negligible against
    LDI    WR3, BYTE3(1000)  ; our delay of 1000 ms

Wait:
    CLI
    CP     T1, WR1    ; Compare the time (ms) since start of loop
    CPC    T2, WR2    ; with 1000
    CPC    T3, WR3
    SEI

    BRLO   Wait       ; Go to Wait if time < 1000 ms

    RJMP   Loop

;-----------------;
;   Timer1A ISR   ;
;-----------------;
Timer1comp:
    ; Save the current state on the stack
    PUSH    WR1
    IN      WR1, SREG
    PUSH    WR1

    INC     T1          ; Increment the ms counter
     BRNE    Timer1compEnd
    INC     T2
     BRNE    Timer1compEnd
    INC     T3

Timer1compEnd:
    ; Reset the state
    POP     WR1
    OUT     SREG, WR1
    POP     WR1

    RETI

The problem is, when I measure the blink frequency of the LED, instead of finding 0.500 Hz, I see 0.506 Hz. I wonder where this error comes from.

Also, I'm really new to assembly programming, so I'll be glad to receive any kind of advise.

EDIT  1

Finally, I found the origin of my problem: in the main Loop, I load WR1:WR2:WR3 with 988 ms, because the main Loop takes 12 clock cycles. However, even if the main Loop takes 12 clock cycles, it only takes 12 / 16000000 = 0.75 µs, which is totally negligible against the 1 s period. We can assume that this Loop takes 0s: then, I wait 12 ms less than I'd expect to, which represent an error of 1.2 % as Michael Karas said. To correct this, I should set WR1:WR2:WR3 to (1000 - 0.00075), so 1000.

EDIT 2

There was a problem with my previous code: in the Wait loop, I tested whether the desired time was higher or equal to the elapsed time. Thus, If the elapsed time is 1000, then the micro controller would wait until the 1001'th millisecond to branch to the main Loop. So, to correct this, I must test whether the elapsed time is smaller or not than the desired time.


texts: Why does my microcontroller's 5V out fail to activate my 5V relay?

texts:
I am using a small microcontroller with 5V output lines to try to turn a relay on and off.

I bought the relay module from  Amazon and unfortunately I don't know much about what is on the relay module's board, but I do know the relay is a SRD-05VDC-SL-C

I tried to follow an Arduino tutorial and I've almost got the setup working...

I say almost because the relay IN line doesn't seem to get enough power, and the Green LED on the module that indicates the IN line's voltage is very dim.

I tested the module by putting the IN line directly on the 5V input, and it seems to work fine.

I made a video that explains and demonstrates the problem

You can also connect an external power source to the microcontroller, and I tried that, too, with similar results

Can anyone help me understand why the relay doesn't work when hooked up to the 5V output line of the microcontroller?

EDIT

Attempt at drawing out configuration in first video, where the A* microcontroller is getting 5V of power from its usb plug:

simulate this circuit – Schematic created using CircuitLab

Attempt at drawing schematic of video 2

simulate this circuit

Attempted schematic for a new 3rd video, trying to power the relay separately.

simulate this circuit

Actually got it working with 2 pins in this 4th video

Does this mean that the problem was current all along?


texts:
I am currently trying to use the database in Altium, but I have one big question:

I was expecting to get one database entry per resistor value. But, for a single 100k 0805 resistor (for example), there are three footprint choices, by density:

IPC High Density
IPC Medium Density
IPC Low Density

Why three choices for the footprint? How do I choose?


texts: Calibrating ADC for calibration-free temperature measurement

texts:
I have an application for a 10-year completely sealed battery-powered Bluetooth temperature measurement system providing an accuracy of +/-0.5C over a range of 0C to 50C. The device cannot be calibrated during its working life, and I'd prefer not to calibrate in production. The simplest solution is something like a Si7054, which has a +/-0.4C acccuracy and a 0.01C drift per year = +/-0.5C. Great. $1.20 / 1K units.

However, can I do better/cheaper with fixed resistors, an NTC thermistor, and a ratiometric measurement using an onboard ADC? For instance:

NTC Thermistor:0.5% 100K, Beta 0.5%, $0.174/1K (TDK NTCG104ED104DT1X)
Resistor 0.1% 100K, 25ppm/C = 0.1625% $0.066/1K (ARCOL APC0603B100KN)

Estimation of total accuracy ~1.1625%, cost $0.24

Now the bad part: The nrf52810 BLE IC has a +/-3% error on the 12-bit ADC after its internal calibration. The system error is > 4.2% once you account for propagation of errors. My understanding is that NTC sensors change ~4-5%/C so now we have an error of ~+/-1C. Darn.

Is there a simple way to calibrate this error out? The nRF52 can perform internal offset error calibration against ground. It seems using precision resistor dividers or fixed voltage references to provide a second reference point would allow me to figure out gain error and get enough accuracy. Am I missing anything here? Any other sources of error? Words of wisdom from the experienced?


texts:
I am trying to access "M41T00CAP RTC" device through I2C. there are other I2C devices also, which  I am able to access perfectly. but in case of RTC device , I am not able to read the register correctly. The value read is random and not relevant. my I2C read function follows the exact I2C read protocol and is working well for other I2C devices. Does anyone have any idea about this device M41T00CAP?
Has anyone implemented this ?please share.


texts: What is difference between channel power and normal power plotted by a spectrum analyzer?

texts: I want to measure the power received by an antenna from an energy source by plugging the antenna to a spectrum analyzer (SA). What makes me confused is that there are different kinds of power that I can measure by the SA. By default, the signal I get would have the form of the following plot. However I'm doubting that the peak power in dBm of the plot is the true power captured by the antenna. And there is a channel power that I can measure by selecting the Channel power option of the SA. So, which one is more correct? Could you please suggest how to measure the power received by an antenna by using the SA? I'm using Agilent N9320a.


texts: Using USB to Parallel Port, Send an 8-bit data of Assembly Code

texts:
For educational purposes, our professors have DB25 ports on our laboratory rooms, and of course we can only simulate our assembly codes in there

Our professor said that it might not be possible to control 8 LEDs (terminal D0-D7) using a USB to Parallel Port(DB25) Converter,

We're simulating, for example,
We're sending binary information to the port that would do this:

D0 On
D1 On
D2 Off
D3 On
D4 On
D5 Off
D6 Off
D7 On

It would be mov al, 11011001b, as I've said we've done this on PC's that have available DB25 port

Is it possible to send an 8-bit data through a USB to Parallel Port(DB25) Converter?


texts: Choosing a DAC for Amateur Radio applications

texts: I'm looking to make a software defined radio, and I'm currently looking at what DAC to choose.  I'm fairly new to this area of RF design, so I don't know what specs to look for.  Most of my signals will be ~14MHz SSB transmissions (focusing on the transmitter right now).  How many MSPS per second will my DAC need?  Also, what bit depth should I be looking at?  I've seen other designs use a low-frequency DAC, and the only reason I can see this working is if they use a frequency upconverter.


texts:
I'm having trouble with this particular inverting Op Amp question.
I know that there are 2 nodes and I must apply KCL on the nodes.
What I tried was \$\frac{0-V_i}{49k\Omega}+\frac{0-V_o}{79k\Omega}=0\$
and I'm not sure about the second KCL equation.
and I'm pretty sure that R3 isn't parallel with R4.
The answer is -68.8


texts: I have two ground planes, one of which is connected to Earth (chassis). The other is for PT100 circuitry and is floating, but connected to the body of the PT100. Is there any standard procedure for connecting the two ground planes to minimize static damage from the PT100?


texts: Will a TIP42 suffice for this project that calls for a BC559 (transistors)?

texts:
Im building a Nintendo 64 USB adapter as outlined in this guide. For the transistor, it calls for a BC559. At RadioShack, the most similar one I could find was a TIP42. Will this work for this particular project? I thought I was mainly looking for something with an emitter-base-voltage of 5V, which the TIP42 has. The power-dissipation collector-emitter-viltage and the collector-base-voltage are all higher on the TIP42 (or at least it looks so), but I thought those were more "maximum" sort of things.

If you haven't noticed, I'm new to all this. This is my first electronics project and I'm a bit clueless, but I learn by doing.


texts:
I thought to use the op-amp TS461 in an audio circuit as a signal amplifier.
Here is the datasheet. In the datasheet, for power supply, the pins are Vcc and Vdd. Due to my newbie-ness, I was expecting only one of these. Please help:

Is this standard? Should they not be using only one of these and then the other should be Vee or Vss?
Which of these is the +ve supply and which of these is the -ve supply? The Electrical characteristics table (table 3) says at the top Vdd=-2.5V, so, can Vdd be taken to be -ve?


texts: How can I prevent inrush current from causing sparks when I connect my project to a power source?

texts:
It is a common problem with my projects that when I plug connector in (DC connector to DC jack),  sparks can be seen, although it hardly takes 10 watts of power. On commercial products, this is not a problem. For example, why doesn't my laptop charger spark when I plug it in? What can I do to stop it?
My findings: It happens due to the capacitors in my project. So should I fear?


texts: How can I turn ON-OFF this oscillator circuit?

texts:
On my prototype board I used an integrated oscillator which gave me the desired frequency without any extra component. Then it's being divided by a divider ic.
The clock pulse going from the oscillator to  the 8 stage divider 74AHC1G4208 is turned on and off by an AND gate. The ON-OFF signal comes from a D Flip-Flop CD4013.
On the prototype I use a 10 stage divider. But in the final version I will use a 8 stage divider, which is the same. So I linked to the 8 stage version of the chip.

This circuit works perfectly.
Now that I plan production in some quantity, I would like to replace the oscillator ic by a much cheaper and also more available, crystal and its passive components, as shown on this schematic from the divider ic 74AHC1G4210 datasheet.
This chip has an built-in output X2 for oscillator circuit. X1 is the clock input being divided. I plan to copy this circuit.

The crystal is an IQD 4.9152 MHz.

Could you tell me how I can turn this circuit on and off as I did with the AND gate. If I put an AND gate between the crystal and X1, I imagine it won't work because the AND gate will prevent resonance with the crystal.

Maybe I could sink the current coming from X2 to the crystal, limited by R1 (in this case 4.7K or 10K) with a N-MOSFET?
But wouldn't that perturb the crystal?

The first 5 or 6 pulses can be irregular, as long as the next ones are at the good frequency.

I also have no idea what value should be for Rbias, C1 and C2, except from the indication on this schematic. It reads:
"R1 is the power limiting
resistor, its value depends on the frequency and required stability against changes in VCC
or average ICC. For starting and maintaining oscillation a minimum transconductance is
necessary, so R1 should not be too large. A practical value for R1 is 2.2 kΩ."


texts: Would this component require a heat sink?

texts:
Would this LM7805 voltage regulator require a heat sink?

It will regulate 12V to 5V and will be used for a 5V sensor which draws 4mA current.