texts:
I have an issue with solder paste, I would like to know its origin so I can fix the problem and solder by components properly.
I use a lead free Sn42/Bi57.6/Ag0.4 solder paste, manufactured by ChipQuick.
Here is the datasheet.
The syringe I'm using was opened three weeks ago and stored at ambient temperature until now. (I close it with the protective cap between each use, of course.)
I ran some tests before actually using it to solder components. I simply deposited several bits of it on a copper board, which I previously wiped with alcohol.
I have at my disposal a soldering oven (not some salvaged toaster, a real oven designed for this application).) However, it works like regular timer-ovens: set a time with one button, and set a temperature with another.
This is the process I used so far:

I put the board in the oven, at ambient temperature
I start the oven at 90°C and I wait one minute
I set it to 140°C and wait for two minutes
I set it for 180°C and wait for the solder paste to "melt" and get transformed to actual solder
Finally, just after the activation, I turn off the oven and open the door to allow a quick return to ambient temperature.

Problem is, I always end up with a nice sphere instead of observing spread solder across the copper face.
Exactly like this :

I want to know if I am doing something wrong during the process, or if this is linked to the storage conditions of the solder. Note that the manufacturer indicates a good "shelf life" but I don't know if it implies that the container should not be opened.


texts: Physics behind switch bounce when opening?

texts:
I was surprised to learn that a mechanical switch (SPST) bounces when it is opened.  What causes the contact to temporarily return to touching?

Does this phenomenon only happen with certain types of switches (e.g., with sliding switches but not with most pushbuttons)?


texts:
I'm a newbie and I've been playing with the awesome Adafruit CAP1188 capacitive touch gizmo.

As long as I keep the length of the wires from the CAP1188 to my copper sticky pads to a couple of feet, everything works perfectly. But as soon as I go beyond say 4 feet it stops working.

I spent a few hours experimenting with different length of wires and tweaking the CAP1188 sensitivity, but nothing works.

What I really like about the capacitive sensor approach is that it's fairly inexpensive. The CAP1188 is $8, it self-calibrates and can drive (on paper) 40 capacitive touch pads which can be made out of sticky copper tape, and the whole thing only uses 2 or 3 pins on my Arduino. I need 32 sensors for my project. You can think of my project as the equivalent of a giant/3D https://en.wikipedia.org/wiki/Simon_(game).
Using some kind of mechanical switch is not out of the question either as long as it's sturdy, cheap and/or easy to make.

What am I doing wrong? Is it something inherent to the capacity touch technology that renders the use of wires with a length beyond a few feet inoperable?
Should I be using some other technology such as Pressure-Sensitive Conductive Sheet?

Any suggestions will be greatly appreciated!


texts: Changing the path of a signal through multiple transistors with a single-poled switch

texts:
I was wanting to construct a "fuzz" distortion guitar pedal, but being indecisive, I wanted to be able to change the type of transistors in the circuit at will.

I found the idea of using a double-pole rotary switch to switch in and out a multitude of different transistor or capacitor configurations, allowing for a highly customizable tone.

Credit to randofo of Instructables.com

However, I was wanting to instead use a thumbwheel as it has more positions and is more readily available, the difference being, they are only single-poled. I don't think this would have an effect on switching out the capacitors as I could easily make one leg common and have the other leg attached to the respective switch position, but because the transistors are active, multi-legged components, I'm not sure of the wiring configuration.

Would it be best to switch out the Emmiter, Collector or the Base? I think I can see a noise-problem occurring by having a bunch of transistors in my circuit where all but one have a base hanging in an open-circuit at any given moment.


texts: should I use 2 SPI devices on Arduino UNO/PRO or 2 I2C devices?

texts:
I am using a microSD breakout board and the accelerometer ADXL345 https://www.sparkfun.com/products/9836.

each one alone works perfectly fine, but once I put both (sharing pins 11,12,13, but with different CS pins) nothing works.

I'm using another sensor with the I2C which is the BMP085: https://www.sparkfun.com/products/11282

The accelerometer also works in I2C, but that requires pull-up resistors when several devices share I2C.

I wanted SPI as it seemed simpler where i can just specify the CS and everything should've worked.

Am I missing something in the SPI case? Is it better to share devices on I2C rather than SPI?


texts: Most electronic component retailers don't have these things. The only place I see them for sale is used Soviet-era Gunn diodes from the former USSR and Eastern Europe. I'm interested in getting one to use a low-power, high frequency oscillator. And I have read about GaN Gunn Diodes that have oscillating frequencies into the Terahertz range. Are the sale of Gunn diodes restricted because of their military applications? What interests me about them is their compact size and the fact that they will automatically start oscillating when a sufficient DC voltage is supplied and do not require any external passive components.


texts: Disconnect circuit after primary circuit detects high volume

texts:
I would like to build a circuit that detects high volume (through a microphone or something) and when it does, it would disconnect another circuit from its power source.

I don't know exactly how high the volume threshold should be yet.

It's a small project I'm working on and I don't have much experience using electronics.

How might I go about doing this?

EDIT: I want the sound that my circuit to detect an instantaneously high volume of a song that is emitted from a stereo. The circuit it shuts down is an electrical device that uses 220 volts, it will be connected to its power cord.


texts: How to calculate resistor values for CFO differential amplifier Op-Amps?

texts:
I know that resistor calculations for current feedback amplifiers is different from their voltage feedback counterparts ( especially in higher frequencies as they have small impedance in inverting input buffer and the feedback resistor should be selected small to avoid impact of stray capacitance). That's why for CFOs one should mostly rely on recommended resistor values in their datasheets.

But in most datasheets, the resistor values are based just on inverting/non-inverting amplifiers and not differential amplifiers (As for AD811). Although I have seen the following formula for arbitrary resistor selection, it is just based on inverting/non-inverting amps and performance is not guaranteed :

Is there any formula/ method like that for resistor value selection in CFO differential op-amps? (except trial and errors!):

ZB= input buffer impedance,ZF1,ZG1: for gain=1 ; ZFN,ZGN=new desired value

For R2/R1=R4/R3:


texts:
I'm confused about how this circuit operates. Here's what I know. Vbias sets transistor Q2 in saturation. The input small-signal vi is applied at the gate of Q1 along with an appropriate DC voltage also at gate of Q1 that isn't shown but is applied when cascode amplifiers are implemented.

Now, if both of these transistors are set in saturation by DC voltages, what's the point of current source I?


texts: Join independent amp grounds to common headphone ground?

texts:
I have mounted a raspberry PI inside an old rotary dial phone.  I put an Adafruit stereo speaker bonnet on the Pi.  It provides 3w to two entirely separate circuits for true stereo separation.  I replaced the mic and speaker in the handset with a pair of 3w speakers, and run the power through the original base <--> handset cord.

It works great!

I would also like to be able to hook it up to a stereo or headphones with a mini jack, instead of using the handset.  I got this rj45-mini adapter, but the pins weren't arranged properly out of the box (because when I rewired the phone, I didn't pay any attention to which pins went where.)

Rather than rewiring the phone and handset again, I want to open up the adapter cable, and cross some wires over to make it work with the rj45 wired the way it is.

I am uncertain, though, if I can do that.  Headphones share a ground, but the signals on this unit have two separate grounds.  Does that matter?

Should this scheme work?

Bonnet L+  ---> Mini Jack Tip
Bonnet R+  ---> Mini Jack ring

Bonnet L-  ---> Mini Jack sleeve (Shared Ground)
Bonnet R-  ---> Mini Jack sleeve (Shared Ground)

I have been trying to dummy up the circuit with alligator clips and stripped wires, and I keep causing the Pi to freeze up.  I don't know if that is because I am not getting the right pins connected or because it won't work even if they are connected.


texts: Are TO220 and DO201 diodes interchangeable?

texts: Schottky diodes seem to come in two packages, TO220 and DO201. DO201 is a common 2-pin that I am used to. But they don't seem to make them for high currents and low voltages, e.g. 30A/35V. Instead I see a lot of TO220 diodes for sale for such currents. I wonder if I can replace a DO201 diode with a TO220 diode and just connect two out of three pins and not change anything else in the schematic? The TO220 ones have higher VRRM, about 100V instead of 35V, but I'm guessing it doesn't matter as long as it is higher. It is for a voltage regulator on the power supply so I am trying to be careful and not to blow anything up.


texts: Power supply design for CPU: Define maximum current needed

texts:
This is something that is troubling me in many of my projects and I would like to know if there is any standard approach to it.

The question is how should I correctly design / dimension my power supplies to be sure that enough current will be available for my CPU.

I am using various packet processors from Marvell and at every one of them they provide, like CPUs from other vendors, two different set of current/power specification.

One set is the TPD (thermal power dissipation), where they say that this numbers should be used for the thermal design. The numbers are measured under nominal voltage and some selected use case.
The second set is the maximum continuous current that can be drawn from the power supply and is given to support the power supply design and selection of power module. These numbers are given using maximum recommended voltage specification for the power rails, at max recommended operation temperature and some extreme use cases.

One could say that the answer to my question is obvious: use the second set of data for correctly selecting the power supply, since this is why they are given for.

But the thing is, these numbers are at maximum recommended voltage (usually +5% of the nominal voltage) and at maximum operation temperature. Both of these conditions are not met at my designs.

Is there any standard approach to this? Should I just use this maximum continuous current specifications when defining the maximum current of my power supplies or should I somehow (how?) at least scale them down to the typical voltage supply?

My concern is not to over-design the power supply, since the numbers between the two sets differ -usually- a lot.


texts: Instrumentation Amplifier Reference Node - Integrator vs Buffer

texts:
When looking at INA topologies (lets take AD8220 for example) I see examples of integrator or buffered resistor dividers used. What are the disadvantages of using an integrator? Both typologies consume 1 op-amp. The only advantage of the buffer seems to be if you want to preserve DC information. If you are only looking at AC signals it seems like the integrator is the way to go with no disadvantages. Am I missing anything? Are there any design challenges with integrator if you are running off a single rail supply with a virtual ground?

Integrator (Datasheet Reference)

Buffer (Reference)


texts: Power inductor's staturation current for buck converter

texts:
Is it correct that when selecting an inductor for a buck converter I should be choosing an inductor with the saturation current higher than the converter's peak current?
How much of a margin should it have?
E.g. is it fine to use an inductor with the saturation current of 1.2A for a buck converter IC with the peak inductor current limit of 800mA?
I'm looking at using this buck IC.


texts:
I found around a couple of damaged "gold coated" probes, after checking the inner wire it happens to be made of cooper, my questions here are simple

1) Why coat the tips if the rest of the probe is just copper?

2) In order to decrease the total resistance of the probes shouldn’t the entire wire be made of gold? (Common sense says that’s a bit expensive)

3) How can a simple gold coat help with measurements?


texts: A question on adding noise and low-pass filer in Ltspice

texts:
I’m planning to implement the following Schmitt-trigger circuit:

(left-click to enlarge)

I made some updates with the great suggestions of jonk in my previous question:Some questions on optimizing a Schmitt trigger to eliminate possible glitches.

But now I have two points bothers me regarding these kind of circuits here:

1-) First of all, I just learned that one can add a noise to a signal as in the following way by using behavioral current:

Above a white noise is added to a 4Vpp 10Hz sinusoid.

But in my circuit the switch causes the input signal so wherever I add this current source I get very weird results. I just want to add around 2Vpp white noise to the inverting input of the comparator(Schmitt-trigger in this case) to see the effects of hysteresis band. How can I establish it in this case? How can I add the noise so that it adds up to the signal at inverting input?

2-) Second might sound a bad question for many of you but lets say I want to block frequencies for the signals arriving to inverting input higher than 900Hz. Would you calculate the cut off frequency just by using R9 and C1? Or R7, R9, R10  should also be taken into account when calculating low pass filter’s cut off effect here? (By the way it seems to me in hysteresis equations the resistors connected to the inverting input should not have effect on hysteresis thresholds)


texts:
can someone explain the following conditions shown in the image:
why condition 1 and condition 2 are there?
In condition 1 they have taken the current as Vm/R1 while in the 2nd condition curren is taken as Vm/(R1+R). why?


texts: Band-pass filter vs. Serial Low-pass+High-pass filter - Is there a difference?

texts:
Is there a difference between a band-pass filter (BPF) and tying a low-pass filter's (LPF) output to the input of a high-pass filter (HPF)?
It seems to me that they should do the same thing---or perhaps they are algebraically equiveilent (are they?).  If not, what is the benefit of using a BPF instead of a serial LPF+HPF?
For example:
Serial LPF+HPF:

Is that effectively the same as a BPF?


texts: trying to run an led off of 4 triple A batteries

texts:
I am trying to run an led off four triple A batteries
It's wired to a button to indicate on.
Is this possible and if so what is the right method
Any help would be appreciated
Thank you.


texts:
I would like to make a circuit that causes an audio delay using discrete components.

I know I can do small phase shifts using an opamp, but I am looking for something in the millisecond or second range.

Is there any way, at least easily, to do this with discrete components?

EDIT: I would like to know this for both the purposes of synchronization as well as reverb and such. This may take two completely different paths, but both paths are applicable to work I will be doing.


texts: Using a MOSFET as a relay in mains-powered circuits

texts:
I am currently planning a small project where I use a Raspberry Pi as a smart home server to switch loads (mainly door openers & lights).
The usual way would be to use a mechanical relay with ratings of 16A & min 230V. I also considered using a solid state relay.
I then had the idea to use a p-channel MOSFET. They are widely available and can switch the required currents & voltages (after consulting the datasheet for electrical specifications and providing proper heat dissipation, of course).
I especially appreciate the absence of the huge currents introduced by the relay coil and the higher switching speed that would make this circuit usable for dimming applications.
Is it possible to use MOSFETs in this kind of application or is its function limited or even forbidden by (German) regulations or the laws of physics?
I would really appreciate your opinion/help on this.
Here is the device I am planning to use : IXTH16P60P


texts: High Q peak in frequency response means what in time domain?

texts:
Reading Linear Circuit Transfer Functions and one of the graphs got me curious.

I've recreated the circuit (series RLC) and plotted the frequency response for a Q of 7.

We have a peak of ~16.3 dB when Q is 7 @ 10Khz.

Can this value be used (16.3 dB) to accurately predict something in the time domain - such as the value of Q or how long the oscillatory decay would take,  the amplitude of the oscillations etc.. ?

Added in case its relevent


texts: Doubling the voltage to a capacitor doubles the stored charge but does not make it charge slower. Why not?

texts:
This is a slightly theoretical question.

If you charge a capacitor from say a 3V battery you get Q charge in T seconds.
If you double the voltage to 6V you get 2Q charge also in T seconds.

My question is, why doesn't T change? If you think of a capacitor like a room and charge like people, if you want to fit in twice as many people, surely you need more time?

I am thinking of the formula Q1 = Q0e^-(t/RC).
Is there something I am missing?


texts: In-Series current source equation solving

texts: I'm an electronic newbie, i was simulating this circuit on LtSpice and i found the result below, i tried with different methods (Kirchhoff's laws, Millman theorem, superposition) but i failed to have the right equation relating I to the other current source (amplitude is 0.00078 A) in function of the 3 capacitors. I can't doubt LTSpice results, so i assumed my calculations were wrong.


texts: ice40-hx8k: Weird input pin behaviour regarding digital HI voltage level

texts:
I am playing around with a FPGA dev board featuring the Lattice ICE40-HX8K using the yosys/icestorm OpenSource toolchain, and I have noticed very odd behaviour my input pins are showing:

When I use a certain pin as output, the voltage level for a digital "high" is 1.2V
When I use the exact same pin as input, applying 1.2V to them is not enough for the FPGA to register this as a high, it is read as a digital "low".
Only when I use the 3.3V rail from my dev board, the input is actually registered as a digital "high".

Why is this the case? I would expect that if the output "high" is 1.2V, that the input would also work in a similar way?

If that matters, I am using a SB_IO block to implement bi-directional GPIO ports:

SB_IO #(
    .PIN_TYPE(6'b 1010_01),
    .PULLUP(1'b 0)
) pins [15:0] (
    .PACKAGE_PIN(gpio_pins),
    .OUTPUT_ENABLE(pin_direction),
    .D_OUT_0(write_data),
    .D_IN_0(read)
);


texts: How can a single CAN transreceiver be connected to two types of connectors?

texts: I would like to connect a CAN transreceiver to the db9 connector and at the same time CAN line has to go another circuit. Is it possible to use only single transreceiver and have both access from connector and other circuit's connector?


texts: Derivation of transcondutance gm using Taylor expansion

texts:
From the fist page of the lecture, there is a derivation of transconductance of MOSFET using Taylor expansion.

As seen from the picture bellow, drain current is a function of vGS, vDS and vBS.
iD is a function of three variables here. However, in Taylor expansion around DC operating point (VGS, VDS, VBS) the author didn't take vDS, vBS as variables.
So iD is just like a function of vGS only.

I am wondering why they can do that?
This seems to be wrong to me.
Could anyone confirm?


texts:
I'm using STM32L476RT. I've got encoders based on TLE4946-2K. I can't get it to work. I'm attaching my code and config below. I'm kind of stuck at this point - I tried to lower the voltage by divide it with resistors, but I't didn't work.
Code:
static void MX_TIM5_Init(void)
{

  /* USER CODE BEGIN TIM5_Init 0 */

  /* USER CODE END TIM5_Init 0 */

  LL_TIM_InitTypeDef TIM_InitStruct = {0};

  LL_GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* Peripheral clock enable */
  LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM5);

  LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOA);
  /**TIM5 GPIO Configuration
  PA0   ------> TIM5_CH1
  PA1   ------> TIM5_CH2
  */
  GPIO_InitStruct.Pin = ENC1A_Pin|ENC1B_Pin;
  GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
  GPIO_InitStruct.Alternate = LL_GPIO_AF_2;
  LL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  /* USER CODE BEGIN TIM5_Init 1 */

  /* USER CODE END TIM5_Init 1 */
  TIM_InitStruct.Prescaler = 0;
  TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;
  TIM_InitStruct.Autoreload = 200;
  TIM_InitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
  LL_TIM_Init(TIM5, &TIM_InitStruct);
  LL_TIM_DisableARRPreload(TIM5);
  LL_TIM_SetEncoderMode(TIM5, LL_TIM_ENCODERMODE_X4_TI12);
  LL_TIM_IC_SetActiveInput(TIM5, LL_TIM_CHANNEL_CH1, LL_TIM_ACTIVEINPUT_DIRECTTI);
  LL_TIM_IC_SetPrescaler(TIM5, LL_TIM_CHANNEL_CH1, LL_TIM_ICPSC_DIV1);
  LL_TIM_IC_SetFilter(TIM5, LL_TIM_CHANNEL_CH1, LL_TIM_IC_FILTER_FDIV32_N8);
  LL_TIM_IC_SetPolarity(TIM5, LL_TIM_CHANNEL_CH1, LL_TIM_IC_POLARITY_RISING);
  LL_TIM_IC_SetActiveInput(TIM5, LL_TIM_CHANNEL_CH2, LL_TIM_ACTIVEINPUT_DIRECTTI);
  LL_TIM_IC_SetPrescaler(TIM5, LL_TIM_CHANNEL_CH2, LL_TIM_ICPSC_DIV1);
  LL_TIM_IC_SetFilter(TIM5, LL_TIM_CHANNEL_CH2, LL_TIM_IC_FILTER_FDIV32_N8);
  LL_TIM_IC_SetPolarity(TIM5, LL_TIM_CHANNEL_CH2, LL_TIM_IC_POLARITY_RISING);
  LL_TIM_SetTriggerOutput(TIM5, LL_TIM_TRGO_RESET);
  LL_TIM_DisableMasterSlaveMode(TIM5);
  /* USER CODE BEGIN TIM5_Init 2 */

  /* USER CODE END TIM5_Init 2 */

}

I'm checking CNT value with debugger - 0 change. Checking it with if statement - 0 effect.
if(TIM5->CNT!=0)
    {
        LED_ON(LED_TX);
    }

Below is the signal from encoder:

Both Encoder signals are connected to uC pin with 0R resistor in series. On the encoder side there is 10k pull-up resistor on A and B signal.

List item


texts: A little device to control current flows

texts:
I would like to have some advice for constructing a little device.
The main purpose is to be able to connect 2 Li-Po batteries in parallel and discharge them in the same fashion throughout the circuit.

To be specific, I want the current flow through each battery to be exactly the same at any time.

First, I would like to do it with two batteries which have the same specifications.

I have thought about this problem and I imagine a small device with two current sensors and digitally controlled potentiometers connected to a microcontroller.

But I haven't been able to find digitally controlled MILLI-ohm potentiometer (0 to 100 mOhm with a step of 1 mOhm). I am also dealing with current flow up to 60A.

My second goal is to achieve this with 2 batteries of different capacities. The 2 current flows will have to be controlled so as they are proportional to the battery capacities.

Thanks for your attention!


texts:
Good morning. During the experiment with the sound sensor, a question arises, so I ask.
 The output of the sensor itself varies from the same sound.
When one sensor is +ΔV = 220mV, the other sensor changes to +ΔV = 20mV.
When experimenting with two boards, although there was a slight difference, it changed to almost the same trend.
 Is there any way to correct or fix this?

Circuit and waveform. The yellow waveform is the noise sensor output. The sound is a 3kHz sine wave using a mobile phone frequency generator application.
 I used a different board and the experimental method is the same. If dB was measured using a tester, 128 dB was measured. Can the sensor output itself be circuitly compensated? Or do you need to change the sensor?
In the above waveform, one sensor has changed by +Δ60mV and the other sensor has changed by +Δ250mV.


texts: choosing diodes for a passive ethernet hub

texts: I found several guidelines for building a passive ethernet hub, mostly quoting this. The guide specifies which diodes to use, but I cannot find them anywhere. What are the parameters I should search for to find a suitable replacement?


texts: What is the difference between SBC & Development board?

texts:
I was searching for an dev board with RS 232 interface and with capability to implement ethernet interface as well(either on same board or using accessory board) then I came across

Single Board Computer SBC 44B

http://www.modtronix.com/product_info.php?cPath=106_115&products_id=109

it has been designed for PIC controllers( 44pin )

Whats the difference between Single Board Computer and a Development kit? do the SBC come with ICs included inside them or the user has to buy the ICs separately..?

would this board with an accessory ethernet board fulfill my requirement..?


texts: What is the purpose of this NMOS transistor on an I/O pin?

texts:
I have the circuit structure that looks as shown below. An I/O signal, sigA, (active low) is driving the P1 port on unit U1. An NMOS transistor's drain is connected to this signal with the gate/source/bulk connected to ground. How does this NMOS transistor work and what is its purpose?

The gate/source are connected to ground, so I am not sure how current will flow through (i.e., what condition will make M1 turn on). It looks like a pull down device, but since sigA is active low, it doesn't make sense to me.

simulate this circuit – Schematic created using CircuitLab


texts:
I'm working on a hardware random number generator based on the below design. It uses two reverse P-N junctions to create avalanche noise.

I was looking at the circuit with my oscilloscope, and I found that the unamplified noise from the two junctions seems HIGHLY correlated. (Enough entropy, however, seems to be added/amplified by the rest of the circuit so the bitstreams appear uncorrelated.)

So, is avalanche noise not the self-contained random process I thought it was, but something highly sensitive to external forces such as minor fluctuations on the rail? Or, have I’ve built a system that is amplifying something other than avalanche noise?


texts: Verilog design decision - where should my counter be located?

texts:
I am coding in Verilog a typical count-to-n-then-reset-to-0 counter. My module has the logic to increment and reset the counter.

My issue is that I don't know where the counter itself should be defined.

I could pass the counter (as inout?) to the module. That's ok, but the counter still has to be defined somewhere so it this doesn't do me any good.

Nothing else except this module should touch the counter, so I'd like to have the counter created within this module, and not passed in or out.

Is this reasonably standard, and if so, will someone point to a reference please on how to instantiate the counter?

(I'm on day 2 of Verilog, so be afraid, heh)

EDIT - Here's my code. As far as I can tell, it works. I haven't implemented DIR == REVERSE yet. Couple of interesting gotchas. The (now commented out) STEPPER=0 line was causing an error in a schematic; it thought that STEPPER was tied to ground as well as other logic.

Also, I use = instead of <= in some places involving counter - I was getting timing problems (I suppose.) The procedural assignment removed (hid?) the problem.

module cam(
    input [7:0] DIVISOR,
    input DIR,
    input SPINDLE,
    output reg STEPPER
    );

     parameter FORWARD = 1'b1;
     parameter REVERSE = !FORWARD;

     reg[7:0] counter = 0;

    always @(posedge SPINDLE) begin
    //  STEPPER = 0;
        if (DIR == FORWARD) begin
            counter = counter + 1;
            if (counter == DIVISOR) counter = 0;
            end
        else begin
        //  counter <= counter - 1;
        //  if (counter == (-1)) counter <= DIVISOR;
            end
    end

    always @(negedge SPINDLE) begin
        STEPPER = (counter == 0) ? 1 : 0;
    end

endmodule


texts:
ar 29 22:12:14 stevendesktop kernel: [ 4265.290019] usb 5-1: device descriptor read/64, error -62
Mar 29 22:12:15 stevendesktop kernel: [ 4265.572782] usb 5-1: new low speed USB device using ohci_hcd and address 52
Mar 29 22:12:15 stevendesktop kernel: [ 4265.990018] usb 5-1: device not accepting address 52, error -62
Mar 29 22:12:15 stevendesktop kernel: [ 4266.160020] usb 5-1: new low speed USB device using ohci_hcd and address 53
Mar 29 22:12:16 stevendesktop kernel: [ 4266.580018] usb 5-1: device not accepting address 53, error -62
Mar 29 22:12:16 stevendesktop kernel: [ 4266.580032] hub 5-0:1.0: unable to enumerate USB device on port 1

These are the messages that appear in the logs when I connect my avr. What could of caused these errors.

pin D-
I  have D- connected to a 68R resistor in series. The other end goes to my avr. I wired a 1.5K pull in parallel to the 68ohm resistor. A zener 0.5w 3.6v parallel to pin 2 of the type A socket.

pin D+
Wires in series to a 68ohm resistor. The other end to avr. A zener in parallel to the D+ pin. Also wired to int0 pin.

It's self powered at the moment so therefore I don't need to connect the 5v and gnd pins right?

When I connected the D+ pin to my scope I could see a square wave being generated. I tested the frequency it's bang on 16MHZ. Though I did notice occasionally it went down to 15.98.

So what could be wrong?


texts: Current flows from the source towards the sink

texts:
I happened upon the following schematic:

simulate this circuit – Schematic created using CircuitLab
It's supposed to reduce the max.voltage between the GPIO input pin and the current source to 3.3V, since 5V * (10K/(10K+5K)) = 3.3V. The thing is - 3.3V is the voltage over the 10K resistor and 1.7V is the voltage over the 5K one. As long as the current flows from the source to the sink, the voltage between the source and the GPIO pin should be 1.7V - what am I missing?


texts:
I have a Li-ion battery that I pulled from a MS Band 2. It comes with a protection chip, which I am having trouble with.

The chip has 4 accessible pins, labeled "P+, K, T, P-". I've tried every combination of those 4 pins across an LED and never got any current. I am able to get power if I connect straight to the battery's terminals (B+, B-). I also discovered that I could get power out of P+ and the battery's negative terminal (B-). I've triple checked my solder, so it isn't a connection issue.

At this point, I don't know how to get power out of the protection circuit safely, nor how to charge the battery. I have yet to try hooking up K or T to an I2C, but I don't think that would help here. I know that T is most likely the temperature resistor, but I don't know how to wire that up. I don't know (and couldn't find any info on) what the K terminal is.

Please help! Thanks.


texts: Calculate 12v Battery Runtime When Using Only 3.6v

texts: What is the best way to calculate the runtime of a 12v battery if I am using 12 - 1 watt LEDs using 320mA @ 3.6v? Can someone post the formula?


texts: What is the average energy loss if a booster connected to power source but without a load?

texts:
I have lipo battery 4.2V 3000mAh,
booster simulation ti power bench TPS55340QRTERQ1 ‑ 2.8V-4.2V to 8.00V @ 1.5A

Vin 2.8V - 4.2V

Vout 8v

Iout 1.5A

simulation details

efficiency 84%
1.43Mhz
duty 65%
total power dissipation 2.34W
Iin avg ic 5.13A

what if load is not connected, but booster is connected to battery, will battery drain over the time?
what would be the current consumption of booster circuit if load is not connected? how to determine this?


texts: Does a pickup microphone work in space (vacuum)?

texts:
Of course in space there is no sound transmitted via air, so there is no air-borne sound, but there is structure borne sound. This sound can be recorded with a pickup microphone, but do pickup microphones need air to work as well?

Considering that a pickup is really just recording the surface waves, but if it is mounted on the same surface with the same vibrations, it in theory should measure nothing, correct? My assumption is that pickups measure the difference between the air damped surrounding and the material itself, so it should not work in vaccum as there is nothing to damp against.

The other theory I have is that it depends on the mounting of the microphone. So if I fully connect it in a sphere around a certain point, it would measure the surface wave within this mounting area, but wouldn't that limit the measurement to sound waves smaller than the mounting area (higher frequencies)?


texts: Can an oil bath replace a heatsink and fan?

texts: I have a high power LED (100W) that needs attaching to a heatsink (and presumably fan). Could I just immerse it in an insulating fluid and use natural convection/conduction to cool it?


texts: What is the name of this coding algorithm

texts:
as a school assignment we were given simple graph of FSM and the task is to design digital circuit described by this graph. Everything is fine I just followed my notes. While encoding the states I used codin we have been taught, but the problem is I cannot find this algorithm anywhere.

On left is transfer table - from state 1 go to state 2 when receiving signal A. On right is the encoded table. The column W is sum of appearances of each state in transfer table - state 2 appears 3 times, state 3 once etc.

The coding is defined in way that state with biggest W has least ones in codes - state 2 is encoded with 3 zeros, state 1 is encoded with 2 ones.  Does anybody know name of this coding? It's not one-hot, neither it's binary encoding.


texts: Doubts about a differential negative resistance oscillator

texts:
let's consider this kind of differential negative resistance oscillator:

The output of this circuit is VA - VB. My book says the following sentence:

  From a quick analysis of the circuit it can be observed that the function VA is in counterphase with VB. This means that it is possible to make an equivalent half circuit.

I know that the output of a common source stage is in counterphase with the input signal, so from this point of view I understand this sentence. But:

in this case the gates are not externally excited by a differential signal. So, how can we conclude that VA = - VB?
since there is not excitation, how can the circuit physically reach that situation? For instance:

1) noise determines a voltage signal on A
2) that signal is amplified by M2 and we see it with 180° phase shift on B
3) the signal on B is amplified by M1 and we see it with 180° phase shift on A

etc

it seems to me that the signals on A and B are in counterphase, but with different amplitudes, since each one is the amplification of the other one, and so the network is not excited in an antisymmetrical way.


texts: What is the fraction of current taken by this resistor?

texts:
A network of resistors has a pair of input terminals AB connected to a DC supply and a pair of output terminals CD connected to a load resistor of 120 Ohm. The resistances of the network are AC=DB=180 Ohm and AD=BC=80 Ohm.

What is the ratio of the current in the load resistor to that taken from the supply?

NB: Labels marked in red are for the mesh analysis I've made!

simulate this circuit – Schematic created using CircuitLab

The question is probably not very hard, however I am trying to find the answer by not applying Norton's or Thevenin's theorems, but only Kirchhof's laws and therefore Nodal and Mesh analysis.

What I've tried so far:

delta-star transformation With that it's easier to find the total resistance, but that's it.

simulate this circuit

nodal analysis ended up with (with reference to the initial diagram)

$$\frac{C-A}{180} - \frac{B-C}{80} = \frac{D-C}{120}$$
$$\frac{D-C}{120} = \frac{B-D}{180} - \frac{D-A}{80}$$

It seems be a deadlock with to many unknown values.

Finally mesh analysis, after solving simultaneous equations assuming current to flow clockwise in every closed loop (DC source connected in between points A and B) I've got following.
$$I_{1} = \frac{V}{120}, I_{2} = \frac{V}{200}, I_{3} = \frac{V}{300}$$

UPD: Numerical answer for this question is (negative direction) 5 and 0.2 (for positive direction of current flowing), but the most important is how this answer was derived and ultimately this is my question.

Thanks in advance!


texts: Adding an ADC, what happens to input impedance

texts: quick question. What happens (in general) to my entry impedance when I add an ADC into my circuit? Is this independent of the rest of my circuit? If no, this is my circuit


texts:
I am trying to program PSoC5 CY8C5566AXI-061 on a custom made PCB using 5pin connector, with miniprog3  (active protocol: SWD). The CY8C5566AXI-061 is detected correctly in PSoC Creator. In PSoC programmer it's detected as CY8C5586AXI-061.

The board is powered from external source.

Anyways, when I try to program it from PSoC Creator i get the error (same happens from  PSoC Programmer):

Error: dbg.M0023: There was an error while programming the device: PSoC Programmer
       reported error (100 - FAILED! SWD respond packet contains Failed status!)

(I tried to lower the clock speed but nothing changed)

The settings from PSoC Creator are:

Active Protocol: SWD
Clock speed: 1.6MHz
Power: External
Acquire mode: Reset
Connector: 5pin

The settings from PSoC Programmer are:

Programmer: MiniProg3
Programming mode: Reset
Auto detection: OFF
Protocol: SWD
Voltage: 5V
Connector: 5p
Clock Speed: 1.5MHz
Device: CY8C5566AXI-061

The pin connectios from MiniProg3 to PSOC5 (on the custom made PCB) are:

VTARG - VDDDIO1
GND - GND
XRES - XRES (on pin 15)
SCLK - P1[1] (on pin 21)
SDAT - P1[0] (on pin 20)

VDDIO0, VDDIO1, VDDIO2, VDDIO3, VTARG, VDDD, VDDA are all conected together to 5V.
VSSD, VSSA are connected together to ground.
The two VCCD pins are connected together with 1uF capacitor.
VCCA is connected with 1uF capacitor to ground.

I made the PCB again (now the external supply is 3.3V) and I get the same error. I am struggling with this issue since about 1 week :(


texts:
There is no dedicated GND in the classical Ethernet 8P8C ("RJ45") pinout.[1]

Why does the Ethernet spec not include a ground, unlike many other cable types used for interconnecting devices that may both have its independent power source as well, e.g. RS-232 or USB?


texts: Is there a more efficient alternative to pull down resistors?

texts:
I am building a LED spinner circuit and I am at the point of optimizing it. The whole circuit itself only draws about 10-20mA max. I was today looking at this part of the circuit:

Now as you can see, when my switch is at position 5, it turns the circuit off. But, now when my circuit is off, there is still current flowing through the pull down resistor, draining the battery. I know this is a very small current, but I was wondering if there was a way to make this switch so that it does not draw any current when switched off.

Edit:
I should have maybe put the whole circuit in.


texts:
I found this design on internet:

It is said to be a regulated power supply with variable DC output 5-15 V, 400 mA. My first question: Is this design around 7805 correct? I am asking because it doesn't correspond to the the 7805 datasheet:

What I miss there is R1. I expect there actually is some resistor inside 7805, so R1 is not required to let it work. But we don't know its value so we are unable to say what will be the exact output voltage when using the design on the first image. Am I right?

Then I am confused about voltages. The transformer's output on the above picture is 12V, then 2 diodes take 0.7V each, then 7805 takes another 2V. So we've got only 8.6V left for the output. My second question goes here: How can this give 15 Volt output? (15V 400mA is said to be maximum output of this design by the author.) Is it normally legal and working, does it mean that we can have any output voltage from any legal input voltage using these IC regulators?

And my third question: Isn't LM317 generally more suitable for adjustable voltage supplies of this kind than 7805? The 7805 seems to me like a LM317 with those R1 and R2 added inside. Also, LM317 has got a lower dropout voltage than 7805 and can give a higher current.

Update:

I found the following information in National Semiconductor's LM340/LM78XX datasheet:

RAISING THE OUTPUT VOLTAGE ABOVE THE INPUT VOLTAGE
Since the output of the device does not sink current, forcing
the output high can cause damage to internal low current
paths in a manner similar to that just described in the “Shorting
the Regulator Input” section.


texts: Passing cables through a thermally insulated wall

texts:
I am constructing a temperature control chamber. Of course, thermal insulation, is key in the development of the chamber. The idea is to insert different electronic circuits inside and study their response in temperature.

The problem which we are dealing with right now, is to decide how the cables will pass to the electronics inside the chamber to the outside. Naturally, the idea is to do this passage with the least possible insulation lost. I was thinking about a rubber grommet, or something that will adapt its shape to what´s passing through.

What is a good way to route cables through insulation?


texts:
I'm unsure how to calcuate the feedback factor here. It's a voltage / current, so it's a resistor value, but what do you do when the values aren't from the same source? ie. it's \$V_f\$ and \$I_o\$

Here's the diagram:

When you turn off \$I_f\$, what actually happens?

Thanks


texts: Can I get the type of clamps that are utilized by the Peak DCA55 Semiconductor analyzer for a multimeter?

texts: I love how on my DCA55 it has push button with clamps that I can use to clamp down on the component I'm testing. Is there a place I might find this attachment for my multimeter? Also, what are the names of the plugs/and,or attachments that go to a multimeter named? (I heard the name banana plug while Googling, is this correct?)


texts: Gain-Phase measurement without dedicated equipment

texts:
I was wondering if it is possible to make Gain-Phase measurements without dedicated equipment like the venerable HP4194A or a more modern Bode 100.

As far as I understand, a Gain-Phase analyser is a device used to measure the transfer function of a DUT (Device Under Test) like this:

LF-OUT generates a sinusoidal signal, R measures the input and T measures the transmitted signal. Computing T/R (taking care of magnitude and phase, of course) one can computed the transfer function.

If I don’t have such a dedicated equipment, I thought I can make the same measurement simply with a function generator and an oscilloscope like in the following picture:

Then I can compute the transfer function as Ch2/Ch1 (taking care of magnitude and phase, of course) Would this setup replace a Gain-Phase analyser? Or am I missing something?

Many thanks in advance!


texts:
I am involved in a project on gpslogging of free-ranging animals. In this project, we need gpsloggers to be able to run without any maintenance for about one month, whereas those I have found so far have an internal battery to run for about 24 hours. My initial idea was to just use a standard USB battery bank, but they seems to be "too smart" for what I need. Those I have tried so far, turn them self off when the current drawn is too low. So I think I need to build or modify something myself as the GPSs I've tried so far, draws current until their internal battery is charged and then the battery bank will turn it self off and not be available next time it is needed.

As far as I have understood from googling around a bit, the standard way of using LiPO batteries to get 5V is to connect cells in parallel to get the capacity that is needed and then using a step-up circuit to get 5V. As I want as high as possible energy/volume ratio, would it be better to use two cells in series and the regulate the voltage down? I know LiPO are quite sensitive beasts, so then I would also need the appropriate charging circuit. (although, in this scenario, it would not be impossible to reconnect the cells when charging)

Any advices on how to make this battery backup system? Should I look into some other types of chemistry for the cells? I need 10-20Ah total capacity, low current draw over long time and a good power/volume ratio. Also, if I keep using LiPO, are there any specific type of cells that are recommended? Should I use 20Ah cells or would it be better to use several smaller cells in parallel?


texts: Superheterodyne receiver with voltage controlled oscillator

texts:
I'm new in electronics and I want to create a FM receiver that performs a product of the received  RF signal and a local signal (the local signal is also frequency modulated with a Voltage Controlled Oscillator). I was thinking that a voltage controlled tunning receiver circuit could work. If true, where can I find a circuit diagram or in what kind of device could I find something that does what I want?

More details as requested: I'm trying to do a Frequency modulated continuous wave radar. No after demodulation is needed, the product signal will be sampled to a computer. The difference with any normal FM receiver is that I want my local oscillator to be a VCO. The band would be around 800Mhz.


texts:
I've been reading more about proper grounding techniques and using ground planes.

From what I've read, ground planes provide a large capacitance with adjacent layers, faster heat dissipation, and reduce ground inductance.

The one area I'm particularly interested in is the stray/parasitic capacitance created. As I understand it, this is beneficial for power traces but potentially detrimental to signal lines.

I've read a few suggestions about where to place solid ground planes, and I was wondering if these are good recommendations to follow and what would constitute an exception to these suggestions:

Keep ground plane under power traces/planes.
Remove ground plane from signal lines, particularly high speed lines or any line susceptible to stray capacitance.
Use ground guard rings appropriately: Surrounding high impedance lines with a low impedance ring.
Use local ground planes (same goes for power lines) for IC's/sub-systems, then tie all grounds to the global ground plane at 1 point, preferably near the same place the local ground and local power lines meet.
Try to keep the ground plane as uniform/solid as possible.

Are there other suggestions I should take into consideration while designing the ground/power of a PCB? Is it typical to design power/ground layout first, signal layouts first, or are these done together?

I also have a few question about #4 and local planes:

I would imagine connecting local ground planes to the global ground plane might involve using vias. I've seen suggestions where multiple small vias (all in roughly the same location) are used. Is this recommended over a single larger via?
Should I keep global ground/power planes beneath local planes?


texts: Identify the specifications of a relay from the writings on it

texts:
I got this relay from a scrap electronic part. Please tell me how to read its specification from the writings on it.

NOTE: Its the snaps of two sides of the same relay, not the pictures of two different relays.


texts: I'm wanting to buy this IR camera but it says it has RCA output. Is it possible to read this into an mbed without external components(aside from a 12v power source)? If so, how?


texts: Is this opto input current sized wrong and can it have such symptoms?

texts:
I have been using 4N26 opto for some time for a trigger input of a module. Vin is fixed 40Hz 0..5V pulse with %50 duty cycle. OUT goes to trigger of a module.

Below is the schematics:

Among thousands of triggering, I'm observing false triggering once in each ten minutes. Since it is very hard to catch that time. I'm suspicious of the opto. Im saying false triggering but Im at the moment not sure since it is hard to catch whether this is really due to pulse trigger problem.

But I noticed that the opto's LED current (If) in my circuit is 8.5mA and Ic for the opto is 5.5mA. But the datasheet gives CTR>20%. CTR = Ic/If

So I guess I designed this thing wrong. I think If should have been at least 5.5*(100/20)= 28mA. Is that correct?

My question is:

Can this be the reason for this random false triggering? Would that be a symptom of an opto if the CTR is drifting? And would replacing 4N26 with 4N35/36 be a remedy? Since 4N35 has CTR>100%


texts: Globlal Variable Problem: Pic18f4550 and Pickit3 Debugging

texts:
I'm working on a project which includes the usage of the A/D converter module in the micro-controller (pic18f4550). I haven't had any problems in the past with the micro-controller using a pickit3 programmer for the debugging process.

The problem comes when I'm in the debugging process since I know that the value of the ADC converter can the result be storage in ADRESH in my case (Left Justify), after that I want to save this result in a simple variable,when I'm doing this process the result of ADC converter isn't saved properly giving a rare result.

The following code was implemented, also I've done  a video to reproduce the problem.

#include "fuses.h"
#include <stdio.h>
#include <adc.h>
#include <p18f4550.h>
#include <delays.h>

int Canal0,dato1,dato2;
#define  Time Delay10KTCYx(60)

void main(void)

{

TRISA=0XFF;             //PORTA INPUTS
TRISB=0xFF;             //PORTB OUTPUTS
TRISC=0X00;
TRISD=0x00;             //PORTB OUTPUTS
PORTC=0x00;
PORTD=0x00;
PORTB=0x00;             //CLEAN PORTB

 //ADC Configs
ADCON1=0b00001011;      //  Canales AN0,AN1,AN2,AN3 ADCON1:|0|0|VSS(0)|VDD(0)|AN3(1)|AN2(0)|AN1(1)|AN0(1)|
                        //  VSS,VDD 5v / 2^8 = 20mV por numero osea que para 100 = 20mV*1.953125~1.96
ADCON2=0b00011010;      //  ADCON2: ADFM Left justified(0)|-|6 TAD (0)|6 TAD(1)|6 TAD (1)|FOSC32(0)|FOSC32(1)|FOSC32(0)|
/*  . . .ADRESH . . : . . ADRESL. . .
    7 6 5 4 3 2 1 0 : 7 6 5 4 3 2 1 0
    X X X X X X X X . X X . . . . . . <-Left Justified
    . . . . . . X X . X X X X X X X X <-Right Justified
 */
ADCON0=0b00000000;      //  |-|-|CHS3(0)|CHS2(0)| CHS1 (0)| CHS0(0)| GO/DONE | ADON (0) AD DISABLED.
//when adon=1 , go_done 1 = A/D conversion in progress 0 = A/D Idle
ADCON0bits.ADON = 0x01;    //Enable A/D module

while(1)
{
    Canal0=0;
    //blinker();          //STATUS
    ADCON0bits.ADON = 0x01;//Enable A/D module
    SetChanADC(ADC_CH0);  //Seleciono canal.
    Delay10TCYx(1);
    ConvertADC();
    while(BusyADC()==1){}
    dato0=ReadADC();
    Delay10TCYx(1);

    SetChanADC(ADC_CH1);  //Seleciono canal.
    Delay10TCYx(1);
    ConvertADC();
    while(BusyADC()==1){}
    dato1=ReadADC();
    Delay10TCYx(1);

    SetChanADC(ADC_CH2);  //Seleciono canal.
    Delay10TCYx(1);
    ConvertADC();
    while(BusyADC()==1){}
    dato2=ReadADC();
    Delay10TCYx(1);

}

}

What could be the problem ? if the adc converter module is configured ok, and the reading process is ok, maybe the problem is the data type.

    SetChanADC(ADC_CH0);  //Channel
    Delay10TCYx(1);
    ConvertADC();          //Begin convertion
    while(BusyADC()==1){}  //Convertion in progress.
    dato2=ReadADC();       //Move the adresh result to the variable. unsigned int
    Delay10TCYx(1);

The video is :  here


texts: Rocker switch to power supply with unused terminal

texts:
Fairly new to the whole field, so please go easy if this is a stupid question.

I was digging into the details of my 3d printer's PSU the other night to find out how it connected to mains, and I was rather surprised by the outcome. The power cord connects to a C13 socket, which runs the live wire to an LED rocker switch and through it to the PSU's L terminal. The neutral and earth wires run directly to the PSU. But the ground terminal on the switch isn't connected to anything. I'm a little confused about how this works, though I presume it has something to do with how AC circuits work differently from DC ones. I was expecting that the neutral would be connected to the ground terminal on the switch and to the PSU. If the ground terminal is required for a return path for a complete circuit, what works differently in an AC circuit that means it isn't? And if it's not required for either type, why is it there at all?


texts: Feedback on astable 555 timer circuit to control MAC valve for turbo control

texts:
I have some questions and wanted to get feedback on this circuit I have put together.  Basically to see if there is something I missed or obvious that I should change or should have designed differently.

I have the valve running at around 20Hz and with a 100k POT I can adjust the duty cycle from about 6-88% which is outside of the effective range that the valve actual functions (~14-78%).  I have soldered this together on a breadboard and have it running in my S10 and have not ran into any issues yet.  So although they say "if its not broke dont fix it" I would like to learn from my design mistakes and try to build a better device.  Down the road I would like to change this from an open loop to a closed loop setup and swap out the 555 for an Arduino and add a MAP sensor to read a value in and use a PID loop to actually target a boost pressure and not just a duty cycle.

So these are the questions/concerns I have.

Voltage Regulator:
I used a 7805 for the 5v regulator due to its popularity.  Is this an acceptable choice in an automotive environment?

MAC Valve Control:
The MOSFET I chose is the FQP30N60L and chose that just because I have a lot of them from some of my Arduino projects and the fact that it works at logic level.  I know it is much larger than I need since the MAC valve I am controlling only pulls 5.4 watts and the MOSFET is rated for 30 amps.  Is there an issue with running an over sized MOSFET in my application?

Power Filtering:
The C1 and C2 values on each side of the voltage regulator I got from the datasheet for the 7805.  I am not sure if there is a reason for me to change these values or not.

The last question 2 questions I have are about the resistors from the 555 output (pin3) to the gate of the MOSFET.  Do I need a pull down resistor in this scenario?  I have only used these in the past on Arduino projects where I wanted to control a floating input pin. I had a coworker who deals with electronics suggest it to me. Is it necessary because the original circuit I tested in my S10 did not have this and it seemed to work fine.

Also is the 1K resistor that is in series needed to just limit the current from the 555 timers output to the gate?  Is it necessary because the original circuit I tested in my S10 did not have this and it seemed to work fine.

I have attached a picture of the schematic.

Thank you everyone for your time and input!


texts:
I'd like to drive an Si5350 with a MEMS oscillator instead of a crystal for environmental robustness purposes. The Si5350 FAQ says that a CMOS input may be used instead of a crystal so long as the input does not exceed 1 Vpp. The MEMS oscillators are only available in 2.5V - 3.3V outputs.
Is a voltage divider an acceptable means of reducing the input reference, or is there a better solution?


texts:
Why should we modify the voltage source value if the resistor is connected with it directly?i mean,there are two different circuit below ,and their corresponding equivalent circuit.

As we can see,after equivalizing these circuit,we don't modify the voltage source of the first circuit,but we do modify the voltage source of the second circuit.i want to ask why,why should we modify the voltage source value if the resistor is connected with it directly?


texts: Ground plane for a buck boost regulator circuit

texts:
I have made this circuit using TPS63031:

Here is the board file:

I have closely followed the layout recommendations given in the datasheet:

Circuit is a little different because I am using fixed output version.

My question is: Should I make a ground plane on the bottom layer? If yes, should I make it in whole area or just same as that in top layer i.e. bottom half of the board?


texts: Signal Transformer Characterization for SPICE

texts:
I would like to capture the dynamics of a signal transformer (make a good model of it for spice) . I can characterize the transformer as a band pass filter with a gain, or use the built in parameterized transformers in spice.  By parameterized, I mean a transformer model with inductance, mutual inductance, [bulk] capacatance, and series resistance. Since most signal transformers on the market don't have much information on how there built or what kind of inductance they have, the only way to design with one is to buy one and model it.

One of the problems I'm having is most signal transformers also have some kind of ferrous materials in them, how does this affect the inductance of the transformer? Will it affect my parameterization model, especially the inductance value? If I remember right the ferrous material also has some nonlinear characteristics from saturation and also when the magnetic field crosses zero. How would I model that in spice? Are there better ways to design with signal transformers? In my design I need to consider the bandwidth of the transformer, not just one singular frequency.


texts:
I get these errors in a simulation in HSPICE and I don't know why:

model name is missing            tokin number=   4
difficulty in reading input

Here is are some lines of my net list:

QQ1 15 14 1 TIP42C
D1 7 8 1N4148
QQ3 9 8 11 BD140

And some lines of the model descriptions:

*BC327
.MODEL BC327 PNP (IS=0.230P NF=1.000 BF=504.327 VAF=26.000 IKF=0.780 .....
*BD140
.MODEL Qbd140 pnp
+IS=1e-09 BF=650.842 NF=0.85 VAF=10....
*1N4148
.model D1N4148 D (IS=0.1PA, RS=16 CJO=2PF TT=12N BV=100 IBV=0.1PA)....

There is a weird thing in BD140 and 1n4148 model description. Why in the model description the correcponding prefix is put again? Or is it the case that BC327 model description should have had the prefix? What is the "token number" by the way?
Thanks


texts: Op-amp differentiator and integrator circuit: resistor and capacitor values

texts:
I don't understand how to determine value of resistors and capacitor in differentiator and integrator circuit of Op-Amp.

I tried to align the amplitudes of these sine waves. I keep changing their values but I can't get it right.

The best result I can get:

The circuit:

Okay, so that is my question about the differentiator circuit. The next question is about my integrator circuit. As with the differentiator, I don't understand how these resistors and capacitors affect each other. I tried to make the source a triangular wave and the result a sine wave. Alas, no luck.

Here is the result:

Here is the circuit:

The next one is a square wave. I managed to get it to square wave, but the result is supposed to be a triangular wave and all I get looks like a straight line.

Here is the result:

Here is the circuit:

How can I determine the correct resistor and capacitor values?


texts: How to ground pins on a multilayer board with a ground plane?

texts:
Let's say I have a multilayer board with a single dedicated ground plane.

Should I place all the grounds directly to the plane with a via as close as possible to the pin/pad or should I be looking at different layout methods like a star topology where all grounds traces converge to one point and then go to the ground plane ?


texts:
I was looking to use a potentiometer to limit brightness for LED matrix.
The problem I ran into is I would need a lot of potentiometers.
The Led matrix will be multiplexing so only one Led will be on at any given time.
I was wondering if the picture below is good to do. Are there any negative side effects of using a potentiometer this way ?


texts: What are the range of pressure values we receive from an ultrasonic sensor?

texts:
While trying to receive ultrasonic waves from a Sonar using a pressure transducer what are the  range of values of pressure I can get.

I need these values to buy necessary equipment for doing the experiment


texts: Well I am trying make a diode test with my digital multimeter. When I measure with the multimeter probe (video link) , 0.401 volts seen in one direction, If I change the location of the probes, it's increasing to 1.332 volts in the other. In the 2nd video (2. video link), when I take the diode out of the circuit, my measurements seem normal. a constant volt of around 0.553 appears in one direction and OL in the other direction. I wonder why the diode test on the circuit is not working properly. Which structure connected parallel to the diode prevents me from taking a healthy measurement.


texts: Powering arduino nano efficiently with 18650 batteries

texts:
I need to implement a UPS for my arduino nano project (using VIN) in case there's a power outage.
I tried a single 18650 (NCR18650B), a battery charge module and a step-up voltage regulator but the battery was quickly drained (probably because of the step-up ?).
I have plenty 18650 batteries to use in series and/or parallel.
Which method should be the most efficient?


texts: How to answer this kind of diode problem?

texts: I have this problem here where I need to find V2 in 3 different cases and I have trouble of knowing how to take on the problem. Could someone please lead me into the right direction. I can't really find anything on how to go on this kind of problems.


texts: Effect of changing PWM frequency of a light source on perceived brightness

texts:
First and foremost, I'm not entirely sure if this is the proper place to post this question, so I apologize if there's a better section for this.

I am looking to determine the effect of changing the PWM frequency of a light source, LED for example, has on the perceived brightness to the human eye.

As an example, say you have an LED operating at 80% duty cycle at a frequency of 200 Hz. Keeping the duty cycle at 80%, but increasing the frequency to 400 Hz, does the human eye perceive these two situations as the same brightness? What about a larger increase, to say 1 kHz or 10 kHz?

I have have tested this using an ATmega328p and two LEDs. I had one LED at 80% duty cycle at 122 Hz. The other LED starts at 80% duty cycle at 30 Hz (yes there is a very noticeable flicker), then with the press of a button, it changes the frequency. The values used are 30, 122, 245, 490, 980, 3920, and 31370 Hz.

While it wasn't exactly what I was after, I took light measurements using a BTS256-LED from Gigahertz Optik. Aside from 30 Hz, which I attributed to the flickering, it appeared changing the frequency had no effect on the amount of lumens that the LED put out.

Then I tested in both a light and dark environment, and I was not able to discern any difference while changing the frequency.

I have done a lot of searching and reading, and I've learned a ton about PWM, LEDs, flicker, heat dissipation, sensitivity to light color/brightness, and much more. Unfortunately none of it is what I'm looking for.

Looking for any kind of insight here. Perhaps this is a bad question, and I'm barking up a tree that doesn't exist. Or perhaps the answer is either very obvious, indicating my findings from my test were accurate, or far more complex than I realize.

I appreciate any and all responses, as I'm out of ideas/topics to look for more information.


texts:
I'm modeling a Bias Tee in ADS and I wanted to ask how to add board parasitics into the model and what should the results of a good model look like in terms of the S-parameters. This is my first time working with a Bias Tee but from reading documentation on the web it seems for a model adding parasitics is very important and staying away from the resonant frequencies in the s2p of the amplifier. My model below just has the s2p files for the amplifier, the inductor, and the capacitor. I simulated from 1-16 GHz but I really only care about 7-11 GHz. I also didn't find documentation that clearly explained how to come up with values for the inductor and capacitor so at random I picked a 3.9nH inductor and 10pF capacitor.

Now I've seen that the SRF of the inductor is important but I don't understand why. The SRF of the inductor in the model is 6 GHz. Below are initial results from using the S_Params_Quad_dB_Smith template.

I'm hoping for the board parasitics it would be as simple as adding in microstrip line and adding SLCs everywhere. And for the results I if there is a dumb-downed explanation for what I should be looking for that would be great. I really have no clue what doing but any help at all would be appreciated.


texts: Measuring a low AC Voltage with microcontroller

texts:
This is my first time posting so if I miss some form of etiquette I apologize in advance. I am an undergrad engineering student and I am trying to build an internal resistance state of health battery monitor. This monitor will put approximately 1 Amp AC at a fixed frequency through a 12 V lead acid battery. This will cause a voltage drop in the range of millivolts that I need to measure.

I'm currently using a raspberry pi with an ADC to take measurements, however I am unable to take in negative values. I thought about rectifying the signal but then that defeats the purpose of having AC in the first place.

I can use a DMM to measure AC but have been widely unsuccessful in figuring out how to make my own circuit so that the measurement can be read into the ADC.

So my question is either 1, How does a DMM measure, accurately, the AC voltage without messing the signal itself up (this would help me build it) and or secondly, is there some type of sensor that I can use that will accurately measure AC voltage in the range of millivolts or even microvolts.

Any help is greatly appreciated!

I have attached a very simplified circuit. The purple, R1, C1, L1 and R2 and the 12v source represent the battery. The The terminals start at R1 and end at L1. C2 and R3 are just part of the AC current generation circuit where C2 stops the 12V DC from circulating. I am trying to measure AC voltage across the terminals.


texts: How to implement status LED in a system?

texts:
This question is related to general software embedded system practice. I want to have a blinking led as a status led for my MCU.

How correct is it to implement it with the timer interrupt? With that given the lowest priority.

How about using a PWM with some set frequency? Which method may have advantages over the other?

What is the general method that engineers in industry use for showing the status of system/mcu-unit using an led?


texts: Designing signal conditioner to convert current source to voltage output

texts: I've seen a lot of signal conditioners online for converting a 4-20 mA current loop signal to a 0-10 voltage output. However, they seem extremely expensive for the task they are achieving. Are the high costs due to protection against spikes in the input/other extreme events?


texts: Driving NEMA17 Stepper motor using leadshine driver

texts:
I'm trying to drive a NEMA17 stepper motor using LEADSHINE driver.
At the beginning of rotation Motor turns few steps in opposite direction and then turns toward the given direction. Why this is happening?
Here is the Arduino code:

const int pwm = 12;
const int dir =11 ;
const int enable3 = 24;// enable pin
int delaymicros = 500; //duration of pwm
String  str1;
void setup() {
    Serial.begin(115200);
    Serial.setTimeout(1);

    pinMode(pwm,OUTPUT);
    pinMode(dir,OUTPUT);
    pinMode(enable3,OUTPUT);

    digitalWrite(pwm,LOW);
    digitalWrite(dir,LOW);
}

void loop() {
     digitalWrite(enable3,LOW);  //Disable Motor
     if(Serial.available() > 0){
          String str = Serial.readString();
          Serial.flush();

          if((str.indexOf("x") > -1)){ //Move Clockwise if "x" is received via serial
               digitalWrite(enable3,HIGH);  //Enable Motor
               for(int i=0;i<800;i++){
                    digitalWrite(dir,LOW);  //Clockwise Direction
                    digitalWrite(pwm,HIGH);
                    delayMicroseconds(delaymicros*2);
                    digitalWrite(pwm,LOW);
                    delayMicroseconds(delaymicros*2);
               }
          }
          if((str.indexOf("y") > -1)){//Move Counterclockwise if "y" is received via serial
               digitalWrite(enable3,HIGH);
               for(int i=0;i<800;i++){
                    digitalWrite(dir,HIGH); // Counterclockwise Direction
                    digitalWrite(pwm,HIGH);
                    delayMicroseconds(delaymicros*2);
                    digitalWrite(pwm,LOW);
                    delayMicroseconds(delaymicros*2);
                }
           }
     }
}


texts:
I have very limited experience with FPGAs (Altera - used only the visual design tools).

I am planning for a new project in which I need FPGA and I could benefit a lot from an actual linux running on the same board (mostly for TCP communication as well as some DSP).

My question is, is there a recommended FPGA that has a supported embedded linux prepared for it? no fancy drivers (just ethernet, wifi could be a plus, ...). I imagine there would be a micro controller built into the FPGA (this means it would eat up lots of the FPGA and I would need a larger FPGA).


texts: High-side MOSFET drive in current-limited power supply

texts:
As preamble, this is the typical schematic for an opamp constant-current load used for testing power supplies and what not. (Sorry for the terrible circuitlab MOSFET symbol; that's an N-enhancement FET)

simulate this circuit – Schematic created using CircuitLab

I want to repurpose this standard design for use as a current-limiting stage for a linear regulator, like so. OA1 is a standard opamp, OA2 is a current-sense/instrumentation amp or something like that.

simulate this circuit

But I realized that this design uses a high-side N-channel MOSFET, so I need the opamp supply voltage to be higher than Vin to drive the transistor properly. I could switch to a BJT, but then I get a Vcesat drop across Q1 if the supply is not in current limiting mode. (ie suppose the LDO is drawing 800mA and the current limiting stage is set for 1A. OA1 will drive Q1 as hard as possible because it's not in current-limiting mode. If Q1 is a MOSFET, then you only get a small resistive drop, but if Q1 is a BJT, you get a diode-like saturation voltage drop.)

How should I alter the constant-current stage to solve this problem? eg powering OA1 from a boosted supply via a charge pump? Would a P-channel enhancement MOSFET work better in this scenario? Or will I have to use a BJT to get the job done?


texts: Breadboarding digital mixer: deriving Vref from Vdda, and capacitor between Vdda and Vssa?

texts:
I am assembling a digital audio mixer from an old IC I have on my workbench.
And I am reading the data sheet and trying to make sense of a note that describes the
Vref pin (reference voltage).
The note says that Vref should be .44 of Vdda (analog power) and that I should
connect the Vdda to Vssa with a 1000pf capacitor.

So I have drawn up a schematic and am wondering three things:

1) How to get .44 of Vdda - A voltage divider and or suggestions?

2) Is the schematic correct in that I place 1000pf capacitor across Vdda and Vssa?

3) One of the comments for this IC / digital mixer chip is that I should keep all analog ground contacts separate from any digital ground contacts?

Does that imply that I keep the analog and digital power supplies separate as well?

Here is a url to the ics2101 datasheet ...
https://stuff.mit.edu/afs/sipb/contrib/doc/specs/ic/audio/ics2101.pdf

simulate this circuit – Schematic created using CircuitLab


texts:
I have this Capacitive Sensor IC
I am trying to understand and analyze how to use this IC.
In the datasheet, on page 13 - Function description, it is mentioned as "There are four selectable non-harmonic sensor frequencies for generating the sensor driver output
signal: 45.45 kHz, 71.43 kHz, 100 kHz and 125 kHz. This can be set in FREQ register (see 7.2.7)"
I am not able to understand the purpose of this frequency in the IC? For what purpose is the frequency?
Like, is this the frequency for the IC internal working derived from the CLK input from the Host or does this frequency available on any other pin of the which (like, can this frequency be measured external to the IC?)
My questions :

What does the frequency setting serve as? What is its purpose? From which section in the block diagram is this frequency generated from?

I couldn't find the "Sensor driver output" block on the block diagram? What is the sensor driver output and what does it do?


texts: How to transmit SPI signals through RS422 wire

texts:
I'm using several MFRC522 modules which communicate to an arduino with the SPI protocole. The distance between the arduino and the modules will be between 1 and 2 meters.

I'm worried about the distance, I'm not sure of the quality of the SPI signal for a such distance. I would like to know your opinion about using wire like RS422 or RS485.

If I have to use this wiring, could you explain me how to convert SPI to RS422 ?

Thank you ,


texts:
I need a way to switch a -5V voltage supply to the Flexiforce sensor below. The circuit I am using is this:

I looked into using a 74HC4066, but it does not allow switching negative voltage. It can only switch between GND and VCC. I need to find an IC that has multiple switches and can switch negative voltage. If not, how could I incorporate a transistor circuit to solve this?


texts: How to get the transfer function of electrical network using nodal method

texts:
We have the following circuit:

I am trying to get the transfer function using the Mesh Method. The first equation I've got is:

(s+1) I1(s) - sI2(s) = Vi(s)

The second one is:

-sI1(s) + (s + 2) I2(s) = 0

By that, the transfer function is:

2/(3s + 2).

The teacher used the nodal method:

and the result was:

1/(s + 2).

I know that using both methods, should give the same solution. Any help ?


texts: Are there any errors in the given transistorized microphone preamplifier with band pass filter circuit below?

texts:
Can you spot any corrections or errors in the given circuit below:

This is the circuit image for "Transistorized Microphone Preamplifier With Band Pass Filter".
This circuit is a simple and effective solution of the problem with low noise microphone preamplifier with limited bandwidth by passive RC filters.


texts: Why would a designer choose to use two AND'ed input shift register such as the 74HC164?

texts:
Today I came across the 74HC164 8-bit serial-in/parallel-out shift register. Reading its datasheet, I realized that it has two serial inputs, instead of one like other shift registers, such as the 74HC595, that I'm familiar with.

On top of that, the two inputs go through an AND gate, as in the picture below (figure 1 on the datasheet):

The datasheet says:

  Data is entered serially through DSA or DSB and either input can be used as an active HIGH enable for data entry through the other input.

That tells me that I can use one input to control whether the IC is taking data serially in or not. But a few questions remained:

Why do the inputs go through the AND gate?
Why not set one fixed pin as input and the other as input enable?

I understand that this feature gives the engineer some flexibility to use either pin as the input and the other as enable, but I fail to see how that's useful in a concrete design scenario, as opposed as having a fixed pin for the input and another for the input enable.

So, if this is not too broad a question to ask, what would be a concrete electronics design scenario in which an engineer would want to have this kind of two input shift register?

I did google for an answer, but didn't get any meaningful results.


texts:
I am using FatFS. After solving card initialization problem I am trying to read sector 0, but the card returns junk data.

This is my read operation:

I see that the card replied with 0x00 which means that it is read to deliver data.

Of course my zeroth sector dumped with a USB card reader looks correctly:

This is my debug log (CMD numbers are in hex):

    388:mmc_disk_initialize: SPI initialized
    366:send_cmd_INTERNAL: call 401 Cmd 00 response 01
    403:mmc_disk_initialize: CMD0 okay
    366:send_cmd_INTERNAL: call 405 Cmd 08 response 01
    406:mmc_disk_initialize: CMD8 okay - this is an SDv2 card
    409:mmc_disk_initialize: CMD8 response 000001AA
    413:mmc_disk_initialize: Waiting for leaving idle state
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 01
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 01
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 01
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 01
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 01
    366:send_cmd_INTERNAL: call 309 Cmd 37 response 01
    366:send_cmd_INTERNAL: call 415 Cmd 29 response 00
    419:mmc_disk_initialize: Checking CCS bit in OCR
    366:send_cmd_INTERNAL: call 420 Cmd 3A response 00
    423:mmc_disk_initialize: CMD58 response 80FF8000
    452:mmc_disk_initialize: Init okay
    40:disk_initialize: status = 0
    58:disk_read_INTERNAL: Call from 27
    366:send_cmd_INTERNAL: call 494 Cmd 11 response 00
    60:disk_read_INTERNAL: buf=20001588 sector=0 count=1
    27:test_task1: Read result 0
    28:test_task1: dump len 512
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FE000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    0000000000000000001B3DAFBF000080
    0101008311F4FD3E000000C2EF3A0000
    00000000000000000000000000000000
    00000000000000000000000000000000

My debug data is 100% consistent with logic analyzer traffic.
Initialization is the same as in FatFS reference driver, only SPI layer is changed, so I would expect the initialization to fail if something was wrong with SPI itself
SPI clock is around 150kHz
Card returns the same junk every time, another card returns another junk reliably
I am sending 2 dummy bytes with CS high between commands

What should I check/change to make read command work reliably?


texts: A PWM output is going to 0V if I connect an ADC input in a development board

texts:
I'm doing a project in which I want to turn on an LED with different instensity depending on the input of a sensor. For now, I'm simulating the sensor with a potentiometer.
I'm using an EK-TM4C123GXl launchpad. I connect the 'fake' sensor input to an ADC input (through an op. amp.), then I vary the PWM pulse width depending on the value read from ADC.
I have tested that the PWM output powers the LED and varies its lightness depending on the current pulse width, having the ADC input is disconnected. However, as soon as I connect the ADC input, the PWM output goes to 0V (just after generating a 'spike' in the LED, I can see it because it brights a lot for an instant).
I have 'solved' the problem by placing a resistor between the PWM output and the LED. However, I don't understand at all why this happens. I have though that the PWM pulse is finding a way to ground through the MCU internals and the ADC input, I still don't see how can a resistor (R5) fix that.
The schematics is below (VCC is a 9V battery):
EDIT
Previous schematics was wrong, here is the correct one:

The resistor R5 is the one that prevents the PWM output to go ground, that is, if I remove it and connect the LED directly to PWM0 it remains off and its anode at 0V.
How can this be happening? Can this be related with the input leakage current?
Pins configuration:

ADC input pin: input, analog, no pull down resistor.
PWM output pin: output, digital, no pull/down resistor, no open drain, 2mA drive strength.

Notes:

VCC is a 9V battery
I use a potentiometer and an op. amp. because the potentiometer is supposed to fake what will be an actual light sensor. The op. amp. is there for the shake of making the simulation more realistic, since I pretend to use it in the final design.
I have tested that the op. amp. output is between 0 and ~3V (never more than 3)
I connect the board GND pins to the same ground as all the other ICs.
The MCU is powered by the USB port, which is connected to my PC.
I don't provide the code because it's very long and I have tested several times that it's correct (I insist, everything works fine if R5 is present)
All impedances are given in ohms.
The op. amp. is non-inverting output (I remark this just in case I have made a mistake with it)
I have read that the LED should always by protected by a current-limiting resistor. I didn't put it in first place because I misunderstood what the pin's drive strength is, but the point is I want to know how can the absence of R5 can cause PWM0 to go to 0V.


texts:
I am a complete beginner with radio and electronics in general.

I did some research on antenna designs and found that, with dipole antennas, at least from my understanding, the second antenna will act as a ground, balancing them. I have built the following circuit and it does not produce static, as I thought it would.

I would like to know:

If this circuit should at least produce static through the speakers in theory.
If not, how can I use a dipole antennae properly to do so.

Apologies if this question is really dumb, and the answer is obvious, but I've tried googling everything related to this and it seems like it should work.


texts: Sequential counter for repeating counting sequence

texts: I'm aware of designing synchronous counter design for a counting sequence where I write the state table with present and next state and then followed by flip flop inputs (filled using the excitation table of the corresponding flip flop). But how to design if the states are repeating I'm not aware on how to proceed further and hence needed help.how to design a synchronous counter for a repeating counting sequence.  I have listed an example .


texts:
Does anyone know why cellular modules run at 3.8V instead of 5V or 3.3V? It seems weird that a different voltage was chosen to run them. I have seen some run at 1.8V and 2.8V. Thanks.

Edit: To make the question more clear. Why are cellular modules(used in M2M or cellphones to connect to cellular network) nominal voltage 3.8V instead of the more standard 3.3V or 5V?


texts: I'm trying to connect a Sharp LQ070Y3DG3B TFT display to an Epson S1D13517 display controller. The test image and a bitmap that I've loaded are showing up fine, except there is a aqua line vertically down the center of the display about 1 pixel wide regardless of what I try to display. To the left side of the aqua line is a strip about 5 pixels wide that the colors on the test pattern are incorrect except for green. Does this failure mode tell me something about what could be wrong with the software/hardware? How can I determine what is wrong with the display?


texts:
I have a circuit with two voltage domains that need to talk to each other. One side is always 3.3v, but the other side can either be 3.3v or 5v depending on what physical hardware is connected. The voltage level is set by a physical switch. There are three 8 bit buses that need to communicate across the domains.
I have 3.3v <-> 5v working fine using a TXS0108E bidirectional logic level shifters. Data flows in both directions, shifting up or down as appropriate.
For simplicities sake, I was hoping that 3.3v <-> 3.3v logic could still go via the TXS0108E chip, but with the low and high voltage reference pins both set to 3.3v. This predictably doesn't work.
A simple solution to the 3.3v <-> 3.3v would be to use some T74FST3390 multiplexer bus chips to bypass the logic level shifters when in 3.3v mode, this could easily be hooked up to the physical voltage switch.
Is there a better solution that is more compact and cost effective? As stated, I was hoping that I could do all this through the same chip, but logic level shifters with a pass-through option don't seem to exist.
Thanks.


texts:
I am trying to interface DS1307 RTC with the MCU mentioned. I want to make a lifetime timer which tells the time this project has worked in field, and display this timer on an LCD.

I am new to microcontrollers but using LCD and I2C libraries already built-in in the MikroC pro for PIC compiler will I hope save me from low-level programming.

Now if I understand correctly, the steps to write or read something from the RTC would be:

1) I2C_Start();
2) I2C_Write(DS1307_Address);
3) I2C_Write(Register Address);
4) I2C_Write(Data to be written);
5) I2C_Stop();

and for reading:

1) I2C_Start();
2) I2C_Write(DS1307_Address);
3) I2C_Write(Register Address);
4) I2C_Repeated_Start();
5) I2C_Write(DS1307_Address);
6) I2C_Rd();
7) I2C_Stop();

My issue is that what will the DS1307_Address be, if it is the only device on the Bus?

My approach will be to set the BIT7 of 00h or CH bit of the DS1307 low whenever the device is running, and set it high just before shutting down. I do not want the RTC to count the project off time as well. Is this approach feasible?

My schematic is as following:


texts: Getting valid input from Ultrasonic range finder

texts:
(I am posting this question here since I feel that the issue is a part of my lacking understanding of the electronics, and not a )

I am trying to monitor the feed hopper for my pellet furnace. I had a Seed Studio Ultrasonic range finder lying about

I used an example script to get started, and set up some simple "error correcting" before setting it up by the hopper.

Everything works generally as it should. I am running into two issues though;

I need to point the Ultrasonic Sensor into the hopper in a way so that the cone sees the sides of the hopper as little as possible.
I get much bigger spikes in my data (a factor of 1000 bigger) after mounting the sensor than while testing in my office. How do I solve this? do I need another sensor, or should I filter it out in the code as bad reads?

Additional questions:
I am aware that Ultrasonics can be affected by particles in the air and temperature. should I consider another sensor?

Sample Data:

* = potentially a hit on another surface than the pellets in the hopper

44              2018-10-17 11:08:39
33              2018-10-17 11:24:40 *
41              2018-10-17 11:25:00
49              2018-10-17 12:01:03
42              2018-10-17 12:01:23
36              2018-10-17 13:41:49 *
340376          2018-10-17 13:43:09 ???
40              2018-10-17 13:43:29
33              2018-10-17 14:06:50 *
40              2018-10-17 14:07:10
32              2018-10-17 14:56:13 *
40              2018-10-17 14:56:33
30              2018-10-17 15:24:35 *
39              2018-10-17 15:24:55
32              2018-10-17 15:56:57 *
41              2018-10-17 15:57:17
35              2018-10-17 16:34:59 *
41              2018-10-17 16:35:39
33              2018-10-17 17:33:42 *
41              2018-10-17 17:34:02
49              2018-10-17 18:00:44
41              2018-10-17 18:04:44
49              2018-10-17 18:11:25
42              2018-10-17 18:12:25
52              2018-10-17 18:39:46
44              2018-10-17 18:40:06
36              2018-10-17 18:57:48 *
42              2018-10-17 18:58:08
69              2018-10-17 19:39:10
41              2018-10-17 19:39:30
68              2018-10-17 19:41:10
41              2018-10-17 19:41:30
48              2018-10-17 21:22:16
41              2018-10-17 21:27:56
48              2018-10-17 23:55:45
340385          2018-10-18 00:00:26 ???
45              2018-10-18 00:00:46
36              2018-10-18 00:31:48 *
44              2018-10-18 00:32:08
36              2018-10-18 01:02:49 *
44              2018-10-18 01:03:09
52              2018-10-18 06:28:29
44              2018-10-18 06:35:09
37              2018-10-18 07:48:54 *
44              2018-10-18 07:49:34
340395          2018-10-18 08:13:15 ???
46              2018-10-18 08:13:35

Here is the essential part of my code (Complete code on Github):

#function to calculate deviation between current and previously read value
def deviation(x,y):
    diff = abs(float(x)-float(y))
    avg = (float(x)+float(y))/2
    return (diff/avg)

distance = int(round(duration*34000/2))
            if (distance != lastread):
                dev = deviation(lastread,distance)
            if (dev > allowableError):
                #save last entry, only if deviation is big enough.
                lastread = distance
                saveData(distance)
                print str(distance) + "\t\t" + str(datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'))


texts: DeMux Output - Large Pulldown Resistor Can't Pull Output Low

texts:
I'm using the SN74CB3T3257 as a demux in a circuit I'm working on.
The relevant parts of the circuit is approximately this:

simulate this circuit – Schematic created using CircuitLab
What I want is if I disconnect the external circuit, OUT reads 0.00 V, and if the external circuit is intact, it will read ~VDD. I'll use this to drive a comparator. Keeping it low power is essential as we need to run it off batteries.
When the external circuit is connected it works as expected and reads ~ 0.99*VDD. But when i disconnect the external circuit, it still reads VDD.
I tried with some lower value resistors; everything behaves as expected if R2 is in the 10 - 50 kΩ range; after I disconnect, OUT goes to 0.00 V. But as R2 gets to > 100 kΩ, OUT doesn't fall anymore.
I'm not sure if there is a parameter in the datasheet I'm missing which explains this behavior, but I couldn't find anything. I tried multiple chips to confirm it wasn't a blown chip.
Any ideas why this behavior?
EDIT 1: Fixed schematic and included pin numbers.
EDIT 2: Updated schematic to show where out leads (into comparator). Note, OUT voltage doesn't change whether or not it is connected to the comparator.


texts:
I'm working on an assignment to design an R2R DAC. The DAC works, however I am asked to find the absolute and relative accuracies. I checked on various sources, the definitions seem a bit vague to me.

Is it one value for each code, or one value for the entire DAC?

[Analog-to-Digital Converison by Analog Devices]


texts: Can anybody identify this part - I think it is a phototransistor of some kind?

texts: I suspect this is some kind of phototransistor, except it has three leads instead of two. It has no part number anywhere on it. Is anyone familiar with it?


texts:
I'm programming ATTiny13's to use on a custom PCB and have noticed an odd behaviour at times.
My ATTiny is connected to an Arduino Nano as per the diagram shown here, so pretty standard. I then use the following code on it:
#include <Bounce2.h>
#define BUTTON_PIN PB4
#define led1Pin PB0
#define led2Pin PB1
#define led3Pin PB2
#define led4Pin PB3
#define switchPin PB4
#define delayInterval 100

Bounce debouncer = Bounce(); // Instantiate a Bounce object

uint8_t val; // variable for reading the pin status
uint8_t val2; // variable for reading the delayed status
uint8_t buttonState; // variable to hold the mode switch state

int lightMode = 2;

void setup() {
  PORTB |= (1 << PB4); // set PB4 as input & activate internal pull-up resistor for PB4
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
  pinMode(led3Pin, OUTPUT);
  pinMode(led4Pin, OUTPUT);
}

void loop() {
  val = digitalRead(switchPin); // read input value and store it in val
  delay(10);

  if (val != buttonState) {
    if (val == HIGH) { // check if the mode button is pressed
      if (lightMode == 0) {
        lightMode = 1; // turn LEDs on
      }
      else {
        if (lightMode == 1) { // if LEDs on
          lightMode = 2; // make it flash
        }
        else {
          if (lightMode == 2) { // if LEDs flashing
            lightMode = 3; // make it wave
          }
          else {
            if (lightMode == 3) { // if LEDs waving,
              lightMode = 0; // turn LEDs off
            }
          }
        }
      }
    }

    buttonState = val; // save the new state in our variable
  }
  // Now do whatever the lightMode indicates
  if (lightMode == 0) { // LEDs-off

    PORTB |= (1 << PB1); // HIGH
    digitalWrite(led2Pin, LOW);
    digitalWrite(led3Pin, LOW);
    digitalWrite(led4Pin, LOW);
  }

  if (lightMode == 1) { // LEDs-on
    digitalWrite(led1Pin, HIGH);
    digitalWrite(led2Pin, HIGH);
    digitalWrite(led3Pin, HIGH);
    digitalWrite(led4Pin, HIGH);
  }

  if (lightMode == 2) { // LEDS-flashing
    digitalWrite(led1Pin, HIGH);
    digitalWrite(led2Pin, HIGH);
    digitalWrite(led3Pin, HIGH);
    digitalWrite(led4Pin, HIGH);

    delay(100);
    digitalWrite(led1Pin, LOW);
    digitalWrite(led2Pin, LOW);
    digitalWrite(led3Pin, LOW);
    digitalWrite(led4Pin, LOW);
    delay(100);
  }

  if (lightMode == 3) { // LEDs-waving
    digitalWrite(led4Pin, LOW);
    digitalWrite(led1Pin, HIGH);
    delay(100);
    digitalWrite(led1Pin, LOW);
    digitalWrite(led2Pin, HIGH);
    delay(100);
    digitalWrite(led2Pin, LOW);
    digitalWrite(led3Pin, HIGH);
    delay(100);
    digitalWrite(led3Pin, LOW);
    digitalWrite(led4Pin, HIGH);
    delay(100);
    digitalWrite(led4Pin, LOW);
  }
}

What I have noticed is that some times I program them, and the button click just doesn't work. Nothing wrong with it, but the behaviour is not the same.
These are programmed to start with lightmode 2, so it cycles through every LED. I press the button once, it turns off the LEDs. I press it again, it turns them all on. I press again and nothing happens.
The odd thing is that this happens on only a few IC's but not all of them. These all come from the same batch and are using the same programming methodology.
I am using the MicroCore library to program them.
Would appreciate any advice.
Thank you!


texts: Dev Noob - Can I use two output pins from an ESP32 to get a voltage of 7.2?

texts:
I have an ESP32 and I would like to get an output voltage of more than 3.6 from its pins.
Would activating them at the same time and connecting them putting them in series make the voltage rise to 7.2 volts?
My idea would be to activate both of them at the same time, using diodes so no current flows into the other pins by accident.
What I am trying to do is to toggle a relay that needs a 5V signal.
Sort of schematics:

I am a software developer so I am a complete noob with electronics.


texts: QAM Modulation Frequency vs Carrier Frequency

texts:
In QAM (Quadrature Amplitude Modulation) theory what is the relationship between the modulation frequency and the carrier frequency called?

It is often stated in QAM tutorials that the carrier frequency must be "much larger" than the modulation frequency. A common statement is that the carrier frequency must be ">100 times the modulation frequency". It seems obvious to me from a practical standpoint that you must impose a certain minimum number of modulation frequency cycles onto the carrier in order to have any hope of demodulating the signal at the receiving end of a link. So, as an extreme case you would not modulate the carrier at the carrier frequency as this would produce nominally only one cycle of the received carrier signal which must be processed by the demodulator. Much better to have, for example, 100 cycles of the carrier signal for the demodulator to process.

To be sure, my question is not what numeric value is required, but rather what is this characteristic or operational parameter of QAM called in the QAM literature?


texts:
This question is specifically about the BJT Common Collector Hartley Oscillator. In the corresponding Colpitts oscillator the feedback fraction is equal to C1+C2/C1 where C1 is the capacitor with ends connected to the base of the BJT transistor(ignoring the DC blocking capacitor) and  the voltage output of the emitter follower and C2 is connected to the voltage output of the emitter follower  and GND.
Is the equation for the Hartley oscillator correspondingly the same(L1+L2/L1) where L1 is the inductor with ends connected to the base of the BJT transistor(ignoring the DC blocking capacitor) and and  the voltage output of the emitter follower and L2 is connected to the voltage output of the emitter follower and GND.
I need this for an exam I am writing tommorow.