texts: Common ground : Computer A and USB powered Arduino ( MCU ) from Computer B

texts:
I have 1 computer, 1 laptop and usb powered arduino ( MCU ).

Arduino is connected to laptop via USB cable. Laptop is connected to 220V wall or
runs from batteries.

One PIN from arduino is connected to PWM input ( to control fan speed ) in computer to control fan speed. I have to share ground between arduino and computer to make it work.

My question is - is it correct to connect grounds that way ?


texts: Can we say that inside alternator magnetic force create now force (voltage)

texts: Can we say that inside an alternator, magnetic force creates a new force (voltage), and those two forces together transform mechanical to electrical energy?


texts: Why is charge the same on every capacitor in series?

texts:
Why is the amount of charge on every capacitor in series equal, regardless that capacitance values of capacitors are not the same? What really happens here so they are the same?

simulate this circuit – Schematic created using CircuitLab


texts: For these connectors, in which one do you put the male pins

texts:
I have these two connectors:

and I have male and female pins that come with them.

Do I put the male pins in the male connector? or do I do the opposite? I can't see an obvious reason why it would be one way or another, but I may be missing something :)


texts: bidirectional buck/boost converter vs separate buck and boost converters

texts: I have recently leared about bidirectional buck/boost converters. They can be used in hybrid vehicles for optionally charging a 12v battery from a higher voltage battery or vice versa. How would one of these perform differently than separate buck and boost circuits with switches to determine which one is active at any given time?


texts: Do I need external capacitors for this SMD Crystal?

texts: I have TXC 7B 16Mhz Crystal and I am not sure if I need 18pF capacitors between GND pins and GND.


texts:
I have a question about one of the current mirrors introduced in the "Bandgap References" chapter of Razavi's Design of Analog ICs.

He has this:

My confusion is about Equation 12.1.

I know that for a basic current  mirror, $$I_{out} = (W/L)(M_2)/(W/L)(M_1) * I_{ref}$$
is valid.

From the looks of it, he seems to have ignored the voltage drop across R1 and just taken it to be the supply voltage Vdd.  Shouldn't there be another term?

Here is my answer:


texts: Is this how I would expect a voltage regulator to work?

texts:
I have a question just to check that I understand voltage regulators from a conceptual standpoint.

Say I have a power source, which delivers 8V. I need to step it down to 6V for a continuous load of 1A. Am I correct to assume that the overall circuit will only draw 1A from the power source, but 25% of that power will be dissipated as heat by the voltage regulator?

Now, I do plan on doing this, but with an L7806 voltage regulator (see page 11 for L7806 electrical characteristics), an 8V power source, and 2 motors which draw 1A each. The first problem I am seeing with this setup is that my power source is under the rated input voltage (8.6 - 19V, my source is 8V). Next, it is rated for a current draw of up to 1A (but I need to draw 2A).

So I am not sure what to do. From what I understand, if I use 2 voltage regulators to independently provide the power to each motor (each wired in parallel to the power source), then the max draw per regulator would be 1A. I still have the problem of my power source being under the voltage source though, but I may be able to fix that.

The other option I found is to use something from the RC world called a UBEC. For example, this one is rated to output 6V at a maximum of 3A, with better heat dissipation.

So what I am looking for from an answer is (1) a confirmation that I am understanding how voltage regulators work at a basic level (as well as any corrections or improvements to my misunderstanding), and (2) suggestions as to how I can achieve what I need. I would prefer to have an IC solution (like the 7806, but maybe something more appropriate for my case) because it is cheaper than the UBEC.


texts: Is a 3V power loss normal when using the official Arduino Motor Shield?

texts:
I have an input voltage of 8.5 volts (6 AA Batteries) plugged into an Arduino Uno R3 and then on that I have a Arduino Motor Shield. Then I connected a DC motor to the A+ and A- screw terminals. Then I write 255 to the right pins and the motor spins . . . slower than when I connect it directly to the battery. It's a motor rated for 9 volts but the input voltage is only 5.8 even at the screw terminals. If I increase the voltage to 12 volts (using a power plug), then I get an output of about 9 volts.

Is this because of the amp draw on the batteries? Is it documented that the motor shield has that kind of voltage loss?

I CAN just connect the 9 volts directly to the shield and power the Uno separately (but then I have to cut the vin pin on the Arduino . . . which I hope my bluetooth shield doesn't use). That's probably what I'll try while I'm waiting for an answer! Thanks.


texts: STM32 SDMMC & SDIO - why max 1 SD card only?

texts:
I'm writing an SDMMC driver for my C++ RTOS for microcontrollers and there is one thing which really puzzles me, making it hard to decide about class hierarchy. In the Reference Manual for STM32F7 (but the same is true for other chips, both for SDMMC and SDIO peripherals) you can read the following at the very beginning:

The current version of the SDMMC supports only one SD/SDIO/MMC4.2 card at any one time and a stack of MMC4.1 or previous.

Where does this limitation come from? As far as I understand SD cards (which is hard given the "quality" of the SD documentation) using one card should look exactly the same as using ten - from the point of view of SDMMC peripheral this is just sending commands, receiving responses and transferring data blocks. To use more than 1 card you just need to make sure to "select" the proper one with CMD7 before talking to the selected card and that's it. But this selection process is done completely in software, in the higher layer than SDMMC driver.
Even though the first page of the chapter about SDMMC peripheral says only 1 SD card can be used, this is what you can read further:

39.4.4 Card identification process
...
For the SD card, the identification process starts at clock rate F od
, and the SDMMC_CMD line output drives are push-pull drivers instead
of open-drain. The registration process is accomplished as follows:

The bus is activated.
The SDMMC card host broadcasts SD_APP_OP_COND (ACMD41).
The cards respond with the contents of their operation condition registers.
The incompatible cards are placed in the inactive state.
The SDMMC card host broadcasts ALL_SEND_CID (CMD2) to all active cards.
The cards send back their unique card identification numbers (CIDs) and enter the Identification state.
The SDMMC card host issues SET_RELATIVE_ADDR (CMD3) to an active card with an address. This new address is called the relative card
address (RCA); it is shorter than the CID and addresses the card. The
assigned card changes to the Standby state. The SDMMC card host can
reissue this command to change the RCA. The RCA of the card is the
last assigned value.
The SDMMC card host repeats steps 5 through 7 with all active cards.

So SDMMC supports only one card, yet they describe how to detect many...
I've found some clue in the mentioned SD documentation:

4.3.11 High-Speed Mode (25 MB/sec interface speed)
...
Because it is not possible to control two cards or more in the case that each of them has a different timing mode (Default and High-Speed mode) and in order to satisfy severe timing, the host shall drive only one card. CLK/CMD/DAT signal shall be connected in 1-to-1 between the host and the card.

But this (according to my understanding) affects high-speed mode only, you can stick to default-speed mode, which is (surprisingly (; ) the default mode after card power-up.
The reason why I'm asking this questions is because I cannot decide whether I should model the class hierarchy with assumption that the SDMMC peripheral IS the memory card, or maybe that SDMMC peripheral should be represented by dedicated "SD/MMC host" class, which may be associated later with a memory card object. The second model is much closer to the situation possible while using memory cards in SPI mode, where you can have as many as you like connected to the same SPI bus.
Thanks in advance for any information (;


texts: No change in output signal from SICK encoder

texts:
I have a SICK DFS20A-A2PBD065536 incremental encoder and I am powering it with 24V DC. When I rotate the shaft, I do not get any change in either A or B output signals (Its a quadrature encoder). We are certain the drawings are correct. My question is how protected are SICK encoders (or a industrial rotary encoder in general) to errors in wiring. We know we didn't apply 120V, and no welding has been done.
Encoder set for:

60 PPR (pulse per revoloution)

HTL output (?Totem Pole? / output level based on input power (24V).

It worked when it left thet shop

We tried wiring it in the field, but it didn't work. (possible that we had error in wiring)

We brought back to bench to test, and it no longer works.

Question:

How sensitive are these encoders to miss wiring (shorting a pair of pins together, leaving a common open, 24V applied to the wrong pin. (In your experience?)


texts:
As a pet project I'd like to make a small windmill. I'm in the very beginning stages so I'm still researching components to use and have a lot of questions so I came here to start my journey. I was thinking of using a brushless motor (as small as possible) without the control circuitry, and connect the windmill blades to the shaft. Let's say I expect 50-200 CFM of airflow, and I just want to output as much power output as I can. First, are there small brushless motors with a high enough efficiency to produce a considerable amount of voltage say 5, or even 12V, also is there a rule of thumb regarding current output for different sized motors? Also again, when looking for brushless motors without the extra circuitry inside what applications should I look for, brushless motors for RC drones, or planes?

Now let's say I found the perfect motor for my needs and I am doing the calculations for the EMF and the terminal voltage, do I need knowledge of how large my load is? if not how would I calculate the terminal voltage, because I though the formula was V = emf - (load current * armature resistance). and emf = number of poles * rotation speed * magnetic field strength * number of conductors / number of return paths. If there's a certain amount of torque required to move the shaft is that information available on the the device datasheet? will it have a noticeable effect on the output voltage? is the only to know for me to make a test jig and run some experiments?

Thanks for all the help, sorry if this is a noob post.


texts: Using Pulse W3006 Dualband Wifi Antenna with a CPW-G Trace and Single RF_Out on MC

texts:
Pulse W3006 Chip Antenna Being Used

We are designing a custom PCB which uses a micro-controller with a single RF-out capable of doing 2.4G/5G/Bluetooth. This questions has 3 parts:

Using the Chip Antenna on the physical Board
Calculations for the transmission line between the chip antenna and Broadcomm Chip
Using the single RF_out pin on the controller (Broadcomm WM-BAN-BM-13)

The antenna we are using is capable of doing both 2.4 Ghz and 5 Ghz, however the reference designs used with this particular chip only show a single feed line with a matching network going to it. Does this mean that the antenna can only operate in one of the two modes at a given time?

Additionally, the screenshot provided shows 2 different calculators used to design the attaching feed line. In the program to the left, it suggested a "Physical Length (L)" for the transmission line, from my understanding, this only pertains to the Frequency used for the feed signal and is used to help design the matching network with shunt capacitors and inductors if the line is less than that amount correct?

What would be the suggested way of using the calculated transmission line values and selecting the correct capacitor/inductor values for the desired length?

And lastly, if the BM chip only has 1 RF-out pin, how can a single transmission line for a single antenna be used for both 2.4 Ghz and 5 Ghz?


texts:
I would like some guidance with regards to matching the output power of my dinrail PSU for the components connected to it.

I am building an electronics enclosure that holds the following:

1 * GSM Modem @ 201mA
1 * 4-20mA collector @200mA
1 * relay coil * @150mA
plus cable losses etc

The PSU will be running the devices mentioned above at 12v.

Now I have two options with regards to choosing the power supply.
A 10w or a 20w unit.

From my calculations the 10w will be on the edge however I do know that switch mode power supplies run more efficiently at a higher load than at say half load.

What sort of factors should I be considering when choosing between the two. The price difference is not that large. So I am tending towards the large 20w which will also allow for future growth if need be.

A large factor for me would be longevity and life span of the PSU. I donot want to have it running warm and reducing the life span etc of the product. If my psu dies then everything dies.


texts: Keyboard wireless feedback from computer

texts:
This is a theoretical question.
I want to ask, is the the modern keyboards communicate with PC such as wireless keyboards can 'get/read' some data from the PC?
If not, what do I need to do for that? I assume it must have a receiver.
Is there any protocols for that?


texts: Why does a resistor reduce voltage if V=IR?

texts: I'm sure this is a very simple question, but I have been confused about this topic for a while now. According to Ohm's law, resistance varies directly with voltage. This means that if resistance increases voltage increases... But obviously that's not how it really works. If I add in a resistor to a circuit, the voltage decreases. I've heard that its because a resistor reduces current which in effect reduces voltage, however I don't understand how this lines up mathematically with what I said earlier.


texts: How does an speaker amplifier have to be build for a given DAC output signal?

texts:
I am working on a project "cat projector" which shall "shout" at the cat when she jumps on the table in the living room.

For the logic I use an Arduino board which plays/streams the sound at 22.1kHz from a SD-Card and using the MCP4821 DAC to generate the signal. This works perfectly fine (as you can see on the measurement). The output on the DAC is between 0-4V.

The measured output signal of the DAC is shown here:

I plan to use a regular 8Ω speaker with 0.2W or 1W. I also have a 5V source and a 9V source which I can use for the amplifier (both sharing the same ground). The DAC is powered from the 5V source.

Here a circuit which already contains the exact output signal from the measurement.

simulate this circuit – Schematic created using CircuitLab

What is a good amplifier circuit, to convert the DAC output (0V - 4V) into a suitable signal for the 0.2W or 1W speaker?

My best (failed) solution so far was this one:

simulate this circuit

Final Solution

Just for documentation, this is the working circuit I ended up with. It is using the LM386N-1 with a 8Ω, 0.2W speaker. The sound quality is usable, with small distortions on high frequency tones.

Using C1/C5, there is no hearable noise if the DAC is turned off (0V level). The actual measurement looks like this:

The yellow signal is measured in front of the speaker. The blue signal is measured at pin 3 (input+) of the amp. Note the different scales: Yellow 1V, blue 50mV.


texts: I'd like to know if it is useful to power pcbs from solar cells and batteries for indoor installations. From a little research, many datasheets mention that the maximum output current is up to uA scale for indoor lighting. In this way I cannot supply many applications only from solar cells and a battery. Especially if the pcb design incorporates a wifi module, which need mA in order to start. So is it useful to supply a pcb with a wifi, a low energy consumption sensor and a low energy MCU with only a sollar cell and a rechargeable(from solar cells) battery?


texts: Difference between instantaneous, definite time and inverse time over current protection relays

texts:
Protection coordination is very important in transmission and distribution power networks. One of the most widely used and important protection relays are over current protection relays.

What is the difference between instantaneous, definite time and inverse time over current protection relays (and maybe any other over current protection relays if they exist).

I am especially interested in real case application. In which case you use any of them. Are there any benefits of using one type over another?


texts: Automatically selection of voltage sources?

texts:
I'm trying to design a microcontroller board. There will be a main power connector and also an ISP programming port on my board. The microcontroller is running on 3.3V using a linear voltage regulator. I want to use the following circuit. Is it OK? The voltage from the ISP port would be 5V. The Diode D2 will decrease the input voltage of regulator would it be ok to have less than 5 volts on input?

simulate this circuit – Schematic created using CircuitLab


texts: Do STMF411 boards have a problem with the D+ pull up resistor?

texts:
I found this webpage that mentions problems with the ("blue pill") STM32F103 boards. The problem is that the value of pull up resistor on D+ is wrong. Do the ("black pill") STMF411 boards have the same issue? Seems like stock photos on eBay have the 'wrong' pull up resistor (103) instead of the correct one (1.5k).
All I want to do with these boards is upload a new firmware.
Any help would be greatly appreciated!


texts: Right approach to boost the current of a signal to drive a speaker

texts:
I have a circuit which can produce three different waveform signals ( Square, Sine and Triangle). The output amplitude of these signals goes from +5V to -5V Peak to peak. However the output from this circuit can only supply a current of 20mA. I have been meaning to drive a 8ohm/1Watt speaker using these signals.
Upon searching I come across few options. Making a current amplifier using Opamp, transistors or use some dedicated chips like TDA7294. Am wondering what would be the best way to approach this without making it a overkill.


texts: VHDL code for 4 bit binary division without using the division sign. Getting a warning that DIV.vhd(39): (vcom-1246) Range 3 to 0 is null

texts:
--  logic taken from https://en.wikipedia.org/wiki/Division_algorithm
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;

ENTITY Div IS
  PORT(
    OperandA    : in std_logic_vector(3 downto 0);
    OperandB    : in std_logic_vector(3 downto 0);
    Errorsig    : out STD_LOGIC := '0';
    Result_Low  : out std_logic_vector(3 downto 0);
    Result_High : out std_logic_vector(3 downto 0));
END Div;

ARCHITECTURE behavioral OF Div IS
signal Q,R : std_logic_vector (3 downto 0) := "0000";
signal i : integer := 3;
signal diff,borr : std_logic_vector (3 downto 0) := "0000";
signal er,err : std_logic := '0';

COMPONENT SUB IS
  PORT(
    OperandA    : in std_logic_vector(3 downto 0);
    OperandB    : in std_logic_vector(3 downto 0);
    Result_Low  : out std_logic_vector(3 downto 0);
    Result_High : out std_logic_vector(3 downto 0);
    Errorsig    : out std_Logic);
END component;

begin
Sub1 : SUB
     PORT MAP(
      R,OperandB,diff,borr,err);

  process(OperandA,OperandB)
    begin
    if OperandB = "0000" then i<=0; else
       for i in 3 to 0 loop     -- where n is number of bits in N
        R <= R(2 downto 0) & '0';          -- left-shift R by 1 bit
        R(0) <= OperandA(i);         -- set the least-significant bit of R equal to bit i of the numerator
         if R >= OperandB then
            -- Sub1(R,OperandB,diff,borr,err);
         R <= diff;
             Q(i) <= '1';
         end if;
        end loop;
    end if;

  end process;

END behavioral;

--Someone please help me. Am a newbie and unable to figure it out on my own. Thanks


texts: DC 5V USB to replace AAA-battery source: down converter

texts:
I have a portable lithium battery-powered speaker which takes auxiliary sound input from a single AAA-battery powered pocket radio. The speaker includes a USB port for charging source devices:

I would like to build/buy a circuit which could be used to efficiently transform the 5V DC output source of the USB to operate the AAA-battery powered portable radio, to save me from having to buy batteries.

However, I'm no electronics expert! What can you suggest? I'm handy with a soldering iron, but don't know how to design what is needed. I'm at least aware that I probably want to:

Transform the 5V DC source down to 1.5V in an efficient way (so, not with a linear regulator, but with something like a "Buck converter"). I don't want unnecessary drain on the portable speaker battery, so want the transformation to be as efficient as possible).
Support an output current of at least 1A, but it's likely that the radio will require much less (perhaps 50mA?).

After some searching, I found the LM2596 step-down switching regulator, pre-built into a circuit for adjusting the output here. Would it suffice (and be safe) to use something like this?

UPDATE

After more reading/searching, I found the LM317 linear regulator might do the trick. A linear regulator, while inefficient, has the advantage of not generating RF noise which may interfere with the radio reception (as suggested by @BrianDrummond, below).


texts: Can I design a photovoltaic system, or is that unrealistic?

texts:
I'm new to stack exchange, so ... feel free to ask for clarification, as many posters seem to be rather vague on their questions, from what I've seen.

A little background: I'm a recent graduate in Electronics Engineering, just got my master's straight out of undergrad school... Aka I have no experience outside of academia. In case that's useless info ignore it :)

My question is... Given that I have some background in electrical engineering (80% similar courses in college as an undergrad), and the fact that I have a desire to install a photovoltaic generation system in my own home, would it be realistic for me to learn how to and design it myself,granted I have no background experience with such systems, but wouldn't mind studying them? If so, could someone give me guidance as how to proceed? I'm actually familiar both with the load characteristics and the bloody characteristics of inverters and such.... Power electronics systems

Reasoning:recently the electricity prices have been soaring... M hence any form of generation is welcome,.... But companies charge for electrical engineer's man hours... Well, I AM an ee, even if I'm not an experienced one... So... Could I install it myself, or at least design it myself and have some electricians help. Me implement it? (and maybe lower the costs)

Or am I just tripping?

In case implementing my own design is actually a realistic way to save money, on my case, what sort of reading / can I courses would you recommend? Otherwise, can I ask what is the cheapest way to get some clean energy generation at home right now? Also, how do I proceed  about acquiring such a generation system?


texts: Can I interconnect all echo pins from multiple ultrasonic sensors?

texts:
I want to use (probably) four ultrasonic sensors HC-SR04.
These use a trigger pin and echo pin.

For the echo pins, I want to connect them to a timer with 'Combined Channels PWM Input on CH1', and the Input Trigger set to TI1FP1, so it is able to automatically time the high time of an echo.

However, since I don't want to use 4 timers, I want to interconnect all echo pins (and trigger the trigger pins of the sensors one by one).

Would this work, or is it not adviced to 'set' a signal to an echo pin when another echo pins becomes high?

Or should I use an IC with logical ORs? or is there a better/easier way?

simulate this circuit – Schematic created using CircuitLab

I got it by someone and he doesn't know the source, so I don't have a datasheet, this is something similar: Information


texts: What is the minimum bandwidth required for a digital communication system using 32-QAM modulation?

texts:
If the bit rate of the digital communication system is 'R' Kbps & the modulation used is 32-QAM, what is the minimum bandwidth required for ISI free transmission?

My understanding & analysis so far:

QAM (a digital-to-analog conversion technique) is a combination of ASK & PSK. The idea behind QAM is to alter two characteristics (amplitude & phase) instead of just one to improve the bit rate.
From literature (Data Communications & Networking by Forouzan), the minimum bandwidth required for QAM is same as that of ASK/PSK.
BW for Binary ASK is given by B = (1+d)S, where S is the signal rate.
For 32-QAM bandwidth is

   B = S = (bit rate)/(bits per signal element) = R/5 KHz

(for 32-QAM no. of symbols per signal element is log2(32) = 5)


texts:
In a simple circuit, composed only of a lamp, a generator and a switch that connects the generator to the lamp.
What happens with electric current when the switch is open? Electrons turn around? They go in the air scattered in infinity (lol)? I would like to know (I am a beginner).


texts:
I am trying to test the interrupt function at home without a board to push buttons etc. I gave up on my code and copied an example but still cant make it work. Below is the sample code.

In the while loop it sets the bits on but the interrupt doesn't get called. I have a break set in the interrupt.  Maybe this isn't possible to test?

My end result is I need to test for button1 and button2 being pressed. I know how to do that without the interrupt but need to follow the lesson.

The professor wants us to use the interrupt.  Thanks for help!

unsigned short sync_flag;
char bad_synch;            // variable for detecting bad synchronization
int cnt = 0;               // Global variable cnt

void Interrupt() {
  // This is external INT0 interrupt (for sync start)
  //   - once we get falling edge on RB0 we are disabling INT0 interrupt

  if (INT0IF_bit && INT0IE_bit) {
     cnt = 0;
     sync_flag = 1;
     INT0IF_bit = 0;
     INT0IE_bit = 0;
     PORTD = 0xFF;
   }
}

void main() {

  ADCON1 = 0x0F;           // AD converter off
  CMCON = 7;
  sync_flag = 0;           // sync_flag is set when falling edge on RB0 is detected

  while(1){

  TRISB = 0xFF;            // Set PB0 as input
  TRISD = 0x00;            // Set PortD as output
  PORTD = 0x00;            // Starting value for PortD

  INTEDG0_bit = 0;         // Interrupt on falling edge on RB0
  INT0IF_bit = 0;          // Clear INT0IF
  INT0IE_bit = 0;          // turn OFF interrupt on INT0
  GIE_bit = 1;             // enable GIE

  while(1){
      bad_synch = 0;       // set bad synchronization variable to zero
      sync_flag = 0;       // reseting sync flag
      INT0IF_bit = 1;
      INT0IE_bit = 1;      // enable external interrupt on RB0 (start sync procedure)
    }
  }
}


texts: Design PI controller using LM2743 analogue controller

texts:
I'm final year student currently designing a buck converter with an analogue controller (LM2743). What my supervisor told me is to used a PI controller using bode plot. My design spec:
1. Vin=12V
2. Vout=5V
3. Pout=10Watt
4. Fsw=100KHZ
From there I obtained my inductor (48.6uH), output capacitor (15uF) an load resistor at (2.5ohm). From there my transfer function is:

From there I'm quite stuck on how to do it. Where I know the T.F for PI controller is Gc(s)=Kp+(ki/s). After that, lets say I've managed top design the PI controller. From datasheet LM2743, there are few components need to be connected to the main controller which is pin FB and EAO.

Its mentioned in the data sheet that the calculation can be made using the equatio given but didn't tell on how to get the Fz1, Fz2, Fp1 and Fp2 where these value that can decide the components.

LM273 datasheet


texts:
I have set up my DALI master with 1 slave (prototyping phase) and managed to commission the slave (as far as I'm aware by testing against a direct arc level against the single short address). I am also able to get responses (query), somewhat haphazard at the moment due to the timing of the ISR probably being too strict and messing up sometimes on bits received, but at least working majority of the times.
So, assuming the above is the bare minimum to ensure that the bus, master and slave are working and able to send, receive and respond to commands. I have set up a function to set the scene level on the DTR and store this at the given scene level.
void setScene(uint8_t address, uint8_t scene, uint8_t level, _Bool isGroupAddress) {
    if (isGroupAddress)
    {
        address |= _DALI2_GROUP_ADDRESS;
    }
    sendCommand(_DALI2_DTR, level, 0, 0);
    _waitTilLineFree();
    sendCommand(address, scene, _DALI2_STORE_THE_DTRAS_SCENE, _DALI2_FOLLOWING_COMMAND);
    _waitTilLineFree();
    sendCommand(address, scene, _DALI2_STORE_THE_DTRAS_SCENE, _DALI2_FOLLOWING_COMMAND);
    _waitTilLineFree();
}

The_waitTilLineFree function is a helper function to effectively wait for the line to become free from any other commands that are currently being sent, i.e. when dali state is idle and then give an extra 5ms delay when state is idled.
The below is printed from another helper function which prints the tx buffer and rx buffer.
SET SCENE:

address: [0]
level: [64]
scene: [1]

binary in form of 8 bit address then 8 bit command.

|1010 0011 0100 0000| SET DTR LEVEL [64] |
|0000 0001 0100 0001| STORE SCENE LEVEL to [1] |
|0000 0001 0100 0001|  REPEAT ^^^^ |
|0000 0001 1011 0001| QUERY SCENE LEVEL [1] |

reply:

|1111 1111|

I am asking to check that the above is the correct way to set the scene level. The repeat command is sent according to the wait time function so is in that minimum 100ms time frame for a repeat to happen.


texts: Assumed wrong direction for current through voltage source on branch?

texts:
I am trying to solve the following simple circuit to obtain the current flowing through the 5V source. The answer I obtain does not agree with a simulator that I am using, and I think it's because I assume the wrong direction for current through the 19k resistor... Using conventional current flow, here is my approach to the problem:

Calculate the current through the 19k resistor as just 5V over 19k and I get 263uA. I then calculate the current through the 300k resistor as just 20V over 300k. I assume that the current is flowing in from the 5V source and also in from the 19k resistor and outward through the 300k resistor. Therefore using KCL I get:

(current through 19k) + (current through 5V) = current through 300k

263uA + I = 66.67uA

I = -196uA

However when I use the simulator at falstad.com/circuit/ I get a different result. I get like 329uA. Does it actually matter which direction I assume the current is flowing in? Or, is it that maybe the drop across the resistor is actually -5 because of the polarity on the voltage source?

simulate this circuit – Schematic created using CircuitLab


texts: bearing ambiguity resolve (direction finding) for multiple sources

texts:
I am working on wideband direction finding algorithms for passive sensors.

I started with Music algorithm. For practical reasons, the spacing can not be maintained lambda/2. For greater antenna spacing, grating lobes appear.

I found some algorithms for ambiguity resolving. However, I only found algorithms for resolving ambiguity in presence of only one source signal (eg. one transmit signal). Most of the algorithms (multiple baseline algorithms) take phase difference value for multiple baseline and determines/resolves the angle of arrival value (for one source).

For my application, I am looking at resolving ambiguity for multiple sources with one baseline consisting of 4 to 8 elements (receivers).As for Music algorithm, with 4 sensors its possible to determine 3 sources (maximum) unless any rank enhancement algorithm is applied.

Is there any algorithm which resolves such ambiguity issue?


texts: Cheap Reliable way to convert 3.3V to 5V with a 800kHz signal

texts:
I'm looking for a cheap reliable way (production) to convert an stm32's 3.3V output to the 5V input of a WS2812.  I looked at a MOSFET solution with a BSS138 but internet research shows that it is not reliable for a 800kHz signal.  I looked at the 74 family of chips but am somewhat confused at the naming scheme LCV, HC, AHCT, HCT, etc.  I found a chip called the 74AHCT1G08GW,125 which is a single AND gate.  According to the datasheet, 2 volts is the minimum input to registered as a HIGH.  If I connect both AND inputs to the 3.3V signal, I should get Vcc=5V at the output.   At a cost of less than 3 cents, this would seem to work for my application.  Am I missing something here?  Is there an easier or cheaper way I am missing?
Edit:
I have 2 power supply voltages 3.3V for the stm and 5V for the LED's.  I assume powering the 74' chip with 5V will provide a 5V output.


texts:
Can anyone identify this connector?
Female part:

The crimp parts look like this:

And the male part looks like this:

Context:
These came with a Smoothieboard v1.1. I keep messing up the crimp connections, so I want to order some spare connectors. The documentation does not seems to identify them. If there's any sort of site that has a directory of connector types, that would be good to know too.


texts: 3.5mm - mono connector to TRS jack type compatibility?

texts:
Is it possible to use the following together:

3.5mm mono connector with 2 conductors
3.5mm TRS jack with 3 conductors

In the order of going from source to an output device like speakers or to a computer.

Will it work fine (like mono)? What will be the resulting effect?

I can find information about going from stereo to mono but it seems hard to find info for the other way.


texts: reducing voltage to power CREE LED headlamp

texts: I have a LED Headlamp that uses 3AAA batteries that I want to power from a 6v-HD battery what do I need to do to reduce voltage to 4.5v I do not know wattage but it light output is 350 lumens


texts: I have been told that the movement of electrons is like a chain on a bicycle, however on videos for batteries i see that there is a charge seperation and when a wire is connected, these electrons flow through the wire to the negative terminal. The chain analogy maybe refers to applying voltage when the no of electrons are constant?


texts:
Recently, I have ordered smt-0440-t-r buzzer from Mouser.

Circuit is as shown in figure.

Microcontroller pin transmits square wave of 4kHz as mentioned in the datasheet. However, the sound isn't audible. When I am at a distance of 1-2cm from the buzzer, I am hearing very low intensity sound. Any fixes?


texts:
I don't know if the question is straightforward. I am not interested in the manufacturing process, soldering, testing, etc.
When I am working on a school project, first of all I try my design on a breadboard and then if it's a request, I design the PCB.

I have always thought how a motherboard/video projector main board/etc  that has many components (SMD) is tested in the beginning ?

Is the functionality split and tested separately ?

How about SMD technology ? How do you test SMD circuits without a breadboard ?

How big designs begin ? Starts with a breadboard ? I hope I am not silly.

EDIT: Another question: If I want to design a power supply (just an example) in SMD technology, where I can start ? To test first with THT components ?


texts: Why does a fault lead to increased reactive power demand?

texts:
When we have a fault, say on one line out of three, the reactive power demands increase, which leads to voltage instability if the source can't provide it.

My question is, what causes reactive power demand to increase? Reactive power depends on frequency and frequency in power systems is always fairly constant. This concept is quite confusing to me.


texts: Need clarification on why is a capacitor connected in AC op-amps but not in DC? And what does this capacitor do?


texts: Which transition mode for the four switch buck boost converter is correct?

texts:
I am currently researching on the application of the Four Switch Buck Boost Converter on a Fuel Cell Hybrid Vehicle, and I would like to ask about the transition mode of the buck boost converter. I have found 2 methods of implementation for the transition mode.

Figure 1: First implementation of the FSBBC (a) circuit (b) PWM signals
The first implementation uses two different duty cycles. The buck operation is achieved by the application of the buck duty cycle on Q1 (complementary buck duty cycle is applied on Q2) and the boost operation is achieved by the application of the boost duty cycle on Q3 (complementary boost duty cycle is applied on Q4). The buck duty cycle is fixed to 0.8, and the boost duty cycle varies from 0.05 to 0.45, depending on the desired Vout from the applied Vin

Figure 2: Second implementation of the FSBBC
The second implementation uses one duty cycle and has the transistors working in pairs. The A-D pair turns on during the first sub-interval of the duty cycle, and the B-C pair turns on during the second sub-interval of the duty cycle. The duty cycle is around 0.5 depending on the desired Vout from the applied Vin.

The simulation of each implementation works, but are each implementation possible from a physical implementation standpoint?
What are the advantages or disadvantages to using the first implementation over the second implementation and vice versa? It seems that the second implementation is more common compared to the first implementation, despite the higher current flowing through the inductor during its operation. I say "common", because most of the papers I've found online use the second implementation.
Why is the current flowing through the inductor in the second implementation higher (input current + output current) as detailed in this link: https://e2e.ti.com/blogs_/b/powerhouse/archive/2015/03/16/do-not-operate-a-4-switch-buck-boost-converter-in-buck-boost-mode

I have attached the 2 papers I've referenced in the google drive link below for further information:
https://drive.google.com/drive/folders/1Z25cREcIzBCCv4K6PO2a87GD-ruKcjmQ?usp=sharing
Please correct me if my understanding is incorrect, or there are gaps in my explanation. I would greatly appreciate any help you can provide. Thank you.


texts:
Suppose i have a laptop running on battery only and want the ability to switch to another battery without disrupting the laptop temporarily.
The batteries in question are Li-Polymer 7.6V with two positive wires, two negative wires and what i guess are four wires for battery safety and/or sensing current capacity.
I have multiple male/female battery connectors taken from similar motherboards/batteries.
How would you accomplish this? Is it feasible?
Thank you for any help


texts: Calculating a burden resistor for a current transformer

texts:
Background:

I follow a reference design for a single phase power meter (230 V, max 3 A). The below circuit is to measure current via a current transformer.

A current transformer will be connected to the CUR1+/- andCUR2+/- terminals (two current transformers in total).
CUR1 and CUR2 are to measure current on phase and neutral
D1-D8 are for protection.
D9-D10 are for a transient voltage suppressor.
R9 and R10 are the burden resistors.
The right part of the R9 and R10 are anti-aliasing filters.
I1+/- and I2+/- are connected to an analog-to-digital converter of a microcontroller

I am planning to use this current transformer as it is one of the lowest-priced options on that supplier.

Turn ratio: 1:1000
Inductance: 8 mH
Current rating: 200 A
Secondary resistance: 26 ohms

Question:

The design does not specify what current transformer is used on the circuit and how I should calculate the burden resistors. It says maximum applied voltage to the ADC is ±920 mV.

How should I calculate the burden resistors R9 and R10? Do I need to consider the filter part while calculating the values?
I see different values for the secondary resistance. What is it important for? Is it used in the calculation of the burden resistors?
As I understood, the inductance's effect of the current transformer on reactive power will be corrected on a different stage. Apart from that, is the inductance matter for the above circuit?
It is a single-phase power meter. Is it enough to measure the current at only one current channel? If it is so, why would it be needed to have a measurement on both channels?


texts: Why can't class A amp drive 8 ohm speaker with just one BJT?

texts:
I designed this class A amplifier. It's my first attempt at designing an amplifier with transistors. My objective is to build a guitar amplifier with tubes, but I figured that building an amp with BJTs and a low-voltage power supply first will enable me to understand what's going on before I attempt anything more complicated.

I want to drive an 8-ohm speaker. The problem, of course, is that if I connect RS, the speaker, suddenly the AC signal sees basically 8 ohms to ground and can't develop any voltage at the Q1 collector.

I think that the proper way to do this is to connect the Q1 collector to the base of another transistor, Q2, configured as an emitter follower, and drive the speaker from the emitter of Q2.

But what I'd like to understand is, what is the limiting factor that prevents me from driving the speaker from Q1? I have a fuzzy understanding that I need Q1 to provide voltage amplification and then an emitter follower to provide the current to drive the speaker, but I don't understand why I can't get both in one place, since all the power is ultimately coming from the same power supply. Is there a way to enable this circuit to drive an 8-ohm speaker without adding a second transistor?

simulate this circuit – Schematic created using CircuitLab


texts: What are the advantages or disadvantages that using internal interrupt instead of external interrupt in MCU?

texts:
in my project it seems I must using internal interrupt instead of external interrupt because my MCU run out of external interrupt pin. Here is an internal interrupt example I've found here.

I am quite curios about what kind of side-effects will the internal interrupt will bring to the entire system, is there any advantage/disadvantage?

Kind regards.


texts:
I'm trying to build a circuit which uses three 4094's to give me enough outputs to drive a number of LED's. I've built a few similar circuits before in the past using the same code and schematic, but for some reason this time I'm having problems controlling the shift registers.

The first 4094 is connected to my Arduino UNO using the following outputs:

CD4094_CLOCK  - Digital 2
CD4094_DATA   - Digital 3
CD4094_STROBE - Digital 4

For the sake of testing I've connected the 4094 OEs to +5V, but they will be on a PWM pin in reality. I've connected all the 4094 STROBE and CLOCK inputs as I've done previously, too.

I'm using the following program, however no matter what value I shiftOut to the 4094's most of the outputs stay high:

// CD4094 Constants
#define CD4094_CLOCK    2
#define CD4094_DATA     3
#define CD4094_STROBE   4
//#define CD4094_OE     3

char Display1 = 0, Display2 = 0, Display3 = 0;

void setup() {
    pinMode(CD4094_CLOCK, OUTPUT);
    pinMode(CD4094_STROBE, OUTPUT);
    pinMode(CD4094_DATA, OUTPUT);
    //pinMode(CD4094_OE, OUTPUT);
}

void loop() {
    Display1 = 63;
    Display2 = 6;
    Display3 = 91;

    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display3);
    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display2);
    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display1);

    digitalWrite(CD4094_STROBE, HIGH);
    digitalWrite(CD4094_STROBE, LOW);

    delay(3000);

    Display1 = 0;
    Display2 = 0;
    Display3 = 0;

    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display3);
    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display2);
    shiftOut(CD4094_DATA, CD4094_CLOCK, MSBFIRST, Display1);

    digitalWrite(CD4094_STROBE, HIGH);
    digitalWrite(CD4094_STROBE, LOW);

    delay(3000);
}

Here's a picture of my breadboard too, in case it could help someone?

Does anyone have any suggestions on how I can debug this sort of issue? The only tools I have are my multimeter and Arduino boards. Is there some kind of problem with my code?


texts:
I want to study digital circuits with the book "digital design" by M Morris Mano.

and I have no math knowledge.(I know only + - * /)

Do I have to study math first? if so, how much?

Generally(not specific to that "digital design" book) in which year, does the subject need math? First or second year?


texts: Altium Footprint has a huge room than the footprint itself

texts: I have a problem regarding footprint clearance or something similar while using Altium 18.1.11. The problem occurred as I designed a Pad with via on it but when I imported it to the PCB doc, the part has a huge room that is larger than the footprint itself and Altium did not allow me to place them properly. I have tried looking at the Footprint by using "Find Similar Object" but only the Pad and the vias are in the Footprint as I thought there might be another object in the footprint that caused this issue. Thank you in advance!


texts: Am I misunderstanding the specs of this solar panel or electric motor?

texts:
I've been trying to figure this out, but the answers I've come up with thus far have been counter-intuitive.

The solar panel's specs are as follows:

Maximum Power: 50W
Maximum System Voltage: 600V DC (UL)
Optimum Operating Voltage (Vmp): 17.8V
Optimum Operating Current (Imp): 2.8A
Open-Circuit Voltage (Voc): 22.4V
Short-Circuit Current (Isc): 2.95

The motor's max volts is 30, and max watts is 4800, presumably bringing the max amps is 160, and by this measure, it seems I would need nearly 50 of my solar panel to power the motor... is this right, or am I misunderstanding something? If I am, how is anybody achieving anything with solar? This is a small motor for an RC boat :/

This is the motor in question (more for trucks than boats, but oh well): Turnigy TrackStar 1/5th Sensorless Brushless Motor 760KV


texts:
I am for the first year in electrical engineering so sorry for this question but i couldn't test it by my own.

One of my lecturers said that the remote control of a TV saves the channel we choose, and that when we press the "last channel" button, the remote sends the channel and not the "return" signal. Is this true?

Thank you all for your answers, they were all good ways to test it.
I will inform my instructor about them!


texts: Need filter design to increase DC motor brush life

texts: I have an application which uses 120 VDC 1/4 HP motor and has poor brush life. Presently just using a simple bridge rectifier to convert 120 AC line power to 120 DC. I am wondering if adding something simple like a filter capacitor across the rectifier would help in this regard.


texts: Can measuring back EMF spikes damage the oscilloscope?

texts:
I want to measure the voltage across an inductor as soon as I disconnect one of its terminals to visualize how back EMF changes with and without a fly-back diode. From videos on Youtube: https://www.youtube.com/watch?v=43HFng0CVKg and other sources I found out the back EMF spikes usually reach very high voltages even above 400V. If my Oscilloscope is rated for a maximum input voltage of 400V, could measuring these spikes damage it? perhaps create an internal arc?
I've seen many people do this experiment as demonstration and no one mentions the oscilloscope's maximum input voltage restriction. I would like to know if it is safe to measure this type of voltage spikes.


texts: What's the best way to control DC current in a circuit from 1mA-20mA at 15-30V input with a microcontroller?

texts:
I’m trying to create a circuit for iontophoresis that I can control the current of with a raspberry pi or eventually a microcontroller.  What would be the best way to control the current?

Iontophoresis is a treatment for sweaty hands or feet where the hands or feet are placed on two separate electrodes and a current of between 4-20mA is driven through the body.  I would like to be able to take an input voltage of 15-30 V and produce a 4-20mA current depending on what value I specified ahead of time.  I also want to increase the current over a few seconds rather than go straight from 0 to max.

I did a session yesterday and found that the current from 2 9V batteries wired in series started at about 18 mA and then slowly dropped down to 8mA or so.  I was using tap water with salt and baking soda in it with aluminum foil sheets as electrodes and paper towels to separate my hands from the electrodes.

For the polarity switching I plan to use an H-bridge circuit.  And I have an INA219 sensor to measure current and voltage with, but I’m not sure what exactly I should use to control the current.  Digital potentiometers seem to often be only able to handle voltages of around 5V.  I found this one that can handle up to 30V but it also claims that max current is only 5mA at 30V and Rwb < 6k ohms and A open.  Which I’m not sure if that’s a problem or not?

Another option seems to be variable voltage regulators.  I found the LM317-N and a video talking about how to set it up as an adjustable constant current source.  My only concern with that is the minimum load current is listed as TYP: 3.5mA and MAX: 10mA.  Does that mean I’d have issues running it at less than 3.5mA through the hands during the startup and shutdown?
Constant Current Circuit Design

Any advice on the best course of action here?  Is one of those a good solution or is there a better way of doing this?


texts: What is this component on electric water-pump controller?

texts:
This is an electric water-pump controller

There is a component that I don't know what it is. it's marked as "RD". look:

In your opinion What would it be?


texts: Measuring temperature with a PTO and a microcontroller

texts:
I want to measure temperatures in a home oven using a resistance thermometer and a microcontroller.

A simple circuit that is often used is a voltage divider feeding an ADC pin.

Other circuits include a Wheatstone bridge and constant current sources. I have also seen circuits using an op-amp ahead of the ADC.

Finally there seem to be chips designed especially for this purpose such as TI's ADS1248 .

What I am looking for is a pointer to a good discussion of the tradeoffs between these various approaches and when one might choose one approach over another. In particular how does one approach a "balanced" solution in that it would make little sense to use a high precision op-amp ahead of a low-bit ADC. for example.


texts: How to prevent SOIC8 clip from backfeeding

texts: I'm trying to read the flash ROM using a SOIC8 clip, on board. I am horrible at surface mount soldering. Is there a way to use the clip on the board, without removing the chip, and not have the SOIC8 & reader (e.g. Bus Pirate) backfeed power into the board / processor? I've read about people shorting the processor's clock, or adding a capacitor, so that even though the the board is getting power from my Bus Pirate, the processor won't try to run instructions. What's the best way?


texts: nanosecond electronic pulser circuit - up to 100MHz

texts:
I would like to create a circuit which creates nanosecond pulses for a trigger signal with a frequency from 20 to 80 MHz, at 3.3V. I have created the following cricuit as can be seen in the attatched image.
Since this is a new design, would it work to get output singnals at the 50 ohm resistor of nanosecond width with each trigger signal (TTL 3.3V)?

Should I change the decoupling capacitors or do they seem to be correctly selected?
For the LT1021-5 should I change it to a lt1460-5?

I would appreciate any input,
thanks a lot!


texts:
I'm trying to find out how to build a circuit to extend the NFC range. NOT the range from the chip itself, but like following example:

  I have NFC enabled Tablet that has an built-in NFC chip. I want to extend the range of that NFC chip with a circuit that would be attached to the back of the Tablet (where the NFC chip is located) and through a wire all the way to another NFC Chip, which would be lest say 60cm from the Tablet itself, without diss-asembling the tablet!

There is an idea here, but this requires to diss-asemble the Tablet.
I dont want to do that, nor do I seek for a USB External NFC Readers (as they have poor Android supported Libraries). I need to find a way to extend the range though a cable.

Hope someone can help me out.


texts: Start/ stop 5v motor from headphones jack

texts:
I would like to make the jaw of a plastic skull open/close based on words spoken by a Raspberry Pi.  I can make the Pi send the audio to the headphone jack, and would like to use this output to run 5v dc motor which will open the jaw, and the jaw will close with springs when there is no sound out the audio jack.  I already have the jaw setup with motor and springs and it works when 5v applied, now I need the circuit to switch the voltage to the motor.
I tried the following suggestion from another question:

"You want an audio level detector".

This worked marginally - the motor was slow to respond and very low speed/power.   In another post it was suggested to use a FET, but looking at specs for FETs, I was not able to determine which might work with 5v power, input of less than 2v on gate to turn it fully on, and be able to power the motor which draws up to 350ma.

Can you suggest changes to the existing circuit or provide a circuit/ parts information to use FET for this?


texts: What does DC voltage reading from a DMM mean?

texts:
When a DMM is set to measure DC voltage, does a read-out value correspond to an output of the ADC inside the DMM, or do multiple ADC outputs are averaged over a time interval and then converted to the DMM read-out value?

An oscilloscope always reads fluctuations in voltage, but a DMM tends to give stable readings. I wonder where the source of the difference is.


texts: Eagle: Pins on FPGA exchangeable, depending on configuration

texts:
I'm trying to do the PCB design, using Eagle, for a small board with an FPGA that basically just routes the I/O lines to the outside.

So, for the purpose of routing this board, the pins are basically interchangeable, but obviously this doesn't transfer to the next design, so I'd rather not assign them the same swaplevel statically.

Is there a way to dynamically alter the swaplevel of the pins of components placed in a concrete project, or can I make components configurable in that way?


texts:
Brief sum up (you can go directly to the end if you already read the sum up in the other question)

For a home project I'm making a controller to drive a two-direction 230V motor. For those unfamiliar with this, it is a motor with two windings; when you power one of them the motor turns clockwise, when you power the second it turns counterclockwise.

Excluding the power earth, the motor consequently has three wires. The neutral is always connected to the mains N, while the other two get connected to the L 230V wire when the motor should be turned. Only one winding should be connected to the L at a time, the other is left unconnected.

For this project, space is very critical; please keep this in mind when replying.

Now, in this project I need to monitor the voltage on the two wires, in order to see whether a command is sent, and to monitor the current flowing in the motor, in order to understand when it finished the movement. This question is about the second problem. You can read about the first here.

END OF THE SUM UP

Ok, so I need to detect the current inside the motor. What I thought of is detecting the current through the neutral wire (I don't need to know which winding is absorbing).

The current in the motor is about 500mA - 1A.

I need a simple on-off information (with a threshold which has a fairly high margin).

What I came up with is using something like the ACS712, which gives me the current through the terminals, but it seems quite overkill to me (I don't need to measure it, just an on-off information is fine).

Using a shunt can be ok, but insulation between the 230V and the low power should be enforced.

And... space costraints!

Do you know any technique which is suitable in a small space?

Best regards


texts: Will a 3 phase induction generator fight its own rotation?

texts: So in a 3 phase induction generator with coils for the stator and magnets for on the rotor, I am wondering if the the current induced in the coils would create a magnetic field that would oppose the rotation of the magnets on the rotor?


texts:
I am trying to understand common mode voltage a little bit fundamentally (only with electronic devices and no math).

I watched this Youtube Video to understand common mode and differential mode voltage.

When he explains the circuit and draws the waveform, the waveforms represent the voltage at the collector or the voltage at the base? (let us assume they are transistors for simplicity instead of MOSFETs) Are those sine waves taken at the base of the transistors or at their collectors?

Please tell me whether my understanding is correct :

So, in this type of circuit, we always need to bias the transistors when we need to use them as amplifiers. So, while biasing, we set the voltage at the collector with the help of the collector resistor, right? So, the voltage measured at the collector of the transistor during OFF condition of the transistor is called as the common mode voltage right?

This is Another video which I referred to understand the biasing of transistors when they need to be used as amplifiers

And this voltage is the bias voltage of the transistors which is 1.2V (Common mode voltage of LVDS) incase of LVDS driver circuit right?

Can someone tell me whether I am right or wrong? If I am wrong, please explain me the concept of common mode voltage with out math and only with the transistors and electronics. Please.

I have previously asked the question regarding the LVDS Common Mode Voltage here
I haven't accepted the answers because I was not able to get clarity. Can someone please break this concept in very simple terms?


texts: change in ac reading relative to the frequency

texts:
I'm working on a school project, just measuring the Vrms of two different waveforms at different frequencies. The function generators output is connected directly into an oscilloscope therefore the waves don't go through any circuitry.

Frequency - pulse output(Vrms) - sinusodial output(Vrms)

50 Hz    ---   5.49V        ---        3.10V
500 Hz   ---   5.45V       ---         3.08V
5 kHz    ---   4.84V      ---          2.60V
50 kHz    ---  0.326V      ---         0.217V

As you see the output rms voltage has changed, however it shouldn't and that is the question. The only possible reason i could find is about multimeters not being trustworthy enough(?)

May there be any other explanation for this case, and could that drastic voltage drop from 4.84V to 0.326V mean we have gone far too out of the multimeters range?

Thanks in advance for all the help!

Multimeter i have used for measurements: UNI-T ut33a+
Link for the multimeters details(pdf file link): here


texts:
I have wired up my potentiometer to my breadboard with an LED and motor, and it only works intermittently. When I twist it certain ways it works, and other ways it doesn't.

I removed the wires, removed all the solder, and tried testing with my multimeter. If I check resistance on the terminals (positive to center, negative to either side, as well as positve and negative on opposite sides), i get infinite resistance. If I test directly on the resistive element after taking it apart and I read 0-46.K Ohms.

I examine the terminals and I don't notice anything wrong... so what gives? Should I even bother wasting my time trying to fix this as a newbie or buy a new one?

It has a W.L B50K on it.

EDIT: Sorry I should have said I first tested with resistance setting on multimeter. I got infinite resistance when testing the terminals. If I tested directly on the resistive element track I would get 0-about 45.6KOhms.

Here are pictures


texts: Ground plane and an impedance-controlled signal trace

texts:
I'm laying out a PCB for a project that has an HD-SDI input, which uses a 1.5GHz signal. I'm new to high-frequency considerations, so I'm struggling with a few concepts. Here is the schematic and layout of the area near the SDI input, which is based entirely off the recommended design of the chip I'm using. J2 is a 75\$\Omega\$ MMCX through-hole jack and the chip on the right is the Semtech GS2961A (SDI-to-parallel converter).

4-layer board
Red: Top layer
Blue: Ground layer and bottom layer

For reasons, I put the MMCX jack and the components on the same side of the board. Since the jack is through-hole, the SDI signal enters the board on the bottom layer and comes up to the top layer in a via (located to the left of R1). In order for the via to have the necessary 75\$\Omega\$ impedance, I had to make a large anti-pad around the via. Similarly, the width of the trace carrying the SDI signal is such that it also has a 75\$\Omega\$ impedance. So far so good.

The part that concerns me is how the anti-pad around the via affects the impedance of the trace as it approaches the via. Since the trace impedance is a function of its distance from its reference plane, what happens when that reference suddenly vanishes? Is there a sudden impedance spike that will cause reflections or is the effect negligible?

Also, should the ground plane be removed underneath the resistors (R1, R2, and R3) forming the termination circuit?


texts: 240 V AC to 5 V DC power supply recommended fuse

texts:
Admittedly this is quite a novice question but I just wanted to make sure before I start a potential fire as this project is destined for an enclosed space behind a gyproc wall...

I picked up a Vigortronix 230 V AC to 5 V DC PSU to power a Pi Zero W and camera. I'd like to put an in-line fuse on the live wire and after looking at the data sheet I'm unsure what size of fuse I should be using. Which figures should one use to calculate this?

Also, would it be good practise to place a capacitor on the 5 V output or unneccessary - if so, what size of cap? Lastly, would there be any other recommendations for using this type of power supply?

Thanks in advance.


texts: What is the blue wire for on my battery? (samsung galaxy note 10.1)

texts:
I have this battery out of a Samsung Galaxy Note 10.1

and this battery has 5 wires; 2 black, 2 red and 1 blue wire. I assume that the red wires are positive and the black wire negative charge.

I've searched all over the internet, but no solution. Could someone tell me what the blue wire is for? The battery is a SP3637B1A(1S2P) 7000 mAh from Samsung.


texts: Op-amp inverter amplifier, low current, with AC noise at 50Hz

texts:
I was doing some measurements for a coursework.
Op-amp, LM741 in an x10 inversor configuration.

When the resistances in use become high enough, 1MOhm and 10MOhm, the output is correct but it has a 50Hz noise on top, of amplitude that would suggest an extra 80nA through the resistors.
That effect isn't seen while simulating on PSpice, but it is expected behaviour since other people measured it too.

Now, the datasheet gives 80nA as the bias current, so I, who still don't know much of how an op-amp works internally, suspected it was to blame.
However, I've been told that the bias current is always DC so it can't have anything to do with that, and that it has to do with something acting like an antenna, but no clear explanation was offered to me.
Is that true? I have no clue what's going on and would appreciate orientation

EDIT

The objective is just educational, it's to understand the behaviour. With 1k-10k resistors it works perfectly. 50Hz is the mains frequency so the noise is surely somehow due to that. But I'd like to know more why that noise happens, how to model it in a way that it explains the fact that it's there with 1MOhm resistors but not with 1K. Also, if it's related to some parameter in the LM741 datasheet that explains the amplitude of the noise


texts:
I'm in the process of designing a PCB that includes 10-15 LEDs. It's battery-powered, so I'd like to use as little power as possible. As such, I've been trying to figure out how little current the LEDs need to still appear relatively bright.

As an experiment, I measured the voltage across the current-limit resistor (R12) for the power LED on my BeagleBone Black. Voltage was 0.75V, so current was only 0.16mA (using Ohm's Law).

At first this seemed like great news -- the LED appears extremely bright, so I thought I'd use the same LED/resistor combination on my board. That way, I'd be able to power 10 LEDs at a total of 1.6mA.

However, upon digging around some more, I found the following graph from the LTST-C191TBKT datasheet, which shows that luminous intensity is basically zero below ~3mA.

This seems to be a contradiction ... any ideas why the datasheet claims the LED gives off no light below 3mA, but the LED appears quite bright at 0.16mA?


texts: Transfer charge from a battery to another battery storage

texts:
I am conducting a feasibility study and one of the features of our innovation is that the "charge" that has been stored in our "Li-Po battery" can be transfer to another "battery storage"

I would like to know if this transferring process is possible through a cable wire connected to both Li-Po and the another battery storage.
(If not, what are the ways on how to transfer this charge)
I would also like to know if we are also using Li-Po battery as our second "battery  storage"

Thank you in advance :)


texts: Which way I should go, Relay or Triac Switching?

texts:
I am developing one consumer product in which I am going to operate Resistive and Inductive loads. In this project there is also a need of dimming of the loads.

I have completed programming part. But doing study of switching through programming I got confused at what to use for switching. Relay or Triac?

I have studied that every Automation companies are using Relay for switching of loads. And for dimming purpose they are using Analog Dimming. While Triac can do both Switching and Dimming through phase cutting.

So my confusion is, why everybody is going with Relays not Triacs?
What can be the possible points for not using Triacs?


texts: Reduce Overheating of an old Audio Video Receiver - Harman/Kardon 3500

texts:
Because good AVRs are super expensive, I got one cheaply from a friend. It works really decently, but recently it started to turn itself off after a while. With my technical background I looked into it, but I am not that deep into audio-tech.
The only thing I felt so far is that this thing gets incredibly hot. I know AVRs do get way hotter than laptops because they have no active cooling (fans) only passive grills, but it is so hot that I could make toast on it.
Are there any good ideas what I should do and check if I open it up? I am not really scared to open and measure a bit around, but not knowing what to measure and where to look is the main problem. Any tips would help.
The AVR stays on the shelf, pretty open with good air around it so I doubt it's that.
My Soundsystem is a Teufel Consono 35 Mk3 which should be fine
Manual of the AVR doesn't say anything helpful as well:
https://servlib.com/harman-kardon/audio/avr-3500-sm2.html
Thanks!


texts: Can anyone explain these conditions for the current mirror?

texts:
An important feature of the current mirror is a relatively high output resistance which helps to keep the output current constant regardless of load conditions. Another feature of the current mirror is a relatively low input resistance which helps to keep the input current constant regardless of drive conditions.

I don't really understand what it means here by load and drive conditions, and also why output resistance is high and input resistance is low.


texts: Resistance Wire Circuit Safety Around Water

texts:
I'm working on a project that requires heating of a copper pipe with water running through it.  I'm aware that this is a common issue by itself but as there will be people working around the system and the pipe has condensation running down it I am looking for some safety guidelines to avoid shocking people working in the lab.

I calculated that I'd like to run the wire at around 48 VDC with 5.3Amps resulting in ~260W.  I've been reading around the internet that when water is introduced that it substantially increases the danger with regard to fatal human shock (as opposed to dry hands touching lowish voltages).

How can I make the setup safe to work around, specifically are there any circuit design considerations and board assembly tricks (conformal coat to some extent I imagine), or is this more of a mechanical placement/guarding issue?

Issues I'm worried about: accidental contact with wire/pipe, accidental  water dripping around control box or down wires into control box, plugging and unplugging heater from wall with moist hands (maybe that's just a common sense issue).

Thanks for the help.


texts: Is it possible to provide DAC voltage to VOUT_ADJ to control Vout?

texts:
I am using a TPS61391 booster.

I need to adjust Vout via a DAC connected to FB pin voltage divider (VOUT_ADJ).

is this possible?

DAC voltage varies from 0 to 3.3V.


texts: Does radiative recombination occur in regular diodes as well?

texts: If so then where does the photons produced go ? If not, why not ?


texts: Minimum clearance between two traces that have a potential difference of 1000VDC

texts:
I am designing a PCB and there will be high voltages. What is the recommended clearance that I should have between two traces that have a voltage difference of 1000VDC and 2000VDC?

Additionally, is there an equation that I could use to calculate clearance depending on voltage?


texts: What parameters are to be considered when choosing a MOSFET?

texts:
I have a circuit that uses a MOSFET to heat a nickel titanium wire (by switching of course). But I don't understand why does it use IRF740 specifically.

What parameters do we look into when choosing a MOSFET? Appreciate the help!

For reference: the image of the circuit


texts: Making a TS cable with a 3-conductor wire

texts:
I want to make a guitar cable (standard 1/4 inch TS - tip-sleeve plugs). I have the appropriate plugs, but a 3-conductor (two leads and sleeve) wire. So I need to leave one conductor unused.

What is my best option? Using the two "inner" conductors and leave the sleeve uwired, or using one of the inner conductors and the sleeve?


texts: How does the size of a resistor connected to an input of a NOR gate affect it?

texts:
After watching this video, I decided to make the same circuit is there. The circuit has 2 NOR gates and makes 2 LEDs turn on and off. It is very similar to the one here:

I used 5V and 100 ohm resistors for my LEDs. For the resistors connected to the inputs of the NOR gates, I used 100 ohms and everything worked fine. But then I tried using 10k ohms and both of the LEDs were lit. I started varying resistor values and found out that 1k ohm works fine. I am confused why larger resistor values make both of the LEDs stay lit.
My NOR gate is 74LS02PC.

Here is my circuit:


texts: How does one find an equivalent component?

texts:
I was looking for an equivalent MOSFET and haven't had any success.

I'd like to know if are there any websites or software which gives a list of alternative equivalent components?

Edit:

The purpose of this question is not only for MOSFET's, but for any type of component.

I want to learn how to find equivalents (or similar) components without having the need to ask about specific components here.


texts:
I am learning processor basics. I have this doubt.

If I have a processor with 9 one-byte instructions and one 2-bytes instruction in its instruction set architecture, should n't the instruction register of the processor be 16 bits instead of 8-bits ? Say for example:

2000  MOV A,B
2001  MVI C, 20h  --- 2 byte instruction

In my book it says PC points to address 2003 after 2001. So it means, when PC was pointing to 2001, both the 8-bit immediate data and the 8-bit opcode were fetched into the instruction register in one go right ? Or is it fetched in two cycles ? Also I would like to know what is the significance of data and instruction caches in a processor. Is it neccesary in a processor ?


texts:
I want to make a DIY Power PUC to put led's on my motorcycle. I plan to use 5050 RGB strips. Power supply to these LED's will be in the form of a carbon brush - aluminium ring assembly. But since the wheel will be rotating there will be fluctuations in the current reaching the LED on the wheel through the carbon brush. Hence I was thinking of using capacitors to tide over the current drops. These capacitors would be attached between the aluminium ring and the LED wire.

I would like to know how I should calculate the capacitor required and how to connect it - in series/parallel, and whether any other components will be required for this purpose.

Thanks in advance.


texts: Precise line regulation using linear voltage regulators

texts:
I am trying to build a linear 24/12V power supply. One of the requirement for it is for the line regulation to be very precise (an error of 0.0005 V is considered acceptable). I wanted to use a linear regulator Ic, but I haven't found any that fit my needs.

What can I use to build such a supply?

Thanks!


texts: Can a castellated PCB/module have electrolytic capacitors in it?

texts: We're designing a small module (3in x 3in) that will have castellations on the edges for connection. I just watched a video on castellation PCB design. The video talked about the module going thru reflow several times. Once to build the module and then the customer to assemble the module on his/her PCB. We have a power supply module that needs electrolytic capacitor at the regulated outputs and unregulated inputs. Outputs are 3.3vdc and 5vdc. Input is about 18vdc. Do regular electrolytic capacitor withstand reflow 2,3 or 4 times without issues? Thanks.


texts: Old motor with unknown pulse generator signal

texts:
I have been building a new controller unit for a ~20 years old gate opener because it was never reliable, and eventually stopped working entirely.

So far, I have got everything working except from stopping the motors at the correct time. The motor has 5 wires, two for 24VDC for powering the motor, two 12VDC for powering a "pulse generator", and a single "pulse generator" wire.

I was not able to figure out what kind of signal this pulse generator delivers, so I started off by just starting the motor, waiting for some time and then stopping it. However, I realized that this desynchronizes really quickly which results in the gate hitting the wall or not closing correctly.

So I tried analyzing the signal from the pulse generator, because the old board could do this starting and stopping precisely. It is a 10 kHz squarewave signal, but no matter how hard I tried stopping the motor, it never changed in frequency or duty cycle, but that may be due to my 30€ oscilloscope from ebay. I also observed that the original board would refuse to boot if the pulse cable was disconnected. When the cable was removed while the motor was moving, the motor more or less stopped.

Has anybody had experience with such circuits / signals?

If it helps, I have got the users manual of the original controller ("Einhell FA-G 2601").

The owners manual can be found here.


texts:
There is a Problem in our textbook which asks us to find, using Kirchoff's law, the voltage across component v_x and v_y.

According

I know that the voltage at node 1 should be 14 volts from [21 + (-7)]=14 (in terms of $$v=\frac{dw}{dq}$$
not in terms just of potential difference.

The voltage across V-x is 9 because the voltage across the two components in series right below it is 5.

Of course, v_y is 14.  This said:

Is there going to be any voltage across the rightmost component?

simulate this circuit – Schematic created using CircuitLab


texts: Availability of 0.01 pF and 1 pF chip capacitor with SRF more than 15 GHz

texts:
I am working on a parasitic steerable phased array antenna, designed at 15 GHz. I need to terminate one of the array elements with a 0.01 pF chip capacitor to achieve desired steering direction. I have explored a lot, but sadly I could not find a 0.01 pF chip capacitor available in the hardware with any vendor. The least I could find was 0.05 pF manufactured by AVX RF. Does anyone know of any vendor who manufactures 0.01 pF chip capacitor having self resonant frequency (SRF) more than 15 GHz?
Also, I need another chip capacitor of 1 pF with SRF more than 15 GHz. 1 pF capacitors are easily available but the SRF is far below 15 GHz and hence cannot be used in my design.
Any suggestion or solution to deal with this issue would be highly welcomed.


texts: Hand Calculations of Emitter Coupled Logic circuits

texts:
I am having trouble approaching doing hand calculations for the MECL shown below. I know since Qa, Qb, Q1 all have common emitter voltages so they cannot all operate in the same mode if there base voltages are different. If VA = -0.6 V and VB = -1.5 V, then at least two of the three BJTs must be operating in cutoff mode. My question is how do you determine which ones are in cutoff mode and which one is on or to approach any type of problem like this
Thank You
Image Taken from EE 307 at Cal Poly


texts: My Arduino is unable to connect to Windows 10

texts: I accidentally passed 12V through my Arduino's Input pin. Now Windows is unable to recognize it. Do anyone have any idea to revive it?


texts:
Is my understanding correct? Since the voltage past the first Diode is 10. That would mean that the diode will be reverse bias while the second diode will be forward bias? If this is true, that means that the Volage V is simply -15V since the first diode is off.
Diodes are ideal.


texts: No unconnected inputs yet ICs (logic gates) still seem to yield erratic/odd behaviour

texts:
I just finished building a 4-bit adder on a breadboard and I am experiencing some quite odd/erratic behaviour and I am wondering why. The actual circuit/logic works as intended, meaning the 4-bit adder does what it is supposed to do. The weird behaviour I am experiencing is with the LEDs seemingly arbitrarily turn on/off depending on how close my fingers are to also seemingly arbitrary parts of the circuit.
I am using 74HC86 for XOR gates, 74HC08 for AND gates and 74HC32 for OR gates. The switches are SPST ones. A 4-bit adder requires 8 XOR gates, 8 AND gates and 4 OR gates. I've used all of the inputs of the logic gates so there shouldn't be any "floating inputs" coming from the logic gates? I have used pull-down resistors on the switches too. Why is this erratic behaviour occuring?
Do I have damaged ICs?
See video to see what happens (YouTube)

I made another post yesterday regarding the same problem. I got a ton of good help and we came to the conclusion that it was most likely "floating inputs" from the CMOS logic gates causing problems. Yesterday I hadn't completed the build yet and I sure had tons of unconnected inputs coming from the logic gates causing problems.
I thought if I just finished the build I surely wouldn't end up with any unconnected inputs because the build requires use of all of them. I finished it today and as stated before, I have no unconnected inputs so where am I experiencing "floating inputs"?

Logic gates are in order (left to right) XOR-AND-XOR-AND-OR
Top left resistors: 10kOhm
Top right resistors: 1kOhm
Bottom right resistors: 10kOhm
**Bottom right is where I use my Arduino to connect 5V to the breadboard and of course Arduino to ground.


texts: Calculate an inductive coil parameters for EMP generator

texts: For research purposes, I want to calculate an inductive coil parameters suitable to work with high voltage and low amperage impulses, produced by power source (handheld high voltage generator) that can produce short high voltage and low amperage impulses, about 53 million volts and 1-3 mA. The coil should generate short electromagnetic pulse (EMP) which need be focused to a beam for greater efficiency. The most difficult task is probably, how to get EMP focused to a beam without using the complex technology and special materials, just with common DIY parts & components that can be purchased through Digi-Key. Need calculate also EMP impulse power on the output (theoretical). The required power of EMP impulse should be enough to reliably damage(but not melt) electronic parts from the distance 1-2 in. I need help to calculate an inductive coil and how to get EMP impulse focused.


texts: Amp Draw On Battery Over Time & Battery Run Time

texts:
Can someone post a formula / help me figure out how to figure out the battery run time for the following scenario?

I have a single 12v led light bulb with a draw of 510mA @ 12v and 1400mA @ 8v. If I start with a AGM 12v 80Ah battery and let it run for say 10 hours how do I figure out the run time given that the amp draw will rise as the battery is discharged? I know battery discharge is non-linear so I am not sure how to calculate.

Also it is worth noting that I plan on using 4 of the these light bulbs so ultimately I need to also calculate that in as well.

Battery Specs:

Product ID: 24M-XHD
Cranking Amps:  1000
Cold Cranking Amps: 800
Voltage:    12
Termination:    Common Code M
Weight (lbs):   44.6
Width (in): 6.88
Length (in):    11.00
Height (in):    9.50
ReserveCapacity-25: 135.00
WET/DRY:    W


texts: If I put multiple isolated DC/DC converters in series, can I add their isolation voltages?

texts: Suppose I have a DC/DC converter that's rated for 2250VDC isolation for one minute. If I put two of these devices in series, making sure to maintain proper clearances on my PCB, do I get an effective isolation voltage of 4500VDC for one minute? Am I still limited to 2250VDC? Do I get something quantifiable in between?


texts:
For a 2-row connector intended to interface a cable to a PCB, which method is preferable for twisted pair LVDS signals?

Horizontal Pairs:

LVDS1-    LVDS1+    LVDS2-    LVDS2+

Vertical Pairs:

LVDS1-     LVDS2-

LVDS1+    LVDS2+

I would have thought the difference would be inconsequential but a PCB designer mentioned that the horizontal configuration offers better signal integrity. We were in a group conference call so I didn't really have an opportunity to ask him to explain himself. Is he correct that horizontal pairs are preferable to vertical pairs?


texts: Power from battery when primary source fails

texts:
I'm attempting to design a circuit that will be powered from a 12V primary source but if the power fails then a relay switch to battery (which is maintained charged by an UC3906).

The idea is that if primary source is present the MOSFET is on, activating the relay. When primary source fails the MOSFET is off and the relay go to the position showed in the schematic, the application is now powered by the battery.
Do yo see this reliable?

Update:
I wish to ensure that no current is drawn from the battery if primary power is present and I prefer to not put the primary voltage above the battery voltage (which is already slightly above 12V), with the two diodes solution I added a pMOSFET to get it (may be D1 is not necessary now?).


texts: 5V Tolerant Way To Generate Rising Edge Signal on USB Connection

texts:
I have a microcontroller device that can be awakened from deep sleep mode when it detects a rising edge signal on a wakeup pin. The wakeup pin is 5V tolerant and I'd like a connection to a USB port to generate the rising edge signal. Originally I was just going to have the Vusb generate that rising edge on connection along with a pull down resistor but somebody pointed out that Vusb can be very noisy and have large transients especially on attach. The following image shows my USB input circuitry as currently designed.

I've had some people tell me that a pulldown (10k) paired with a small (0.1uF) cap on the wakeup pin using Vusb directly will do the trick but another person recommended a buffer IC like a non-inverter buffer with schmitt trigger.

Are they both right or is one clearly a better option than the other? Is there another generally accepted approach that would be better for generating the rising edge when USB power is connected?


texts: Are there general methods for determining if an IC is soon to become obsolete (by the manufacturer)?

texts:
I've recently started up a new project and have been looking for an audio codec. I was able to find a simple voice band codec (here which seems like it might work for my project. However, something that stuck out is that this data sheet was originally produced in 2001 which leads me to believe this chip has been around for a long time.

So my question: are there any general methods for determining if an IC will soon become obsolete by the manufacturer? This is something I've never really put much thought into, however, it seems like it is a major item to consider when selecting components.

I assume the answer will be dependent on manufacturer, the IC itself (e.g. 555 timers will probably be around forever), any many other factors. I would like to get a 'best practices' answer.

Thanks!


texts: What's wrong with my 16x2 LCD program and solder?

texts:
I'm a total noob on Arduino here, and this is my first project on 16x2 LCD, 4x4 keypad and others. So, the story is, after I uploaded the program for my group's Arduino alarm clock to the Arduino board, the LCD displays black boxes on the first row of the LCD. Plus, when I disconnected the board from my computer and connected the board to a 5V adaptor, the LCD didn't display anything.

I've already searched the possible causes from the Internet, and mainly they said that either the initialization of the LCD is wrong or there are problems on the soldering. My friend and I concluded that there are no problem with the soldering, but we don't know where the problem is in the program.

The thing is, we didn't have any connection for the backlight of the LCD since we have no potentiometer. I tried to control the contrast and brightness of the LCD by using the Arduino, but I can't understand anything since I'm a total noob.

This is the image of the soldering of the LCD.

Below is the latest code that we uploaded on the Arduino board. Is there any fault in the program?

    #include <EEPROM.h>
    #include <Keypad.h>
    #include <DS1307.h>
    #include <Wire.h>
    #include <Adafruit_GFX.h>
    #include <LiquidCrystal.h>
    DS1307 rtc(SDA, SCL);
    LiquidCrystal lcd(A3, A2, A1, A0, 5, 4);
    Time t;

    #define buz 3

    int Hor, Min, Sec, h, m, s;
    int ASCII = 48;
    char* tim;
    char* dat;
    const char key = 0;
    char buffer[2];
    const byte numRows= 4;
    const byte numCols= 4;
    char keymap[numRows][numCols]=
    {
    {'1', '2', '3', 'A'},
    {'4', '5', '6', 'B'},
    {'7', '8', '9', 'C'},
    {'*', '0', '#', 'D'}
    };
    byte rowPins[numRows] = {12, 11, 10, 9};
    byte colPins[numCols]= {8, 7, 6, 5};
    Keypad myKeypad= Keypad(makeKeymap(keymap),rowPins, colPins, numRows, numCols);

    void setup() {
    Wire.begin();
    rtc.begin();
    pinMode(buz, OUTPUT);
    lcd.begin(16, 2);
    welcome();

    rtc.setDOW(SATURDAY); //Set Day-of-Week to SUNDAY
    rtc.setTime(10, 54, 0); //Set the time to 12:00:00     (24hr format)
    rtc.setDate(7, 1, 2017); //Day, Month, Year
    }

    void loop() {
    t = rtc.getTime();
    Hor = t.hour;
    Min = t.min;
    Sec = t.sec;
    tim = rtc.getTimeStr();
    dat = rtc.getDateStr();
    char key = myKeypad.getKey();

    if (key == 'C'){
    digitalWrite(buz, LOW);
    EEPROM.write(2, ASCII+6);
    EEPROM.write(3, ASCII);
    }

    if(key == '#'){
    lcd.setCursor(0,0);
    lcd.print("Enter New Time");
    lcd.setCursor(0,1);
    int j =0;
    int i=0;
    while( j<6)
    {
    if(i==2 || i == 5){
    lcd.print(":");
    lcd.display();
    i++;
    }
    key=myKeypad.getKey();
    if(key)
    {
    lcd.print(key);
    lcd.display();
    EEPROM.write(j,key);
    j++;
    i++;
    }
    }
    }

    changealarm();
    checkalarm();
    timedate();
    }

    void checkalarm(){
    if( Hor == h && Min == m)
    {
    delay(3000);
    lcd.setCursor(0,1);
    lcd.print("Hold C");
    digitalWrite(buz, HIGH);
    delay(3000);
    }
    }

    void changealarm(){
    buffer[0]=EEPROM.read(0);
    buffer[1]=EEPROM.read(1);
    h = atoi(buffer);
    buffer[0]=EEPROM.read(2);
    buffer[1]=EEPROM.read(3);
    m = atoi(buffer);
    buffer[0]=EEPROM.read(4);
    buffer[1]=EEPROM.read(5);
    s = atoi(buffer);
    }

    void timedate(){
    lcd.setCursor(0,0);
    lcd.print("Time: ");
    lcd.print(rtc.getTimeStr());

    lcd.setCursor(0,1);
    lcd.print("Date: ");
    lcd.print(rtc.getDateStr());
    delay(3000);
    lcd.setCursor(0,1);
    lcd.print("Alarm: ");
    lcd.print(h);
    lcd.print(".");
    lcd.print(m);
    lcd.print(".");
    lcd.print(s);
    delay(3000);
    }

    void welcome(){
    lcd.setCursor(0,0);
    lcd.print("Welcome");

    lcd.setCursor(0,1);
    lcd.print("To");
    delay(3000);

    lcd.setCursor(0,1);
    lcd.print("TIMeProject");
    delay(3000);
    }


texts: does having encoder/decoders in 433MHz rf links improve range and reduce noise?

texts:
with the use of encoders and decoders I'm able to interface more than one RF link pair at the same time, this is what the usage of an encoder looks like to me.

Are there more uses to it than this?

Does it help us to improve range and reduce noise?


texts: Using D+ and D- from USB as power source?

texts:
I'm working on a project in which I need to be able to toggle the power to a USB device connected to my laptop. My original intention was to reduce the 5V USB power to 3V, and then toggle the USB on and off with a program I would write. However, after some research it would appear that it is not possible to turn USBs on and off with code.

With that in mind, I'm wondering if it would be possible to use the D+/D- lines as a togglable "power source" for my device. I've read in several places that the data lines on USB's are 3.3V? Is that true for all data USBs, or am I missunderstanding? If its true, then I could theoretically reduce those 3.3V to 3V and it would solve my issue (as I could send/not send data).

I'd also like to importantly point out that I say "power source" because it doesn't have to be constant, just a short on/off pulse with a high enough voltage.

Also I realize that there are products that exist on the market that I could buy to simplify my issue, but the idea of my project is to use things I already have available to me (just the usb device, resistors and cables).

I also should have noted exactly what my project is - its very much a patchwork project. I've hijacked the remotes for two strings of Christmas lights. I've hardwired one to be permanently on and other permanently off. Each remote originally contained a 3V Lithium coin battery (CR2025). Instead of hijacking the IR system, I decided it would be easier to hijack the power one. So I decided to replace the battery with USB power, which is where I ran into my problem I stated above.

Pulsing the USB power to the ON remote will simulate me pushing the ON button, and likewise for the OFF remote.


texts:
I have some questions regarding NMOS/PMOS characterization. I'm designing a common source amplifier using gm/Id method and since it requires characterization, I did so but using minimum lengths and widths for NMOS and PMOS (90 nm for all lengths and widths). My question is, is this okay? Are there no restrictions to lengths or widths when characterization?
Also, an assumption was mentioned here that width of PMOS is thrice of NMOS. Is this applicable all the time and should this be followed always? Because my final width and length values do not follow this trend and yet it can achieve the desired specs.


texts: How long to program a FPGA - seconds, microseconds, less?

texts: How long does it take to load a new configuration on a FPGA? can a FPGA be re-programmed on the fly while a computer program with offloads to the FPGA is running?


texts:
I am attempting to implement I2C interface on the STM32F7-Discovery Board using the a VEML 6070 UV light sensor (https://www.vishay.com/docs/84277/veml6070.pdf).

The 7-bit slave address for the device is 0x38. The addresses for data access are 0x71(LSB) and 0x73(MSB)

I am not able to write or read any data from the master. When I check the HAL_Status it returns HAL_Timeout.

Some of my code is shown below:

EDIT:

void VEML6070_Init(void){

char data[1];

HAL_I2C_Master_Receive(&hi2c1, 0x18<<1, data, 1, 150);

data[0] = 0x06;

HAL_I2C_Master_Transmit(&hi2c1, 0x38<<1, data, 1, 150);

}

int main(void)  {
 unsigned int rawUV;
 char lcd_buf[5]
 uint8_t address[1];
 uint8_t MSBdata[1];
 uint8_t LSBdata[1];
 SystemClock_Config();
 MX_I2C1_Init();
 MX_GPIO_Init();

 VEML6070_Init();

 address[0] = 0x02;

 HAL_I2C_Mem_Write(&hi2c1, 0x38<<1, 0x70, I2C_MEMADD_SIZE_8BIT, address, 1, 150)

 HAL_I2C_Mem_Read(&hi2c1, 0x38<<1, 0x73, I2C_MEMADD_SIZE_8BIT, MSBdata, 1, 150)

 HAL_I2C_Mem_Read(&hi2c1, 0x38<<1, 0x71, I2C_MEMADD_SIZE_8BIT, LSBdata, 1, 150)

 rawUV = MSBdata[0]<<8 | LSBdata[0];
 sprintf(lcd_buf, "%d ", rawUV);
 //GLCD_DrawString (0, 7*24, lcd_buf);
}

Does anybody have experience of implementing I2C with the STM32F7 boards, and if so are you able to shed any light on why I may be getting 'HAL_TIMEOUT'?
Is it a case of me using the wrong register addresses, or is it something more complex?

Thanks.

Edit:

I have now altered the code to use the correct protocol, but I am still finding a 'HAL_TIMEOUT'.

HAL_I2C_Master_Transmit(&hi2c1, 0x38<<1, address, 1, 150);

HAL_I2C_Master_Receive(&hi2c1, 0x39<<1, MSBdata, 1, 150);

HAL_I2C_Master_Receive(&hi2c1, 0x38<<1, LSBdata, 1, 150);

Any other suggestions?


texts: How can I calculate reverse leakage current in a Schottky diode in series with a resistor?

texts:
I am determining the reverse leakage of a Schottky diode in a circuit:

simulate this circuit – Schematic created using CircuitLab
The intention here is to bias the P-FET gate so that it conducts when the switch is open (technically when V1 is absent). When the switch closes, it should stop conducting and isolate the battery. (There is a body diode in the P-FET not shown by the schematic.) The purpose of the Schottky diode is to prevent current flow from the battery to ground through the gate bias resistor. However some leakage will of course be unavoidable.
The datasheet for a diode under consideration indicates that approximately 15µA of leakage should be expected for 3V reverse bias.
My question is how will this leakage be affected by the bias resistor? With the switch open, the potential at D1 anode should be 0V, but would the resistor not also further reduce this current? How do I calculate that?
This related question was not very helpful because I am unsure if the OP's formulas are remotely applicable or correct.
Edit:
This device is battery powered with a non-rechargeable battery. V1 represents an optional 3V source which, if used, should not be connected to the battery. The purpose of the circuit is to allow the device to be powered with the battery under normal circumstances, but if V1 is connected, it powers the device instead and the battery is disconnected.
The diode is meant to prevent the battery voltage from affecting the gate, while the FET (and its body diode) is meant to disconnect the battery when V1 is present.
Judging from comments and answers, this intention was not clear. With that explained, I am also sensing that there are bigger issues with this design, on which I would appreciate any constructive criticism.


texts: How can I read a tristate output with microcontroller?

texts:
I'd like to interface the STAT line of an MCP73831 lithium ion charge manager IC to a microcontroller to read the current charging status of it.

The datasheet explains, in the section 5.2.1, that the STAT line is tristate output and have the following status:

High
Low
High-Impedance

and a table is provided that explains how each level represents each charging states of the battery.

How can I connect this pin to a microcontroller I/O and read these three distinct states?

Reading High and Low is quite straightforward, but detecting a input is high impedance I've not done before.


texts: Questions regarding solder wire for general hobbyist use, mostly just wires together

texts:
I am looking to get into hobbyist, "casual" electronics work, and I am concerned about which type of solder I should look at - I don't have any current plans for going to PCBs, just mainly breadboard and loose wire types of applications.
I have some questions:

I am used to a thicker solder (maybe 1.5-2mm) from courses in school, but everywhere seems to recommend thinner for tighter areas. However, I am starting with just loose wires and terminals on components, so is thickness that vital? Would the thicker solder still cause issues?
On Digikey (mainly used right now to get an idea, to figure out model numbers and such,) they have Kester Solder brand wire, two of which are 24-6337-8814 and 24-6337-7614. The first is part of the 245 series, while the second is part of the 275 series. Would either of these be sufficient for what I have planned?
Is any cleaning required for my chosen application, namely wire to wire and wire to terminal on motors and sensors and such?
In the future, if I DO expand into PCBs and maybe even surface mount, would the 8814 model number above, as an example, still work fine without needing to clean the board? I am trying to minimize the hassle of this, so I am trying to find a solution which is most streamlined.