texts: BDM (Background Debug Mode) with Arduino

texts:
I'm trying to talk to a 68HC(9)12D60 (Motorola/Freescale/NXP) via BDM protocol.
This chip is a 112-pin TQFP. On the PCB, there is a 6-pin header (which is not the standard BDM 2*3 pins header). The 6 pins are on one row, 2.54mm pitch.

With an ohmmeter, I've managed to identify each of the 6-pins. One is unused, one reads 0 ohm with Vss and Vssx (so it's the ground), one reads 0 ohm with Vdd and Vddx (so it's the positive terminal), one reads 0 ohm with the RST pin, one reads 0 ohm with the VFP pin and one reads 0 ohm with the BKGD pin.

So I have easy access of the needed MCU pins.

Now I want to talk to the MCU using an Arduino (to read the memory).
Plugging BKGD, RST and VFP directly to digital pins 2, 3 and 4 and plugging Vss to GND pin and Vdd to +5V.

I've tried the simplest command which is a SYNC. A SYNC allows the target to reveal its clock without requiring the host to know it beforehand.
I drive the BKGD line low for a long time, then release the line.
The MCU should wait a few cycles, assert the line down during 128 BCLK and high again.

I've also tried the READ_WORD hardware command.

No matter what I try, after I release the BKGD line, I only read ones on the BKGD pin. It seems the MCU doesn't answer on its BKGD pin.

Things I've tried:

Put the MCU into Single Chip Special Mode (I've checked pins MODA and MODB read 0, and I put the BKGD pin to 0 before powering on the MCU). I've tried this in case my MCU had the BDM Lockout feature enabled.
I've tried a lot of frequencies. The main oscillator on the PCB
(EXTAL) seems to be 4Mhz. It's not very clear for me when I read the
datasheet what is the value for BCLK (BDM Clock). I've tried values
from 32Hz to 8Mhz with no success, because the datasheet says BCLK
values range from ECLK/128 to ECLK ; ECLK itself ranges from 0.004Mhz
to 8Mhz).
My Arduino is 16Mhz. Maybe the "frequency gradient" between the host and the target is to small? So I've also tried to talk to the MCU using the Raspberry Pi 1B CPU (700Mhz) which should be fast enough to sample at the correct timing. With the Raspberry Pi, it was only with 3V, but 3V is also within the operating range of the chip.
At first I didn't connect the VFP pin to anything. But then I noticed VFP should be within VDD-0.35V to VDD+0.5V. Without connecting the VFP pin, it read VDD-0.5V, which was outside the range. So I also tried to connect VFP to a high 5V output pin on the Arduino.

No matter what I do, after I drive the BKGD line and change it to an input, the line always read 1. :(
What am I doing wrong?

https://www.nxp.com/docs/en/data-sheet/MC68HC912D60.pdf

https://www.nxp.com/files/training_pdf/27642_HCS08_BDM_ICE_WBT.pdf

http://codecard.eu/files/Manuals/MCU/CARPROG%20Motorola%20HC12%20programmer%20manual.pdf

http://www.microcontroller-cafe.com.ua/products/doc/e912prog.pdf


texts:
This is an electro-optical question.

I'd like to make my own large 7-segment-type displays using discrete LED devices.

What's a method to get an clean, even illumination of the segment from the LEDs (one or more)?

Ideally, there's a good general approach that will work making any shape illuminated item, not just 7-segment displays.  Segment sizes would range from 1" to 1' or more.


texts: How does a current mirror produce an amplified current? What is the physical process behind it?

texts:
I know that the MOSFET based current mirror gain is equal to \$\frac{I_O}{I_{ref}} = \frac{\frac{W}{L}2}{\frac{W}{L}1}\$. To get the output current, \$I_O = I_{ref}\frac{\frac{W}{L}2}{\frac{W}{L}1}\$, suppose I have a \$I_{ref} = 0.2 \text{ mA}\$, that means by having a ratio of \$1000\$, I can supply a current of \$2 \text{ A}\$ to a load, but how does that work. Just by altering the physical characteristics of a MOSFET, we can output large currents.

Ideally the value of \$I = \frac{V}{R}\$, so this means that we are reducing the resistance of the MOSFET, which allow large currents to flow.

What is the physical process behind the current amplification?


texts: I am in the process of designing a switched mode power supply as I need rather high power(12V 2A). I took a look at the TI tool that throws a basic circuit at you. I understand the danger of such a circuit and I understand the circuit itself almost completely. My main problem is finding the right coupled inductor. I stumbled upon this pdf in another question. The transformer in this pdf is rated for up to 265 VAC. Why is it driven with rectified mains which equals to 375 VDC? Regarding the pwm signal: If I understood correctly the duty cycle does in fact, like in a buck or boost converter, affect the ouput voltage?


texts:
I have a video feed that's two AV cables (one sound, one video) and I'm looking to transmit them from the source to about 100-200 meters away. Specifically,  I need some sort of transmitter/receiver that I can work with. Are there any sort of circuits I can get that would work with what I need? What can I use for this? Or what should I use?

EDIT: I just want to clarify, I am not asking about a device that does everything for me, I was going to do the circuit I need myself as it's not too hard. I am asking about a transmitter that is appropriate for this kind of transmittion.


texts: Work around for lack of Multichannel design (two-dimensional) bus support in Altium Designer

texts:
So Altium Designer still does not have support for multi-dimensional buses and repeat statements.  The repeat blocks can be used to do some very cool things, but the only work-around I've found is to brute force one of the levels of the design and remove it's hierarchy.

My design is similar to those in the links above.  I have a lower block of LED drivers with 4 LEDs per driver, and I'd like to repeat that many times in a higher-level channel block, likely something like 24 channels.  It looks like my only option right now is to flatten the LED driver schematics so they don't use repeat statements and buses.

Does anyone have a better way?  Is there a way to trick Altium into letting nested or multidimensional buses and repeat statements work?

EDIT: It appears that one of the issues where is the buses inside the repeat block give a duplicate net names error.  This is because the net names are not appended with the repeat naming convention the way rooms and components are (as specified in Project Options/ Multi-Channel).  I'm not sure why this is a problem for buses but not for regular nets, but it is.  If there's a way to overcome this issue, then it seems like it might be able to translate bus names inside the repeat block and achieve nested buses.  Maybe.  Does anyone know how to get buses to work inside repeat blocks?


texts: ADC in STM32F103 drops ouput voltage from unity buffer

texts:
I'm building a signal analyzer based on STM32F103RB6 placed on a noname board with the following schematics:

I'm trying to normalize the AC input signal initially centered at 0V. The amplitude is 2.5V. So basically I'm trying to shift the signal and center the signal around 1.7V to use it in ADC. To test the schematics I'm using an oscilloscope with a built-in generator. The prototype is built using LM358 dual op-amp.

Here is the schematic I'm using to normalize the signal:

The input is configured as follows:

And here is what I get in POINT_B when the ADC is disabled:

The problem appears if I enable the ADC on the microcontroller (connect op-amp output to ADC pin). In such case the signal in POINT_B becomes the following:

I'm wondering what is even going on and why does the ADC drop the input voltage? All the source code is available at https://github.com/KapitonovRoman/TimerBasedAdcFFT. Basically it is a DMA enabled ADC which is configured to be triggered by a timer with a 48kHz frequency.

If instead of an ADC pin I connect a 220 Ohm resistor as a load, here is what the oscilloscope outputs:

Using a potentiometer I've figured out that the same oscillogram can be obtained in case the potentiometer is set to 28 Ohm, which means the resistance of ADC port is 28 Ohm.

The ADC pin (PORTB, PIN_0) is configured as an ADC input:

When connecting a potentiometer to the ADC pin (to test it) it gives correct values depending on the input voltage from a potentiometer:

Well, it appeared that the pin I was using is broken.


texts: Altera Cyclone II Quartus II JTAG Programming Error

texts:
I'm trying to program a Cyclone II I bought here using Quartus II 13.0sp1 on Arch Linux. I'm trying to program it with a very simple Verilog program with three inputs and two outputs and a few simple logic functions. I selected the proper model (EP2C5T144C8), assigned the pins to the inputs/outputs, compiled, and ran the programmer. I am using a JTAG USB blaster. When I run jtagconfig, I receive the following output

1) USB-Blaster [2-1.6]
    020B10DD   EP2C5

However, when I try to program the .sof file created by the compiler, I receive the following error.

Error (209015): Can't configure device. Expected JTAG ID code 0x020B10DD for device 1, but found JTAG ID code 0x000310D9.

If I run the programmer multiple times, I often get different values for the ID code that it found. Does anyone know what's wrong here?


texts:
I would like to know if there is any color code specified for CAN Bus communication wiring, maybe in ISO-11898-1? (I have no free access to the file)

I looked for any official documents without any luck.

When I asked to my colleagues about it, they all agree on the colors (Yellow and Green) but they do not agree if it is:

Yellow for CAN-H
Green for CAN-L

or instead:

Green for CAN-H
Yellow for CAN-L


texts: STM32 cannot reach individual registers and pins as PIC

texts:
I used to work with PIC and now I need to use STM32 chip. I was using HAL library but it gave me some problems so now I want to use it without HAL_Library. There are some questions I could not get any answer.

In the datasheet of any PIC there are registers and each bit of those registers are showed and explained. But in the datasheet of STM32 chips I could not find any registers. How can I find all registers in STM32 chips and specific bits of these register. For example I need to set PE bit in I2Cx_CR1 register but I have no idea which bit is the PE bit...
This one might be simple but I couldn't figure it out. Maybe it is not possible in STM32 I'm not sure. Let's say I want to set PA2. Do I need to GPIOA->ODR = 0b00000010;I am not sure how can I make it bitwise, something like this: GPIOA -> |= PA2 (?) What should I put instead of PA2 in this case?
Is it possible to use CubeMX and then do the rest in classical way like I mentioned before using individual registers without using HAL? Or if I create the project by using Cube then I have to use HAL library?


texts: Single Value range is not allowed in packed dimension

texts:
I have been reading about packed and unpacked dimensions in systemverilog  from https://www.chipverify.com/systemverilog/systemverilog-arrays, in the following code I just want to use a memory array of 64 bits width and 256 depth. This will be used in a testbench in vivado simulator.
So far, I have used many combinations on how to define the memory but always I get the same syntax error: single value range is not allowed in packed dimension, displayed is my final attempt. could you please tell me what is the issue here?
      bit [63:0] tab [256];

      tab[0] = 64'h30000000000000FF;  //RX
      tab[1] = 64'h80000000000000FF;  //TX
      tab[2] = 64'h00000000000000FF;  //SW
      tab[3] = 64'hC0000000000000FF;  //LP
      ...


texts:
I always read that pierced skin will dramatically affect skin resistance, but they never seem to specify where the open wounds are on the skin.

Say I have open wounds around my chest area, but I am touching something with my fingers. Does the location of these open wounds near my heart give me a greater risk, or only if the wounds are near where I am touching the electrified object?


texts: Driving EL wire from button push on a gamepad

texts:
I have a homemade arcade controller which uses a USB gamepad board.  I would like to add some EL wire to it such that when a specific gamepad button is pushed it lights up the EL wire.

The Gamepad circuit has one wire per button.  When the wire is floating the button state is up (as in NOT pressed), when the wire is connected to ground the button is down (pressed).  I don't remember what that is called but basically the button is a simple pushbutton switch that connects the two sides together (3.3 V and GND).  When the button is down, very little current is actually flowing through the wire.

The EL wire inverter is operated via a more simple on/off switch.  When the switch is closed, whatever current the EL wire is using will be flowing through the switch.

So all I know is I can't just connect the two grounds together and the other sides of the two switches together and control both inputs with a single pushbutton.

I think I need a solid state relay or transistor or transistor network or something where a single switch closure causes the other two switches to close and they can operate at different voltages and currents.  But I don't remember much about transistors and solid state relays seem really expensive and are targeted at high voltage / high current applications.

Help?


texts: Difference between Zero-Crossing Optoisolator and Regular Optoisolator

texts: I am trying to find any documentation on what the purpose is of a Zero-Crossing Circuit TRIAC Optoisolator.  The datasheets don't explain the concept well enough.  If you do answer, please include references or explain how you found out.  Thank you!


texts:
I have a actuator capable of measuring motor current and position via an encoder on the output shaft. The motor is a brushed DC motor  running through a gearbox.

My questions is in regards to the use of a cascaded controller model where by the output of the velocity controller sets the setpoint of the current controller. What I do not understand about this is when velocity tracking and a disturbance torque is encountered the current controller aims to reduce the output voltage to maintain the current and the velocity controller aims to increase the output voltage (via the current controller) to maintain speed. Due the response of the system this causes an exaggerated tracking error when compared to direct velocity control (Voltage Control). A feedforward term does slightly increase tracking performance but not significantly.

Is there something I am missing here? It would make more sense for the current controller to increase the current setpoint when the current measurement is increased. The reason for requiring a current control loop is to be able to set variable max current limits. Switching between "voltage control" & "Current Control" at the limits does not have a smooth response.

A example of this is shown in the image below. The first half of the graph shows the current controller being switch off and the second half shows it being turned on. The Oscillations are from a disturbance torque. It is clear that the tracking error is increased due to the current controller trying to maintain constant torque.

Any guidance would be much appreciated.


texts: Can a CM choke be used to suppress common mode current in a DC circuit?

texts:
I have a setup with a DC/DC converter like in the figure below. I need to minimize common mode current on the supply input.

There are no other connections besides Vsupply + and - and Rload + and -.

I'm in doubt whether a CM choke will help reducing the CM current. And how would it need to be connected to the grounds of the DC/DC and the load. I've drawn to ways to connect it, but I'm not happy with either one.

simulate this circuit – Schematic created using CircuitLab
In this circuit the Supply is separated from the buck and the load with a CM choke. But because the CM choke is in the supply GND - load GND path, this increases the transfer impedance. (The choke is depicted by L1 and L2)

simulate this circuit
With this connection, the transfer impedance issue is solved, but now the CM choke is partly in the feedback loop.

Can I use a CM choke to reduce CM currents to the supply? How? Should I use a different filter?


texts: LM2576 may I use bigger or lower inductors?

texts:
I'm about to build a switching (Buck) power supply with an LM2576 adjustable IC. Input voltage 30V, output from +3V up to +28V, which should run about 100 mA - 3 A load.

If I use a bigger or lower inductor will it have a big negative impact?
I have:

22uH 3A
100uH 6A
220uH 3A
330uH 3A
470uH 3A

May I use one of these?
Is it OK if I'll use 220uH, 3A?

From the datasheet it looks like I need something like 150uH 3A.
Should I use a smaller one or must it be exact?


texts:
The following LDO is supplied from 2 input sources. BAT, which is a battery from 2.5-4.2V and VBUS, which is a power adapter voltage of 12V. My understanding is that a diode has a forward voltage drop of about 0.7V. So what is the LDO input voltage if both sources are connected?

Edit: In the reference question that is linked below it is not explained how the power is shared between both sources.


texts: ENC28j60 ethernet interfacing with efm8lb1 help needed

texts:
I am a newbie to ethernet controller. I went through ENC28j60 documentation But I couldn't find a proper example similar to my project.

EFM8LB1 will read some sensor data (for example sensor data 'abcd'). if i want to display this data in How can I do this using ethernet interfacing? At least what are the things I should learn to do this? Can I do this with the Microchip TCP /IP stack?

any help is appreciated.

Thanks


texts:
I want to protect an 12V input from ESD events. The allowed input voltage range is 0V to 12V. I could use a unidirectional TVS diode for that purpose but my colleges suggest to use a bidirectional type so that the polarity of the TVS won't matter.

With the bidirectoinal TVS the clamping voltage for negative going ESD event will be higher compared to the unidirectional type.

My question is whether it will make a difference. Is the protection provided by the unidirectinal TVS actually better or is the diffence in the clamping voltage too small to actually make a difference in terms of robustness?


texts:
I am looking to upgrade my iron for SMT components and recon it's probably worth skipping the middle ground and getting myself a Metcal (as almost everyone I have asked has mentioned that they are close to as good as they get).

I was looking on Farnell and found one at a reasonable price but it seems it has no temperature control. Is this something I need or would this iron still be an excellent investment?


texts: Where do i put the Arduino "Library" folder on a Mac?


texts: Can I use a PWM controller to control the speed of a motor?

texts:
First off, I’m starting electronics as a hobby so excuse my lack of knowledge about electronics in general.

As a staring project, I was going to try and make a magnetic stirrer to use in a chemistry project. I was intending on attaching a magnet to a gear motor and control the speed using a PWM controller.

My question is: Is it ok if I use a PWM controller to manage the speed of the motor, considering it is a gear motor? I’m using a DC current of 12V 1A. The PWM module should lower the peak voltage, therefore lowering the speed of the motor right? Also, I searched the motor up and I couldn’t find a current rating. Is it ok if I use 1Amp?

Again, I apologize for my lackluster knowledge about the subject, but I did do research, although I could not find anything regarding to this topic.

Gear Motor https://www.amazon.co.uk/Motor-50-2000RPM-Speed-Reduction-Gearbox/dp/B07SR9GSR9

and

PWM controller https://www.amazon.co.uk/Controller-Adjustable-Stepless-Governor-Regulator/dp/B078TC3DTX


texts: What are the most common data storage devices in small consumer electronics?

texts: What are the standard ways of data storage in small consumer electronics (routers, phones, etc.)? For simple devices I guess microcontrolles with in-system programmable flash are enough, but for example on a smartphone, would there be an internally mounted micro-SD card or similar? Where would OS, etc. be stored?


texts: Creating a lookup table in a microcontroller using in C

texts: How can I create a lookup table in a microcontroller using C? I have one input and one output and want to implement a lookup table in C.


texts: Verilog: Data Transfer using inout ports

texts:
I have an EEPROM following I2C protocol. My  write operation was fine. While a read operation, SDA being my inout pin, during data transfer from slave, I held the pin in high impedance (Z).I received logic zero correctly but not logic ones.Clock cycles where logic 1 was expected, were showing up high impedance state.

My question is for data transfer from slave to master, should master hold the inout pins in high impedance state? If yes then why is that when data is logic 0, cycles are showing up but when data is 1, still high impedance is observed.

Is there any other value should this inout pin be assigned to so that logic 1 and logic 0 are properly transmitted?


texts:
Why should we use the line voltage instead of phase voltage when we are calculate the charging current? I mean:

Charging current \$I_C=2\pi f C V=2\pi f C \frac{V_L}{\sqrt{3}}\times 10^{-6}\ \text {A/km} \$. (\$C\$ is Electrostatic capacity \$\mu F/km\$.\$f\$ means Hz,and \$V_L\$ means line voltage  )

Why don't we say \$I_C=2\pi f C \frac{V_P}{\sqrt{3}}\times 10^{-6}\ \text {A/km} \$  or \$I_C=2\pi f C \sqrt{3}V_P\times 10^{-6}\ \text {A/km}\$ ? \$V_P\$ means phase voltage


texts: How many control pins needed for L298N H-Bridge?

texts:
I have a simple robot with two DC motors. Using the L298N Dual H-Bridge, what's the minimum number of control pins I can use to give me forward, back and turn?

Here's a typical setup for the chip. It looks like I'll need 6 control lines to control 2 motors.

If I tied Ven high and relied on the "C=D Fast Motor Stop" when idle would this be bad?

http://letsmakerobots.com/files/userpics/u4107/L298N.png
http://letsmakerobots.com/files/userpics/u4107/L298N.png


texts: Starting and stopping of a Mod N Counter for a FSM in Logisim

texts:
I'm working on a circuit for control logic. I'm using a 3 bit down counter. There is a control signal that when it goes high starts the counter by presetting it with a value of 5. The counter is clocked off of the inverse of the main clock. I am feeding the 3 bit output into a 3 to 8 decoder. This decoder represents my FSM. The states are as follows: 101 - Initialize: these actions are only done once. States 100 - 001 repeat the same actions the actions are irrelevant here. The final state which is 000 is the stop state. I was successfully able to stop the counter from looping around by sending the inverse signal of the output line from index 0 of the decoder which is state 000 into an and gate along with the inverted clock signal and my start signal. The clock successfully stops. However it kind of put me into a grid lock...

I have another and gate that takes the inverse of the start control line and the 0 index output of the decoder into the reset of the down counter. This does reset the counter but the decoder is still stuck in state 000. There is where I'm stuck. I know why it is happening but I'm not sure how to transition from state 000 back to state 111 after the start line as been toggled from high to low back to high to start it again. When the decoder hits state 0 and that output goes high even if the counter is reset, the inverse line coming from the decoder feeding into the and gate into the counter's clock input that was high before is now low and there is no logic to change it back to high to start the counting process again.

If you need any more information about my circuit don't hesitate to ask and if needs be upon request I can take a screen shot of what I have in Logisim and upload it for a visual aide. However, I think I provided enough information about what I'm trying to accomplish with my counter and FSM, I'm just not sure how to transition out of the Stop - Idle State back to the counting state of the counter.


texts: common anode LED forward voltage higher than pin

texts: I want to use this led with my teensy 4.0. The specs are Red: 2.1-2.5V Forward Voltage, at 20mA current, Green: 3.8-4.5V, Blue: 3.8-4.5V. I can supply either 3.3v or 5v. Since it's a common anode LED I have to connect the anode to power and the others to output pins. Setting a pin high would result in no light and low would connect to ground making light. Connecting the anode to 3.3v will not work since it has a lower voltage than the forward voltage of the green/blue led according to this post. 5v would be enough but since the teensy pins are not 5v tolerant only 3.3v. Would connecting the LED to 5v and then the green pin to a 25 ohm resistor then to a pin explode the teensy since on high the teensy only outputs 3.3v? I know I can use transistors but I really don't want to as they take up a lot of space.


texts: Voltage source phase shift in RC circuit

texts:
I've been doing an analysis on a particular circuit. Nothing too complicated simply a resistor and capicator in series with a 2v supply at 500Hz / 0 degrees.

Essentally what im trying to understand and eventually draw is the phaser diagram for the above circuit.

I have made the following calculations thus far;

Capacitance of the circuit

Circuit Impedance in polar form

Supply current in polar form

Voltage drop across the capacitor and resistor in polar form

I have the following (sorry for the image being massive);

What i'm unsure about is; although on the the supply voltage source states 2v, 500Hz at 0 degrees, with the capacitor in the circuit i am under the assumption that the voltage source phase angle will be shifted as a result? I am not sure how to calculate his however

Any help, advice or suggested reading would be a great help, thanks.


texts:
This resistor, from the AC side of a power supply board, has a silver third ring and a white fifth ring. I've never seen such component before :

It reads between 8 and 12 ohms on the multimeter and is not detected by my component tester
What value is it supposed to be and what does the fifth white ring means?
Thanks


texts: What is the relationship between MOSFET gate voltage and source voltage?

texts:
I understand that a Mosfet is a voltage controlled current device - but I was a bit surprised that the circuit below didn't yield a higher voltage at the Mosfet source pin (load).

If I were to use two voltage sources with a common ground, and supply a Mosfet with an ideal 32 volt supply and set the gate to 16 volts:

Why is the voltage at the source-pin so low?
How might I increase the voltage at the source-pin?

Note: I do not want to use the 32v supply for the gate because the 32v supply will be under heavy load and will encounter voltage swings of 2 - 10v.

simulate this circuit – Schematic created using CircuitLab


texts: What's the best way to virtually design and test your circuits?

texts: I've been reading up on some old tech manuals and found that apparently some IC chips where designed and tested in BASIC. While I already have a copy of Eagle and fritzing these are more for board designs and not IC development. So as the title asks, what would the best way to go about designing and testing hardware before even laying down any solder?


texts:
I am wondering if I can use two normal transformers to form a center-tap transformer..

Here's what it looks like:
If I use the right number of turns, would the transformer on the left same as the center-tap transformer on the right? Or how could I make them equivalent?

I am trying to get the left transformer working as the center tap transformer: provide positive and negative voltage at pin 3 and pin 4 with pin 5 connects to ground.

Thanks!


texts: What the function of zener diode on this picture

texts: I am confuse,  why we need clamping with zener diode because it doesnt matter when vgs goee below zero, cmiiw


texts:
I ran into an issue with my project. I use Renesas RL78 microcontroller and on one I2C bus I have two sensors: digital compass and accelerometer. Accelerometer type is MMA8453 by Freescale.

Datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8453Q.pdf

I have no problem with reading data from compass. Accelerometer, however, is a different story. I can't read anything from it - at least I guess I'm not getting anything. Unfortunately I don't have scope or logic analyzer to check out. I get an ACK, but no data.

Here is the function I use for reading register of I2C device:

uint8_t Read_I2C_Sensor_Reg(uint8_t DevAddr, uint8_t RegAddr, uint8_t *Data, uint8_t Numbytes, uint8_t wait)
{
    uint16_t status = 0;
    uint16_t timeout = 1000; //approx 32uSec
    DevAddr <<= 1;      //Shifting left by one bit to make room for Read/Write bit

    IICA0_Err = 0;
    IICA0_Tx_Done |= 1;
    status = IICA0_Master_Send(DevAddr, &RegAddr, 1,  wait);
    while(IICA0_Tx_Done)
    {
        while(timeout--);
        iica0_master_check_status();    //<SCH> checking the transation status, in case if this fails, report andre initiate transaction.
        if(IICA0_Err)
        {
            status = IICA0_Err ; break;
        }
    }
    if (IICA0_Tx_Done == 0)
    {
        IICA0_StopCondition();
        while (SPD0 == 0);

        IICA0_Rx_Done |= 1;
        status = IICA0_Master_Receive(DevAddr, Data, Numbytes,  wait);
        while(IICA0_Rx_Done)
        {
            while(timeout--);
            iica0_master_check_status();
            if(IICA0_Err)
            {
                status = IICA0_Err ; break;
            }
        }

        if (IICA0_Tx_Done == 0)
        {
            IICA0_StopCondition();
            while (SPD0 == 0);
        }
    }

    if (status == MD_OK)
      return 0;
    else
      return 1;
}

Did anyone come across this kind of issue? I can post more details later, if needed.


texts:
Calculating Capacitance and Inductance from Capacitive Reactance and Inductive Reactance

I'm trying to find the inductor (L) and capacitor (C) values using the inductive reactance (XL) and capacitive reactance (XC).
Edit: I also have the frequency (f=50 Hz).

I know \$XL = 2\pi f L\$ and I know \$XC = \dfrac{1}{2\pi f C}\$, but I am not the best at reversing formulas, I am still learning.

Can anyone confirm the correct formulas please?

I have tried assigning random values to each part of the equations, but my answers don't seem to match up for some reason. I don't know where I am going wrong, but nevertheless keen to learn and willing to ask.

I have also tried searching online, but the only articles I can find of relevance are about calculating XC and XL, not C and L from XC and XL.


texts: STM32 & ST-LINK - SWD connector not working

texts:
I am using an ST-LINK/V2 debugger (Firmware version V2.J27.S6, up-to-date) to program my STM32F407G discovery board. So far, I have been using USB to flash the MCU, using the STM32 ST-LINK Utility v4.0.0.0 (driver v4.4.0.0, st-link_cli.exe v3.0.0.0, should all be up-to-date). Now we are getting rid of the discovery board and we need to flash the MCU using the SWD interface. However, I found some behaviour which is inconsistent with the ST-LINK/V2 debugger manual (UM1075).

The connection of pins as per manual is

JTAG (on ST-LINK debugger) - SWD (CN2 on STM32 board)

1 - 1 (MCU VDD)
5 - 2 (GND)
7 - 3 (SWDIO)
9 - 4 (SWDCLK)

However, in this configuration I get the error

  Can not connect to target!

The logfile reads

  ST-Link/V2 device detected
  Target voltage detected: 0.722835
  Error getting target IDCODE: if SWD, check SWD connection
  Error (4) while initializing ST-Link in SWD mode

This error I found also in this question but no satisfying answer. I think it essentially means that it does not detect the VDD voltage on the STM32 board (although it is powered with 3V).

I managed to solve the issue by directly connecting the pins in the following way:

JTAG 1 - P1 VDD
JTAG 5 - P1 GND
JTAG 7 - P2 PA13
JTAG 9 - P2 PA15

And now everything works fine, I can flash the board as I used to with USB.

I found similar questions here and here but none of them helped.

Interestingly, both types of behaviour do not depend on the ST-LINK CN3 jumper positions on the STM32 board. (Why not?)

Why can't I use the SWD connector? Why does the ST-LINK/V2 do not detect the VDD voltage?

Edit

Found that R2 is not fitted (see SWD schematic p. 27 of STM32F407G discovery board manual). I had suspected fitting this with a 100R resistor would solve the problem but it made no difference.


texts: Raspberry Pi sometimes detects wrong keypad number

texts:
I am using a 3 x 4 Sparkfun keypad connected to a Raspberry Pi.
The issue I am facing is that 40% of the time wrong keypad numbers get detected after pressing the button.
For example, when I press "6", "3" is detected which is directly above "6." The same happens with "5" and "2" and likewise in the 2nd and 3rd row. No issue occurs in the first row as no buttons are above it.
I have used the below code by following a tutorial. I don't know if it's a software or a hardware issue.  I have two of these keypads and the same problem occurs in both.
def readLine(line, characters):
    GPIO.output(line, GPIO.HIGH)
    if(GPIO.input(C1) == 1):
            print(characters[0])
    if(GPIO.input(C2) == 1):
                print(characters[1])
    if(GPIO.input(C3) == 1):
            print(characters[2])
    if(GPIO.input(C4) == 1):
            print(characters[3])
    GPIO.output(line, GPIO.LOW)

try:
    while True:
            readLine(L1, ["1","2","3","A"])
            readLine(L2, ["4","5","6","B"])
            readLine(L3, ["7","8","9","C"])
            readLine(L4, ["*","0","#","D"])
            time.sleep(0.1)
except KeyboardInterrupt:
    print("\nApplication stopped!")


texts: How to measure current to detect motor stall on H-Bridge driven motor?

texts:
I have DC motor with a gearbox to transforms the rotational movement to linear movement and movie a pin back and forward.

I need to know when the pin reaches the two positions: full back or full forward.

The motor is a simple DC brushed one (3V low speed, the current on free movement is around 11.8mA) and it will be driven by an ESP8266 through an H-Bridge.

There're no sensors to detect pin position (and nonot enough space to add them), so my idea is to measure the motor current and when I read a fast increment it means the pin is full forward/backward (motor close to stall).

How can I measure the current and read by a microcontroller to drive the motor via H-bridge?


texts:
I try and upload my design, which worked previously, using quartus prime 17.1 to an Altera DE2-115.

It fails like this: Error (209015): Can't configure device. Expected JTAG ID code 0x020F10DD for device 1, but found JTAG ID code 0x020B40DD. Make sure the location of the target device on the circuit board matches the device's location in the device chain in the Chain Description File (.cdf).

What does it mean?


texts:
first post here

I was wanting some help with a fuzz pedal kit I recently bought on ebay. I'm relatively new to electronics and I'm no genius in this area, but I've been really frustrated for the past few days. I built this circuitboard exactly as I was instructed, yet it doesn't work and I can't figure out why.

The guy never send me a circuit diagram, but instead, more of a literal interpretation of what it would look like. Here it is -

If that is a little hard to make out, here is my own circuit diagram that I drew up (I apologize in advance for the poor quality and clarity of the diagram, I've never drawn one before)

When the switch is off, and the effect is bypassed, the guitar sounds fine, as if it was plugged in to the amp with no alteration to the sound. When I turn the switch on, I get a really crappy result. If the potentiometer is turned all the way to the left, I get a little bit of the original signal, but it's quiet and a bit lo-fi. When I turn the potentiometer to the right, I lose sound altogether... silence.

Another thing worth mentioning is that it doesn't seem to make a difference whether the battery is plugged in or not. I've tested the battery with a voltmeter and it's definetely working and has a lot of juice. I've also tested the battery socket on a breadboard incase the socket was faulty, but the socket is working fine too.

I know this isn't a lot of information to go on, but I was hoping that some of you veterans out there might be able to narrow it down for me. Based on this information, can anybody narrow down what part (or possible parts) of my circuit is faulty/busted? I have no doubt that the circuit is set up exactly the way I was instructed, and I was very careful with my soldering, there's no globby solder bridging the strips on the board.

Once again, I know this isn't a lot of info to work with, but I have no idea where to look or what to try. It doesn't work, and I don't know what to do about it


texts: Effect on Open Circuit Test result, if rated Voltage and Frequency is doubled?

texts:
" If Open circuit test was done on a transformer with rated voltage and rated frequency in order to find out core losses. If rated voltage and rated frequency becomes double then "

Above was the question statement, the correct answer given was The current as well as the power factor will increase.

I have understood, why the current will increase. But, the power factor should decrease.


texts: Flip the image of OLED 128x64 0.96 inch display

texts:
I am looking for a method to flip the image of an OLED 128x64 0.96 inch (with SSD1306 driver) display. It is the one I have with 4 pins only (image found on Internet):

What I want to do is:

Are there any currently possible ways to do this with an Arduino?

I saw on different forums that people are flipping their displays because of a library problem. Can I do that intentionally to achieve it?

I thought I could get every single pixel and position it again, but it would take up so much ram. If that is the only solution, could you please tell me how can I get the pixel, whether it is on or not, from Arduino?

Thanks in advance!


texts: What is the difference between 2N7000 and 2N7002 MOSFETs?

texts:
Is there any difference between 2N7000 and 2N7002? Can I replace them without changing pre-existing circuits, beside physical/package sizes? Normally for a 2N7000 I use a 100Ohm gate resistor and 1.2MOhm gate to drain resistor. Is it the same for a 2N7002?

edit - here is a electrical characteristic comparison between 2N7000 vs 2N7002


texts: Bury LED in concrete outside, how to protect

texts:
I am wanting to place a 3mm LED and carbon resistor, outside between two paving stones. There is about a 4mm gap between pavers where the parts will be. The top of the Led will be flush with the top of the pavers and there will be wires running under the paving stones to remotely power it. There will be one led every 40cm for around 6m, where they are being used to provide a diffuse glow to underlight a rock wall. No room to place a more traditional sealed unit.

How can I protect the Led leads and resistor from moisture? Will heat shrink be sufficient or is there something better to encase it in? I know this will not be a perfect solution but I am hoping to provide something that can survive a few years. With it being set in concrete, I only get one chance to get it right.

Once the led/resistor are placed between the pavers, locking sand will be poured around them, which sets like concrete after being wet once. Only the top of the led lens will be visible. Problem I see is that moisture will still seep through somewhere.


texts: Problem in writing register maps using C structure for a TI Microcontroller

texts:
I am writing register maps in C for a TI ARM based Micro-controller board. Here is the link to the datasheet.

I am using the following guidelines on how Register maps should be written in C: Register Maps. These guidelines are similar to ARMs CMSIS (Cortex Microcontroller Software Interface Standard) for writing C code.

I am facing problem with writing System Control Register maps(refer section 5.5 page 237 onwards in datasheet) using C struct. All registers are of size 32-bits

The base address is 0x400F.E000.
Register 1: Device Identification 0(DID0), offset 0x000
Register 2: Device Identification 1 (DID1), offset 0x004
Register 3: Brown-Out Reset Control (PBORCTL), offset 0x030
Register 4: Raw Interrupt Status (RIS), offset 0x050
etc..

If I now write a structure like this:

typedef struct
{
   uint32_t DID0;      // offset 0x000. distance: 0
   uint32_t DID1;      // offset 0x004. distance: 4
   uint32_t PBORCTL;   // **HOW to place this at offset 0x030 ?**
   uint32_t RIS;       // **HOW  to place this at offset 0x050 ?**
   // ...and so on
 }PER_REG_MAP_T;

#define PERIPH_BASE ((uint32_t)0x400FE000)
#define MY_PERIPH_A ((PER_REG_MAP_T*)PERIPH_BASE)

void Reset(PER_REG_MAP_T* PERIPH_A)
{
  PERIPH_A->DID0 = 0;
  PERIPH_A->DID1= 0;
  PERIPH_A->PBORCTL= 1;
  PERIPH_A->RIS= 0;
  // .. and so on
}

The main issue I am facing is how to place PBORCTL and RIS inside the structure as they are at offset 0x030  and 0x050 with respect to the base address of the structure. I have not done too much bit-level C-programming before so this question might be too simple, but I donot know how to do it.


texts:
I have an arduino application doing two things in the loop:

A webserver that waits for a connection and renders some html forms to change configuration values.
Process some external data and show them on an matrix of leds.

The problem is that the processing of the data takes much time (~20 seconds). So while this time, the webserver can't do anything. My programm structure looks like this:

EthernetServer server(80);

void loop() {
  webServer()

  processAndShowData();
}

void webServer() {
  EthernetClient serverClient = server.available();

  if (serverClient) {
    while (serverClient.connected() {
      // handle the web server stuff in here
    }
  }
}

So my question is, if there is any posibility to use a interrupt handler for handling the web server stuff? Then the web server could react while the other task is running.

UPDATE: I now also tried to attach an interrupt to the ethernet pins (using a Mega this are 50, 51 and 52), but this doesn't work too. I tried sth. like this:

attachInterrupt(50, demoFunction, CHANGE);

But the method does not get called, even when changing the pins to 51 or 52 on both, input from a client like a HTTP request and output sending HTML to a browser.


texts: Adapting 18650 Lion specs to charge 6 in parallel

texts:
I have an eBike battery pack of 78 18650 cells (13s6p) that I need to charge for storage pending a BMS. I have the following specs from the data sheet:

I want to charge the individual cells (of six 18650 each) independently. I only plan to do this once as I plan to have a BMS as soon as possible. I have no way of testing current. I do have a 2A 5v power supply. If I were to put a resister on it to reduce the voltage to 4.5 I assume the current will drop as well. If I did this (tell me if it is a bad idea) how should I alter the charging time to safely charge the cell?


texts: DC circuit, fan grounded through a capacitor

texts:
First of all I apologise if this is a silly question; I fully admit to being an enthusiastic amateur and although I've done a search for the answer already, it's possible that this is super simple and I've just missed it.
Anyway, I'm trying to mod my 3D printer with some quieter fans. As part of the process I tried to figure out what pin on each of the fan JST connectors go to ground.
I can see that that one of the connectors for each are shorted to each other, and that those same pins cause my multimeter to show continuity to other ground connections, but only for about 3-4 seconds. If I swap my mutlimeter prongs over, it will need for another 3-4 second.
The only conclusion I can come to is that they go to ground through a capacitor, but I can't figure out why that would be?
It doesn't really block my modding, but I'd like to understand why this might be.
EDIT:
The circuit board is the main board for a Flashforge Adventurer 3 3D printer.
Here are some pictures which should help somewhat:

Better description of what I'm seeing:
The fan ports for fan A and fan B connect to chassis fans in the printer with fan A running all the time that the printer is on. Fan B only runs whilst printing.
I'm in the middle of creating a small, very simple board that will take the 24v, convert it into 12v, and use that to power better, noctua fans. The conversion is necessary because the 40mm fans don't seem to come in 24v. I'm more or less happy to struggle along with that aspect myself.
With the fans removed, if I stick my multimeter (I don't have an oscilloscope) across A1 and B1 I get a short, which I don't think is conclusive of them being ground, as the logic to turn them on and off could be past the load/fans?
If I use my multimeter across either A1 or B1 and one of those ground pads with the red arrows, I get a beep for about 3-4 seconds as previously described. Swap the probes, and the beep comes back again for the same amount of time.
An annoying wrinkle just discovered, is that the same pins (A1, B1) do a similar intermittent beep when checking for continuity against VCC, but for about 1 second per probe swap.
I would really like to have an understanding of what might be going on here, but more than anything, I would like to have some clue as to the best way to discern ground from these fan pins so I can wire my little board up properly!
Really appreciate everyone's help.


texts: I2C max pull-up resistors and current sink

texts:
I design a system with several devices connected to 400kHz I2C interface with wires.

For now, I get shark fins instead of square waves, so I decrease pull up resistors value. The MCU, which drives the I2C communication is STM32F303, and its datasheet states: "I2C Fast mode plus (1 Mbit/s) with 20mA current sink". Does it mean that each pin (Data and Clock) can sink 20mA, and is it sustainable current or short peak value?

I am testing 500 Ohm resistors on my 3.3V system now. 3.3V/500Ohm = 6.6mA. I still get errors and the square is not good enough, I guess. May I go lower, 250 maybe?

Edit: I tried 340 Ohm resistors (around 10mA sink), and it is working for now. Almost no errors (1-2 per minute maybe, under load).

The system has motors, when motor load goes up, errors increase. I am using ferrite rings on the motor lines. Moving motor wires and I2C lines around does not seem to affect anything. I see some noise via oscilloscope. The only thing that affects error count for now is resistors values.


texts: Where or when is it unsafe to clean using compressed air?

texts:
There's this lesson on ICT for us in cleaning computers and their equipment. One of the components that can be used for cleaning is something called compressed air.
Just to make sure, which computer equipment is/are unsafe to clean using compressed air or when is it unsafe to clean using it?


texts:
The supply for the device has relatively dirty 5V power. I was looking for the way to suppress the noise produced by the other modular components in the device, and was recommended this circuit as a good example. Here's the related cutout of the circuit diagram:

Even more, I have found more "elaborate" circuit regarding the power scheme:

There're precision op-amps and other ICs connected down the power rail with absolute maximum breakdown power voltage of 6V.

I decided to simulate the circuit, and found very interesting things...

Here's the simulation with relatively slow edge - 10 milliseconds from 0 to 5 volts. We can see here that voltage on the output rises together with the input voltage, and there's small oscillation of the filter with up to 120 mA flowing through the inductor:

However if I change the slope to 10 microseconds, I get impressive overvoltage:

With up to 10 V of output voltage (twice the input) and 7 A current flowing through the inductor.

Well, my first question was what the heck precision amplifiers down the road not frying as I was said that hundreds of these devices were assmbled and all function properly. Ok, my first guess is that the stuff is being powered by the USB, and USB used to have current limit on its power lines, and it cuts power to the circuit as long as LC starts consuming more than, say, 500 mA.

Then the next thought I had - then it would be completely different story if this circuit is connected to the ATX power supply which can deliver amps of the power through its 5 V power rail. Everything would literally fry. Well, maybe not a very good example as ATX standard specifies power rise times at power on. Let's take slighty another example: this device is plugged into powered up ATX power supply.

By the way, here's original circuit (from the resposbile author):

It has totally different powering scheme: USB powers FT232 chip only, uses isolators and all device internals are powered from the another lab power supply.

So the question(s):

Does the simulation show correct symptom for frying the device if connected to different power supply (or "unrestricted" USB port if such exists)?
Am I correct supposing that circuit does not fry because USB port has current limitation?
Can L-filter be ever used (so easily) to filter power, and what are the best practices?


texts: How to hook up an FPGA to a component that has a different power supply?

texts:
I recently programmed my FPGA with a logic analyzer core for the purpose of reverse engineering a crappy modem I have. I found on it what I think is either JTAG or TTL-serial pads. There are 4 blank holes and from what I can tell, 2 pins go to the processor and the other two pins go to power(3.3V) and ground.

The ground pin I'm for sure is ground however. It has near 0 resistance with one of the pins from the power supply. (I assume it's connected through a ground-plane). All of my measurements with a multi-meter seemed to say nothing exceeds 3.3V off of these pins

Now, my problem: I want to hook an FPGA up to this to figure out what this port actually does. The FPGA is hooked up to my computer and gets it's power over USB. I tried measuring with a multimeter what the ground difference is(GND from FPGA to GND of modem) and I got back a surprising result. There appears to be a difference of about 20-23V.. I sure don't want to hook my 3.3V FPGA up to this with that kind of voltage.

So what exactly should I do? I assume the difference is because the power supply of the modem is not grounded(no third prong)

How do I safely hook my FPGA up to this externally supplied modem without frying the modem or my FPGA?


texts: How to get CE markings for a PC I assembled from CE certified components?

texts:
If I purchase a kit from a website like overclockers.co.uk which includes a quality power supply, motherboard, CPU, etc. Everything is CE certified and all components are the highest grade. All I am doing is placing the components in an enclosure, so I cannot imagine a circumstance where they will violate CE.

What would be the most cost-effective (and legal!) way to add the CE markings to the finished product?

EDIT: This is to sell an assembled PC


texts: why MOSFET output is oscillating like this ?

texts:
In this circuit schematics :
why this output is like this?
All voltages are dc voltage . From values , we can assume that this change is in mV or uV level.I totally don't understand whats going on here. anyone can explain .
Shouldn't be the output voltage is fixed dc ?
conditions for PMOS :

and this are the conditions for NMOS :

thanks in advance.


texts: Noise in simple BC547-Raspberry Pi GPIO doorbell?

texts:
I've connected a Raspberry Pi to my Friedland "Ding Dong" doorbell. The doorbell has two (apparently unused) terminals, over which there seems to be a stable voltage of 1 mV when the button is not pressed, and a stable voltage of 4.8 V when the button is pressed.

To get this signal into the Raspberry Pi, I've come up with this simple design:

Between the switch and the resistor is 10 m of UTP cable. The resistor is the largest one I had, and it can still trigger the transistor. I'm running the GPIO input high (pull-up resistor) so a signal on the base pulls it down to ground.

My problem is that every once in a while, a signal will be detected when there is none. I know noone rang my doorbell, but the Raspberry Pi detects a signal (I'm using Python3 GPIO.wait_for_edge, like this:)

 GPIO.wait_for_edge(pin,GPIO.FALLING)

So I suppose some noise can trigger the transistor? But what can I do about it?


texts:
Am building myself a robot chasis that is RC controlled.  There is an RC receiver attached in solution and I have a remote RC transmitter.  When the motors are not running, I get a perfectly clean signal on the output of my receiver ... a PWM signal.  Here is a quick trace when the motors are NOT running:

When I switch on the motors, and then run them up, the signal as measured on the PWM output becomes the following:

If you look closely, you can see the good signal (every 20 msecs) but with lots and lots of noise.

Here is a picture of my robotics chassis:

My scenario was previously working but in this setup, two things have changed:

I am using a metal sheet for my chassis
I am using 4 new motors that I previously hadn't used before.  They are 170RPM motors as found here:

https://www.servocity.com/html/170_rpm_econ_gearmotor__638354.html

My questions are:

What is introducing this "noise" when the motors run?
How can I eliminate the noise?

Unfortunately I'm a "software" guy and mechanical electronics is not my comfort zone but am willing to learn/study.

Looking forward to any assistance.

... later ...

I have a new clue, I placed my digital signal analyzer on an otherwise unused GPIO on the Raspberry Pi and when the motors were not running, the signal was constant flat.  However, when I ran the motors, interference was found ... see:

This makes me think that the "setup" is receiving a ton of interference when the motors run ... but I'm at a loss of how to alleviate the problem.

Neil

... later ... after answer proposal from Richard ...

I soldered in 3 capacitors per motor.  Each capacitor was 0.1uF.  One capacitor across the +/- of the motor and two capacitors from the motor terminals to the casing.

See (sorry about the blur):

I then re-ran the tests and captured a new signal analyzer recording.  Sadly, nothing obvious has changed.  See:

With no motors running, a perfectly flat line.


texts: Is high earth to neutral voltage in single phase power supply system indication of high earth resistance?

texts:
In a single phase power supply system, if I measure the earth to neutral voltage, can I use it to indicate the health or status of the earth resistance i.e. if E-N voltage is high, is it due to earth resistance being high?
Is my following understanding correct:

In single phase electrical system,  if earth resistance is high, earth to neutral voltage will be high.

Corollary- High earth resistance is the ONLY reason for high earth to neutral voltage in single phase electrical system.


texts: ReRAM CMOS compatibility (vs phase change memory)

texts:
When ReRAM is described as having good compatibility with CMOS processes, it means that ReRAM can be constructed with "standard" manufacturing processes, correct? Meaning that it can be grown with typical thin film deposition methods?

This, as opposed to phase change memory, which uses more "exotic" compounds and therefore isn't as "CMOS compatible" as ReRAM?


texts: Temperature Controlled System using LM 35

texts:
The fan should start to rotate when the temperature is above the threshold temperature and stop when the surrounding becomes cool. But the fan starts rotating as soon as the power supply is connected and does not stop even when the threshold temperature is changed. NO feedback is being provided. I used 9V power supply. How to rectify this?
Link for temperature controlled system using LM35


texts: Don't understand how these resistors operate in this circuit

texts:
When reading a manual on using a PICAXE and an I2C device I saw this diagram.

I can't work how this would behave as wouldn't it make the connection on the lines constantly high due to the connection to the power rail, so never goes low. I understand that they are open-drain lines and they are needed inorder to make the lines go high but how can it make them go low with that connection to the positive rail?


texts: creating mp3 device playing sound in specific time

texts:
I need help with creating device that will be able to play sound (can be recorded or from mp3/wav...) at certain time, for example at 8:00PM, 8:15PM; 8:30PM ...until 5:00AM. Device must be powered from battery and must be working for more than 2-3 months. Sound is about max 10 seconds and it should not be loud but also not quiet.
I found that for directly recording can be useful ISD1820 but then I need to set relay and clock.
Then I found VS1003, and I think that this chip can be able to do that without setting relay and clock.
If anyone can help me or know something better I would really appreciate that.


texts: CS5340 does not generate clock signals correctly

texts:
I am trying to build a sound input for Raspberry Pi 3B using CS5340-CZZ as an ADC. I am basically using it according to the typical connection diagram in its datasheet, where I have a signal from a microphone amplified by a LM4808 on the input. I have connected a 8.192MHz clock on the MCLK pins and configured it to the Single-Speed Master Mode, but I am getting this on the SCLK (PCM clock) and LRCK (PCM frame) pins:

So as you can see the signal on the SCLK pin is irregular and the signal on the LRCK pin has a wrong frequency. I also tried to use the chip in the Slave Mode, in which I of course get the correct clock signals generated by the RPi, but then the chip seems to be sending no respose on the SDOUT pin.
Could the problem be caused by the fact, that I have the chip soldered on a SMD to breadboard adapter and the rest of my circuit is on the breadboard? Or is the chip itself broken? Or is it caused by something else altogether?


texts: Compact 250V+ fuse holder for PCB mounting

texts:
I've got a design that I'm working on which requires a number of separate 250V fuses (5 off) on a PCB.
Since I'm trying to make the PCB as compact as possible, standard 5x20mm fuses aren't really suitable.
I've seen that both Littelfuse and Schurter have 250V surface mount fuses available, but these don't appear to have PCB fuse holders rated at 250V+, and I'd really rather use a fuse holder in this application (both for the ease of fuse replacement, and to shroud the 'live' terminals just slightly more).
I originally fell into the trap of designing around mini blade fuses, since there were plenty of 500V rated mini blade fuse holders... but it fell apart when I then went to BOM both fuses and fuse holders, and found that the fuses themselves maxed out at like ~50V...
Is there a typical way that others approach mains voltage fusing on a PCB to keep things compact?


texts: negative voltage appears on PNP transistor collector

texts:
I'm coming to electronic from sw side so I have holes in my e-knowledge... please help solve this situation.
I have an MCU pin connected to a BC327 pnp base through an 1K resistor. I wish to switch the power of something else with that. The emitter of transistor connected to +5V. The collector is not connected to anywhere yet.
When I pull the MCU pin to 0V base gets low and the transistor gives +5V on its collector - it is what I expected.
When I pull up to +5V the MCU pin (and therefore the base) I can measure about -10V at the collector of the transistor relative to the 0V. Ups, it's not what I expected. I expected 0V.
I'm afraid of damaging the whole stuff and I don't dare to make more experimentations. So my questions are:
- is it normal when collector is not connected to anywhere?
- is it refers to a damaged transistor potentially?
- if the answers to the above questions were "no" what else can cause this symptom?

Thanks in advance,
F


texts: Explain Rayleigh Fading in plain English

texts:
For a couple of days I am trying to understand the Rayleigh Fading model, but I am failing to.
I look at various articles and tutorials online, everything goes fine up to a points, but then a lot of formulas which I can not decode come up, and I loose it from there.

So far I can only talk about the basic stuff: the Rayleigh Fading model uses a statistical approach to analyse the propagation, and is most applicable to instances where there are many different signal paths (multipath propagation), none of which is dominant. This much knowledge is not enough to understand the idea behind Rayleigh fading. Could someone elaborate a bit more on the important details.

More advanced questions:

What is the relation between this model and the Shannon Theorem?

What is the relation between the Rayleigh Distribution and Central Limit Theorem


texts: MOSFET controlled by optocoupler using Arduino

texts:
I have a question about using an Arduino to control a MOSFET with optocoupler. The question is, the supply voltage may vary from 5 to 36 Volts. For example, sometimes I will use a 5V switching regulator with a 5V LED strip, and other times using a 36V to supply something else at 36V ratings.

I choose an Onsemi MOSFET: NTD70N03R, it has MAX VGS for 20V. So apply the maximum 36V directly to Gate will just kill the MOSFET right? After considering another topic, which used a resistor divider to scale down the gate voltage to half the supply voltage. This is OK under 36V supply, but I will have a voltage too low (5-0.4/2 = 2.3V, 0.4 is optocoupler's saturation voltage) using the half divider under 5V supply voltage. NTD70N03R's VGS(th) is 2V max, so 2.3V is just OK to "open" my MOSFET. But after considering this curve:

I found that the RDS(on) is larger under small VGS like 2.3V. So I want a larger VGS for smaller RDS(on), then I thought to use an 10V zener diode 1N4740A without resistor divider, here is my schematic:

D1 is a LED for indicating, R3 is a pull down resistor for MOSFET, D2 is a 10V Zener diode and R4 just limit the current through D2. Thus, when supply voltage VEE < 10V, D2 and R4 won't work, VGS = VEE; when VEE > 10V, D2 just regulate VGS to 10V, for maximum VEE 36V, current through D2 will be 36-10/1k=26mA, below 1N4740A's IZM 91mA, so 1N4740A won't die.

I am a newbee in electronics, I don't know if all I said (calculate and design and so on...) is right. I will definitely wire up my circuit to test it later, but I am wondering if I can get some suggestions?


texts: Is it possible to measure lightning discharges as Nikola Tesla?

texts:
Nikola Tesla stated in his patent, Art of Transmitting Electrical Energy Through Natural Medium, that he used sensitive instruments to measure lightning discharges:

  In the course of certain investigations which I carried on for the
  purpose of studying the effects of lightning discharges upon the
  electrical condition of the earth I observed that sensitive receiving
  instruments arranged so as to be capable of responding to electrical
  disturbances created by the discharges at times failed to respond when
  they should have done so, and upon inquiring into the causes of this
  unexpected behavior I discovered it to be due to the character of the
  electrical waves which were produced in the earth by the lightning
  discharges and which had nodal regions following at definite distances
  the shifting source of the disturbances. From data obtained in a large
  number of observations of the maxima and minima of these waves I
  found their length to vary approximately from twenty-five to seventy
  kilometers, and these results and certain theoretical deductions led
  me to the conclusion that waves of this kind may be propagated in all
  directions over the globe and that they may be of still more widely
  differing lengths, the extreme limits being imposed by the physical
  dimensions and properties of the earth.

Does anyone knows of such method of measurement? How does it work?
Did anyone else ever get the same results as Nikola Tesla? Is it possible with modern instruments and methods to measure electrical waves produced by lightning?


texts: Why do we reset/clear at 1010 (10) when designing a BCD Ripple Counter

texts: Shouldn't we reset at 9, I believe that a decade counter goes as follows '0->1->2->3...->8->9->0" or at least that's how its done for synchronous BCD counters.


texts: Calculate DC pulsed Current going into Inverter

texts: Have created a DC battery monitor for a Narrowboat. All the sensors work as exspected except the one measuring the current to the Inverter, which I cannot get to show the correct value. I have tried using a current transducers and also a current transformer. The problem is this a pulsed dc Current created by the switching of the GBT's and I thought you could just calculate the average amplitude of the waveform created. By slicing it then adding together and dividing by the number of slices, but that does not work, does not give correct value.  A multimeter reads what I believe is the correct voltage from the current sensors, and changes as exspected with change in load, and a Clamp DC meter does give the current, but when the ADC in the micontroller reads this same voltage value that the multimeter reads, I get the wrong values.  I tried uploading the graph of values read by the ADC, but


texts: Designing RJ45 connector to have 100Ω differential impedance

texts:
I'm designing two pairs of connectors that have same layout as RJ45 (just 2 inner pins) to have 100 ohm impedance deferentially.

Are there tools that allow to calculate impedance or articles/guides? There are tons of calculators that compute impedance of transmission lines on a substrate but I found out that changing substrate thickness drastically affects impedance even if I set it as air.
I was thinking I could construct C and L matrices and compute characteristic impedance from there but I don't know if that's the right approach.


texts: I am salvaging parts from a broken VCR and pulled off this. Unfortunately, I was not able to see what was written on the PCB next to it. The code written on the side is either S083 or SO83. I searched this on Digikey and couldn't find a match.


texts:
After a few months of questions and modifications to my design. I have what I believe to be a LED Spinner that can change the speed of the spinning LED. Before I send this design off to get printed on a board, I wanted to see if I could get it reviewed by the magnificent people that roam this forum.
A quick overview: I have a 1.2288MHz crystal feeding into a 74HC4040 to bring the frequency down to 300Hz, then that will be fed into a 74LS390 to bring it down to 60Hz, 30Hz and 15Hz. those frequencies will then be fed into a 74LS126 so that only one frequency gets fed into the CD4017 that controls the LEDs. Most of this design was made possible with the help of user peufeu in a previous question: Link
The power coming in is from 2 series fenix 4800mAh 3.7V batteries pushed through a linear regulator down to 5V. Then a circuit that I must say came from user Dave_Tweed in my previous question:Link to make it so my switch will turn the circuit completely off when put in position 5. this switch will feen into the 74LS126 to choose at what speed the LEDs spin. I added a pull down resistor on each line here since I figured leaving it open might not go well.
Here is the schematic:

If needed, I can post the datasheets for all the ICs in the schematic.
I just want to know if I did everything correctly, and if not, what did I do wrong and why is it wrong?
Thank you
PS: Thanks in advance for the correction edit.


texts:
I have a situation where I have two inputs, A and B. These inputs control a device. Input A acts as a direction select and Input B acts as a "GO" command. I only want the device to "GO" if I know that input A is connected via the relay.

My thought is to use the circuit below. I know it won't be able to check the presence of input A, but will it guarantee that whenever the relay closes, both Input A and input B will be connected? Or is there a better way to do this?

Without knowing the internals have a non-latching relay, is it possible that one input closes while the other doesn't? Presumably it can happen if the contact gets dirty?

simulate this circuit – Schematic created using CircuitLab


texts: I have a file witch was designed with "Altium Designer". How could i view this file without needing to install "Altium Designer"? it is preferred to do this with an online app.


texts:
I have a device with integrated NiCd charger. Would it be feasible to modify it to work with NiMH batteries? If necessary, I'm ready to rebuild the whole circuit.

Also what are main differences between NiMH and NiCd battery charging cycles?


texts: Why interfaces and buses gets faster with every version if they are physically the same?

texts: An interface or computer expansion bus gets faster with every version eg. PCI express 1.0 is 4GB/sm, PCI express 2.0 is 8GB/s, PCI express 3.0 is 16GB/s. I understand that things like microprocessors get faster because newer ones are manufactured in better way, but these buses are all physically the same (at least they look like and are compatible). So how come that every version is 2x times faster if it is physically the same as the old one? Why couldn't it be 16GB/s in the first place?


texts: Exercise about voltage thresholds of logical port

texts:
I don't understand how professor resolves this exercise!

I have two connected logical port and I want to calculate the time of transition from low to high for example.

In the solution, the minimum time is the time to reach \$V_{il}\$ and max time is the time to reach \$V_{ih}\$.
My doubt is this: in the voltages between \$V_{il}\$ and \$V_{ih}\$, the second port, for the definition of \$V_{il}\$ don't understand high (I guess) because it is a zone of transition, so, why it is the minimum time of transition from low to high?


texts: Energy conversion from Electrical to Mechanical

texts:
I have a requirement where I have to design a very small device capable of pulling in and out a small piston through a feedback.I know it can be done using motor but AFAIK I need higher voltage and current which is not possible through, in my case,a button cell rated 1.5 V.

Here I seek your suggestion, is there any other effective solution to convert electrical energy to mechanical energy.I thought about an electric spark to initiate some chemical reaction(like in automobile) but it was complete failure as I needed to generate high voltage.Thanks for your help.


texts: Potentiostat measurements not syncing with main control board

texts:
I have quite the perplexing issue I was hoping to  get some help with troubleshooting. It involves communication between an Arduino AtMega2560 board that both commands a potentiostat (built using a PIC16) to sample the current response over a resistor and then records the given sampled voltage and current back onto the Arduino + SD card for data storage purposes. They communicate via UART and the PIC is programmed to perform measurements via receiving two commands, where 1) the first one tells the device it is going to perform a sampling, and 2) the second indicates the set point voltage. The Arduino handles the loop and incrementing part of the sampling.
The issue I am seeing is that the potentiostat is not starting the sampling on the right voltage set point, but it does increment correctly after that. For instance, a simple sweep would be from 0-3V, 0.5V increments. Instead of starting from 0V, it seems it is using the last voltage set point sent to the PIC from the Arduino. I have verified that each device acts as I would expect when sending commands manually (in contrast to using a TFT shield with buttons and simple command GUI) and have done so with a logic analyzer. I will be digging into the problems again, but I recall that I was literally seeing the correct UART characters being sent to the PIC, it responding with the unique identifier "OK" to verify it received the right code, but then it returning the last set of measurements instead of the correct/current set. What seems very odd to me is that the data is not stored in the PIC so I am not sure it is possible for the PIC to be holding that data and sending the wrong one when a read is made. So, what are some common causes of such a delay during read/sampling operations such as this?
I think this indicates that this might be related to a hardware issue, but at this point I would appreciate any and all suggestions at what to look at or debug to hone in on the issue. More details of chips such as the ADC or DAC can be provided, I just am dusting off this project after having to put it away for a while. Thanks!


texts: Connecting PSoC 6 EINK alongside another sensor on the same board

texts: I am trying to figure out a way to connect a CY8CKIT-028-EPD E-INK display shield and a MAXREFDES117 heart rate monitor to the PSoC 6 BLE board. The E-INK takes the entire space on the board, preventing me from connecting the heart monitor to the necessary ports (the two I2C ports, Vin, Int and GND). I am relatively new to uCs (in fact this could be considered to be my first project), so I'm not quite sure how to proceed with this.


texts: Differential and single-ended input impedance

texts: I have this circuit and I'm interested in finding both the single-ended and differential input impedance. But is there even a difference? This is also at DC, so we can just ignore the inductors and the cap and assume them as ideal. The single ended impedance was easy enough, it was approximately 5k. But what's the differential input impedance?


texts: Is there an exponentiation configuration for MOSFETs or Opamps?

texts:
I am working on a problem that can be made really simple if the output of the transistor were to be a fixed power of the input. For ex., if the input is 8 V and power is 0.333, then the output voltage is 2 V.

An opamp circuit would be fine as well. Essentially, the circuit should be minimal (1 transistor or 1 opamp) and the output should be exponentiation.


texts: How can I derive a voltage equivalent without affecting the output?

texts:
In the above schematics, I want to make the equivalent of the circuit on the left side. What I mean is I want to derive V2 from V1 and get rid of using two supplies. I want to derive V2 from V1 by using only resistors.

My first modification attempt on the right side with output2 is not exactly outputting as in output1. You can see the difference in the output waveforms. I tried to obtain V2 by voltage divider method. But obviously in this case it is not right this way.

How can I derive output2 exactly same with output1 by using resistors and eliminating V2? What is the methodology?

edit: if not possible with only resistors, extra diodes or transistors also allowed. but i don't want to use a voltage regulator.


texts: JK flip flop not toggling when both inputs are 1?

texts: Instead of toggling, this circuit throws this error. What does this mean and how do I fix it?


texts:
I am considering to augment the power from my solar cell with a dc adapter whom will take up the slack when the sun can not provide, and feed it to my solar charger/regulator and led-acid setup. Will a diode to prevent back feeding to my solar cells be enough or do I need some thing else? I am thinking that the dc supply will act as a second solar unit in parallel, am I wrong?
The reason for this setup is a 12v circulation pump and led light for my fish tank, with a battery backup. The heater will have to remain ac for now. Hope you can help.


texts:
I have a DIY weather station connected to a Davis Rain Collector (6463). The device is connected to the mains in my barn (separate 100 amp leg from the house). On that same mains I have 2 high powered electric fence chargers. The fence chargers cause the circuit for the rain collected to be activated falsely. The rain collector uses a simple magnetic reed switch. My circuit for detecting a tip in the bucket is below (pin 3 connects to the reed switch on the rain collector). If I disconnect the fence chargers then everything works fine.

My question is how can I filter out the pulses from the fence chargers?


texts: Simple clamper circuit - ambiguous math - What's the catch?

texts:
In the clamper circuit, consider \$V_{i} = V_{p}cos(\omega t)\$, and consider only the first quarter of \$V_{i}\$ i.e from \$\omega t=0\$ to \$\pi/2\$:
(Assumption: Initial charge on capacitor is zero and diode is ideal)

Assuming diode to be reverse biased, then \$V_d\$ must be negative, otherwise the assumption is false.
\$V_d = -V_{i} + v_c = -V_{m}cost(\omega t) + 0 =\$ -ve from \$\omega t=0\$ to \$\pi /2\$ so the diode is indeed reverse biased.
This time assuming the diode to be forward biased, then the current \$I_d\$ must be positive, otherwise the assumption is false.
Now \$I_d = -C\frac{dv_c}{dt} = -C\frac{dV_{i}}{dt} = +C\omega  sin(\omega t) =\$ +ve from \$\omega t=0\$ to \$\pi/2\$  and the diode turns out to be forward biased.
However we know the diode is indeed reverse biased, but where did my math go wrong?


texts: How to improve capactive sensor when there is a floating local ground

texts:
I am using a microchip MTCH101 IC as a proximity detector (based on a self-capacitance electrode) and i have some trouble in detection because of a floating local ground (i guess). The sensor is power supplied by a battery and is a wearable device.
I have read many times that mutual-capacitance is less dependant from grounding issue than self-capacitance, is it true? why ? (but never seen equation to prove it) ?
Is any fundamental detecting methods (CTMU, CVD, CSM,...) better than an other for grounding issue?
For self-capacitance, the grounding issue is comming from the fact the wearable battery power supplied device has an unfix and sometime low capacitance between its local ground and the earth. There is 2 cases: when it's handled by the second hand of the user and when the device is laid on a table. When there is a good coupling (high capacitance), its negligible and only the sensing electrode is measured. When it's not, the ground to earth coupling is taking part to the measurement as parasitic. I have found that the following way would help to improve this coupling :
Big ground plane at the device back, to increase surface which will be seen by the second hand or the table.
connexion from the device local ground to the device casing to let the human hand which hold the device have a contact with local ground and a better coupling.
Heating pipe (which i do not know)
"Use human finger to modify an electrical field between the electrode and the system ground, working as a dielectric constant modified". I interpret that as mutual-capacitance, is that correct ?
Finally, why the mutual capacitance would have less that kind of issue since that the charge exchanged with the finger are still flowing throught the earth and the device ground ?


texts: How to edit the colors of a connector in Autocad Electrical?

texts:
how do I change the colors of a connector in Autocad electrical?

I want to change the connector outline and pin labels to black, but I can't find the layer or properties to do so.  The reason I am changing the color is because when I export to PDF, the connector doesn't not show up.

Thanks.


texts: Best way to control AL8871Q dimming without microcontroller?

texts:
Am new to electronics and am planning to use the Diodes AL8871Q to drive a Cree XHP50/70 at 6V 4.8A.
Planing to have the driver as small as possible.
Looking at the data sheet, I can control the current with a pwm or dc. I would like to use a button to toggle between 2 current levels and wondering what is the simplest way without having to add alot more components to the foot print.


texts: Sensor for ultralow (to -85°C) freezer monitor

texts:
I am planning to build a series of Arduino-controlled temperature-reporting units for a room full of "Ultracold" -80°C freezers. (I ultimately want to convert the signal to a serial stream that will interface with my existing system.)

So far I have only found one-wire and other sensors that are only rated to -55C. In my application they would spend most of their time around -80C. I only need about 0.5 to 1 degree accuracy at those temperatures.

Does anyone know a source for a low-temperature sensor that would be arduino-compatible, reliable, and be able to be placed at the end of a wire (to be passed into the freezer through a small port)?

Small update below.


texts: Designing a USB Selector Switch for a Printer and 2 PCs

texts:
I would like to build a circuit that allows me to use a single printer with both of my PCs. It is exactly something like this:

Also, I would like to use this type of switch:

in order to select either PC0 or PC1.
What I currently have is:

Now I am stuck because I don't know how to wire up the rest of the circuit so that this single button switches the D+ and D- connections between the PC0 and PC1. Unfortunately, I don't have any MOSFETs at the moment. Maybe a DPDT switch is the only way to go then?


texts:
i'm trying to design a battery charger for 5Ah li-ion battery. Due to cost management problems, i am not able to use advanced 5A charger controller ICs; instead, i am going to use a 1A controller with an amplification stage. Power FET configured as common drain seems a good solution; however, the problem is that, as you know, voltage tolerance of li-ion battery is quite low, about 30mV for my case. Vgs voltage of mosfet leads to voltage loss at the output more than that value. Is there a way to amplify DC current of controller IC by keeping output voltage in specified limits?

thank you.

ps: it is my first question in the site, please let me know if anything is wrong:)

Edit:

simulate this circuit – Schematic created using CircuitLab

the output of the controller is directly connected to the input of Nmos. Common drain amplifier is said to be voltage buffer and the DC current amplifier. Assuming 5A will be drawn by the battery during the constant current period and 4.2V will be supplied during constant voltage period, what modifications do I need if the controller supplies 0.5A during CC and 4.2V during CV?

the controller will be something like this: http://www.ti.com/lit/ds/symlink/bq24090.pdf
DC current amplifier should be directly connected between Vout and the positive terminal of the battery pack.


texts: Crude LTSpice gate driver model of buck converter

texts:
In the datasheet above LM3743. I have developed crude gate driver.

To verify the circuit i have connected filter circuit and given expected duty cycle for Vout =1.8V Vin= 3V.
Boost capacitor and diode is choosen from application circuit BOM.
Is there any other way to build this with these specification in LTSpice (I have used switches which causes delay during simulation ?


texts: Using internal regulator DVDD pin to power up external devices

texts:
I am designing a H-Bridge PCB and using DRV8323 as the driver. This chip has a pin name DVDD which from my understanding, from the below statement, is used to provide 3.3 volt to internal circuitry of the chip. And they were generous enough to expose this to the out-side world.

  3.3-V internal regulator output. Connect a X5R or X7R, 1-µF, 6.3-V ceramic capacitor between the DVDD and AGND pins. This regulator can
  source up to 30 mA externally.

So I have 2 questions!

1) Did I understand the function of this pin correctly?

2) Can I use this pin to power up a SMD 0603 LED? The chip can be enabled/disabled by a GPIO from MCU and I think the LED will be a good way to indicate if the chip is in enabled or not. If so, what resistor I should use? To not draw more than 30mA I guess I need something like 150 OHM?


texts: Maximum current drawn from a small 12V A23 battery?

texts:
How much current can be drawn from a A23 12V battery?

I've looked at the Energizer datasheet, this Wikipedia page and on this answer: Powering 5W generator with A23  but I haven't found the exact maximum current rating for these batteries.

The datasheet suggests the typical range is 2 mA - 15 mA but what is the maximum current it can deliver?


texts: What does an U244B IC’s input voltage do?

texts:
I’m new to electronics and I’m trying to connect a U244B ic on a breadboard. One pin says it’s an input voltage (pin 7). It works without anything being connected to the input and with battery connected to the supply voltage (pin 8).

What is it supposed to do?

https://www.web-bcs.com/oem/tf/U244B.html


texts:
I am currently getting into AVR programming and I want to read in two values from two potentiometers on the analog inputs PB3/ADC3 PB4/ADC2. I want to (just for now) light an two LEDs (PB1 and PB2) when the analog input value is above (arbitrary upper limit) 900.

Here is the code with which I try to do it.

  #include <avr/io.h>
  #include <stdint.h>
  #include <util/delay.h>
//1MHz clock
#define F_CPU 1000000

uint8_t channelPB4 = 0x2;
uint8_t channelPB3 = 0x3;

int main(void){
    uint16_t resultAdc1 = 0, resultAdc2 = 0;

    //ADC enable
    ADCSRA |= (1<<ADEN);
    //set prescaler to 128 in order to be in recommended range
    ADCSRA |= (1<<ADPS1) | (1<<ADPS0) | (1<<ADPS2);
    //read value empty
    ADCSRA |= (1<<ADSC);
    while (ADCSRA & (1<<ADSC) ) {}
    //dummy readout
    (void) ((ADCH <<8 ) | ADCL);

    DDRB |= (1<<PB1) | (1<<PB2);

    while(1){
        ADMUX = (ADMUX & 0xf8) | channelPB3;
        //start conversion
        ADCSRA |= (1<<ADSC);
        //wait for completion of conversion
        while(ADCSRA & (1<<ADSC)){}
        resultAdc1 = (ADCH<<8) | ADCL;

        ADMUX = (ADMUX & 0xf8) | channelPB4;
        //start conversion
        ADCSRA |= (1<<ADSC);
        //wait for completion of conversion
        while(ADCSRA & (1<<ADSC)){}
        resultAdc2 = (ADCH<<8) | ADCL;

        if (resultAdc1 > 900){
            PORTB |= (1<<PORTB1);
        }else if(resultAdc1 < 900){
            PORTB &= ~(1<<PORTB1);
        }
        if(resultAdc2 > 900){
            PORTB |= (1<<PORTB2);
        }else if(resultAdc2 < 900){
           PORTB &= ~(1<<PORTB2);
        }
        _delay_ms(500);
    }

    return 0;
}

But what I get is, that my LEDs are constantly on. Even when I remove the potentiometer from the analog input and wire the analog input to ground.
My reference is VCC, so ground should be 0 on the range from 0 to 1023.

Can you spot my mistake?

UPDATE:Schematic (sorry it is not very tidy)

simulate this circuit – Schematic created using CircuitLab


texts: After doing a search on mouser, I found only 4 JFETs rated for more than 1A drain-source current, compared to almost 3,000 BJT and 11,000 MOSFETs. Is this because there is less of a market for a high current/high power JFET than MOSFET/BJT, or is there some physical limitation making it difficult to manufacture a high current JFET?


texts:
I know that if both transistor in a cmos inverter are enhancement then the output will be as shown in the figure:

But I wonder, what if one of them is enhancement and the other is Depletion?


texts: using plumber's copper solder as a "solder paste" for SMD components

texts:
Can I ? :D

It is what I currently have plenty of lying around and, well... it says S-Sn97-Cu3 at composition

If not, could I use regular solder wire, coat the SMT pads with it, apply flux afterwards, place the SMD part and hold it into place, then gradually apply hot air to it ?

edit The package I am looking to solder in this way is a no leads type. Sorry, forgot to mention.

edit2 Found this paste over here. It has the same binder and the same flux/binder ratio as the one that I have. So it would appear that all that remains is the flux. I do not know what it is, but on my flask it says it contains zinc chloride, it thoroughly warns against inhaling, ingesting, eye and skin contact. Also there are some writings:
R36/37
S 1-2/S 20/S 26/S 36-39

Charge: FD

DVGW:
DV-0101
AT 2247

I wonder if the regular electronic parts solder paste has any warnings against skin/eye contact, inhaling and ingesting.


texts: Library for driving P10 LED Display with ESP32

texts:
I am trying to make a 10 digit cricket scoreboard for which, I want to use P10 LED modules as digits.

My objective is to change the score from Mobile Phone via BLE.

ESP32 microcontroller suits best for my application as it has WiFi and BLE both.

However, the only problem is that I am unable to find any library for ESP32 (I prefer ESP-IDF based library, not Arduino based) which can be used to control the P10 displays.

Can someone please help?


texts:
Im trying to Frankenstein a trackball connection through a mouse controller exactly like this tutorial
https://www.youtube.com/watch?v=VC7jhdAMwiw

In short, Im using a ball-type-mouse PCB to connect to a trackball which had a proprietary internal connection so I can then connect it to a computer.

After much grief, I did successfully get the X/Y movement to work.

As viewed on the screen -- The X-axis works great. The Y-Axis responsiveness is odd. Shorter/Slower movements dont always register.

I swapped the X/Y connections, and the Y-Axis (as viewed on the screen) continued to be less-responsive - even though the X of the trackball was now connected to it. To me, the somewhat isolates the issue to the Y-axis of the PCB.

I resoldered the Y connections a couple times, always the same result.

The one peice of extra info I do have is, that the Y-Axis does not work unless I connect the X-Axis. I don't know if this is by design or something that Im causing and is just another symptom of why the Y-Axis is acting odd.

Any thoughts to help diagnose this would be amazing...

UPDATE:

thank you for the responses. I swapped out the PCB for a Dell-Ball mouse. Once I figured out the wire layout (very similar to the MS-Mouse) both X/Y axis work and are very responsive.

I must have either cross soldered something, or just F'd the board up.

Working as expected, with great resolution.


texts:
I've wired simple circuit with 9V battery, red LED, 10K resistor to turn the light on.

And I'd like to know if the LED is lighting or not using arduino.

I simply wired Arduino's A0 pin and LED's + lead. Next, if I get value from A0 using analogRead() function, it returns 0 always. If I just read from A0 without wire, it returns random values(I don't know it's random or not, anyway, it seems to be irregular).

Question: How can I know external circuit's LED is lighting or not using Arduino?

PLUS

the question is related with this question

I've tested following schematic(sorry for its poor drawing)

4 digits display ----- 4N35(PIN 1)
           ㄴ---------- 4N35(PIN 2)

ARDUINO 5V ----------- 4N35(PIN 5)
        GND ---------- 4N35(PIN 4)
        A0 ----------- 4N35(PIN 4) <--- This is the goal

If I place LEDs for each side, it works well.

The problem is, the voltage I've measure from 4 digits display is too low as around 0.14.
So, it may be the reason 4N35 doesn't emit any signal I think(If I turned the power on of portable range, Arduino side LED is turned on for a moment).

Okay, Question again please !!!
I'd like to know the state of portable range and my trying is figuring out which LED is lighting from the 4 digits display. But, 4N35 could not catch its voltage(not sure tho).
How can I do this? Any comment will be helpful.


texts: What does the channel voltage in a MOSFET really mean and how does it lead to the Fermi level splitting shown?

texts:
Many books (Chenming-Hu Ch.6 Page 15, Neamen Page 413) use the term 'channel voltage' \$V(y)\$  to mean 'the potential in the inverted channel at a point \$y\$ distance away from the source along the channel length'.

First part:
What do they mean by 'potential in the channel'? Is it the same as the potential at a point inside a resistor (because the channel in a MOSFET is similar to a resistor)?

If so, is this potential constant along the direction perpendicular to the current flow, as in the resistor?

If it is constant, then how is 'potential in the channel' any different from the surface potential (i.e., the potential at the semiconductor-oxide interface  \$\psi_{s}(x)\$, also a function of \$x\$?

Second part:
When a drain voltage \$V_{ds}\$ is applied (the source and the body are grounded and a channel has been formed), the band diagram of the MOSFET along the channel is expected to show Fermi level splitting because the system is out of equilibrium.

  Relevant image :

What I don't understand is the band diagram in the \$x\$-direction at a point \$y\$ distance away from the source and in the channel...

The x-axis runs from left to right in the above image.

The image shows that the Fermi levels split inside the body of the semiconductor and the amount of the splitting is \$eV_{ds}\$ at the drain, and by extension, \$eV(y)\$ inside the channel. Why does this happen? Is there any connection between the 'potential in the channel' interpretation of \$V(y)\$ and this splitting?

Legend for the band diagrams :

Black dotted lines - intrinsic level
Red dotted line - Quasi Fermi level for holes
Red solid line - Quasi Fermi level for electrons
Black solid lines - Bottom of conduction and top of valence bands


texts: Forward Error Correction over Unidirectional Serial Link

texts:
I’m designing a master-slave, one way RS-485 over plastic fiber optic physical link layer network using low power PIC MCU. While I expect the link layer to be very reliable, nothing is ever perfect.

Since the network is unidirectional to keep costs down, I’m thinking some form of Forward Error Correcting code is in order. The data packet content is simple:

Slave address (one byte)
Opcode (one byte)
Operands (four bytes)
So just six bytes of application data passing from Raspberry Pi transmitter UART at up to 56K baud -> plastic fiber optic transmitter -> PFO cable up to 20 meters -> PFO receiver -> PIC12LF1822 MCU UART as RS-485 slave node.

I could just use a CRC to detect errors but since the link is one way, there’s no way to NAK a bad packet for retransmission.

This seems like a good use case for forward error correction but I have no experience with FEC. What algorithm or other things should be considered, given I need as close to 100% reliability as possible. Preferably an FEC algorithm that can be implemented in C code on a PIC MCU.


texts:
How would you calculate the input and output impedance of this amplifier?
I have done a lot of research and found so many conflicting pieces of
information. Not sure what is right.

C1 = 10Uf, C2 = 1000Uf
R1 = 50KΩ, R2 = 7.5KΩ, R3 = 820Ω, R4 = 100Ω, R5 = R6 = 10Ω
D1 = D2 = 1N4148
Q1 = 2N3904, Q2 = TIP31C, Q3 = TIP32C
RL = 8Ω Or 16Ω

Supply Voltage = 12V

Thanks


texts:
I have been trying to implement calendar functionality on my STM32f103C8 using the built in RTC peripheral.
Going through the RTC section of the reference manual, it states that the clock source to RTC can be either of HSE/128 or LSE or LSI. So far so good.
But then I found this regarding RTC in the RCC section

What do they mean by "RTC state is not guranteed if the Vdd supply is powered off..." when using HSE/128 as the RTC clock source? I was under the impression that as long as the BACKUP domain is not resetted (Vbat present if Vdd turned off), the RTC state would be maintained. Isn't that the whole point of RTC?


texts:
I need to eliminate main switch bouncing, which badly influences my device. In order to achieve that, I want to use a delayed start with N-MOSFET an RC circuit at the gate. MOSFET I've chosen have a very low gate threshold voltage of 1.05V and very low Rds (csat Vgs 2.5V it is less then 50 mOhm). My calculations suggest, that at the selected values for R1 and C1, 1.05V at the gate will appear at approximately 90 ms, which is well beyond any bouncing of the main switch. I'm using this formula: \$t = -R\cdot\!C\cdot\ln(1-\frac{V_0}{V})\$

At start up load draws no more then 150 mA. Did I miss something?

EDIT: I was suggested to add a discharge path for the C1 in order to ensure that gate is not driven high when the circuit is off. I planned to add a 12V Zener at the M1 gate, will it be sufficient to discharge C1?

simulate this circuit – Schematic created using CircuitLab


texts:
I have a lab assignment coming up in which my instructor is tasking us to determine the function - essentially construct a truth table - of several unknown integrated circuits of varying difficulty. Specifically, the mystery chips will be confined to TTL SSI chips, only combinational logic.

First I suppose one would have to determine the inputs from outputs. For TTL gates, unconnected inputs will register about 1.7V. How could the outputs be determined? Wouldn't they fall within the range <.5V or >3.5V?

Once the inputs are determined, next I could experiment with different inputs (0's and/or 1's) and observe the output voltage, or even connected a LED to the output to see the consequence. Besides that, I'm not sure what I could do to figure out the function of the chip.

One of the chips will be broken - we aren't required to identify the defect, we are only required to report the intended function of the chip. Also, one of the chips will have "open" collector outputs. Would the aforementioned system still hold for these scenarios?


texts: op-amp: what is internal frequency compensation?

texts: I'm an electronics student.. while reading the operational amplifiers in detail, I came across the word "internal compensation" in the summed up features of an op-amp. please give me the detailed explanation of this feature.


texts: Can the out-signal from MAX4173 be slowed down?

texts:
I have designed a small voltage / current monitor that works perfect in a lab-setup. However, when I yesterday tried it in the real application, it latches immediately. The only reason I can think of as to now (I am going to confirm the error source in a minute) is that the in-rush current causes the current sensor to trip.

It makes sense, and the bad thing here is that I completely omitted that fact when I designed the circuit and fabricated the boards. I therefore will have to bite the bullet and patch all the boards.

See the image. That's the current sensor in a nut-shell: Rs = 10mohm shunt resistor. MAX4173 does its high side-magic using that resistor, and outputs the current as a linear voltage. This voltage is sent to a comparator with a fixed reference of 1.25V (equals 2.5A current in my setup). As soon as the comparator is tripped, a PNP pulls down and makes another part of the circuit latch, effectively stopping the power source.

Now; given the sad scenario where the boards are already done, is there a way to slow down the out-signal from MAX4173 a bit, without compromising the main feature (measuring current during normal operation) too much?