texts: VHDL error during synthesis, declarationa and syntax error

texts:
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use ieee.math_real.all;

entity dds_sine is
port(
  i_clk          : in  std_logic;
  i_rst         : in  std_logic;
  i_f          : in  std_logic_vector(31 downto 0); --frequency control word
  i_start_phase  : in  std_logic_vector(31 downto 0);
  o_sine         : out std_logic_vector(13 downto 0));
end dds_sine;

architecture rtl of dds_sine is

component counter is
port (
  i_clk : in std_logic;
  i_rst: in std_logic;
  o_count : out std_logic_vector (31 downto 0)
  );
end component counter;

constant count_no : integer := (2**32)-1;
signal l_count : integer range 0 to count_no;

begin
    process ( i_clk , i_rst )
    begin
      if (i_rst = '0') then
        l_count <= 0;
      elsif ( i_clk'event and i_clk = '1') then
        if (l_count = count_no) then
          l_count <= 0;
        else
          l_count <= l_count + 1;
        end if ;
      end if ;
    end process;

o_count <= l_count;

signal phase_coh : unsigned(31 downto 0);

phase_coh <= std_logic_vector(unsigned(o_count) * unsigned(i_f));

constant C_LUT_DEPTH    : integer := 2**13;
constant C_LUT_BIT      : integer := 14;

type t_lut_sin is array(0 to C_LUT_DEPTH-1) of std_logic_vector(C_LUT_BIT-1 downto 0);
-- generate sine value
function init_lut_sin return t_lut_sin is
  variable v_sin_table    : t_lut_sin:=(others=>(others=>'0'));
  variable v_tstep       : real :=0.0;
  variable v_qsine_sgn   : std_logic_vector(C_LUT_BIT-1 downto 0):=(others=>'0');
  constant c_step          : real := 1.00/real(C_LUT_DEPTH);

  begin
    for index in 0 to C_LUT_DEPTH-1 loop
      v_qsine_sgn := std_logic_vector(to_unsigned(integer(2.0**(C_LUT_BIT-1)*sin(MATH_2_PI*v_tstep)),C_LUT_BIT)); --(sin (2PI/2^n))
      v_sin_table(index)  := v_qsine_sgn;
      v_tstep := v_tstep + c_step;
   end loop;
 return v_sin_table;
 end function init_lut_sin;

constant C_LUT_SIN                 : t_lut_sin := init_lut_sin;
signal r_sync_reset                : std_logic;
signal r_start_phase               : unsigned(31 downto 0);
signal r_fcw                       : unsigned(31 downto 0);
signal r_acc                       : unsigned(31 downto 0);
signal lut_addr                    : std_logic_vector(12 downto 0);
signal lut_value                   : std_logic_vector(13 downto 0);

p_ram : process(isl_clk)
begin
  if(rising_edge(isl_clk)) then
    lut_addr   <= std_logic_vector(r_acc(31 downto 19));
    lut_value  <= C_LUT_SIN(to_integer(unsigned(lut_addr)));
  end if;
end process p_ram;

p_sine : process(isl_clk,isl_rstb)
begin
  if(isl_rstb='0') then
    oslv14_sine     <= (others=>'0');
  elsif(rising_edge(isl_clk)) then
    oslv14_sine     <= lut_value;
  end if;
end process p_sine;

end rtl;

The errors are:

[Synth 8-1031] o_count is not declared (line 42)
[Synth 8-2715] syntax error near signal [line 44]
[Synth 8-2715] syntax error near := [line44]
[Synth 8-2715] syntax error near ; [line44]
[Synth 8-2715] syntax error near constant [line48]
[Synth 8-2715] syntax error near := [line48]
[Synth 8-2715] syntax error near := [line49]
[Synth 8-2715] syntax error near ) [line51]
[Synth 8-1014] phase_coh is not a signal [line:46]


texts:
I need to amplify a 5 to 50 mV signal to 0.3 to 2 Volts over 20hz to 40k. Or at least that's the range I'm concerned with. What about an op-amp spec tells me if it can do this? Can you please provide an example of a suitable and unsuitable spec sheet
What are the equations used to calculate my needed gain?


texts: Feedback on Schematic Design (Fully Annotated, Following Design Guidelines; with Purpose Statement and Datasheets)

texts:
Thank you for readings this. I've tried to make this post as complete and as adherent to the schematic design guideline (Rules and guidelines for drawing good schematics) as possible. I'd really appreciate any input on the schematic design (issues, optimizations, etc.). Please let me know if I need to change anything about the post to make it better—in any sense.

The goal of this design:
To create the hardware necessary for a rat behavioral chamber. This  chamber will be used for rat behavioral experimentation.

Broad ideas:
The behavioral chamber itself has one large, main chamber, out which individual rats have access to three proximally placed 'mini' chambers. The two chambers 'sandwiching' the middle chamber have a water delivery system (for giving rewards). All chambers have 'guiding' LEDs which, ideally through enough training, communicate with rat which series of actions it needs to take in order to get rewarded. The rat is considered to have entered, or 'poked' into a chamber if it crosses an IR 'barrier' that's setup at the entrance of each chamber. If a reward is issued—meaning that the rat is ready to be given a certain quantity of water—the rat needs to somehow touch the water-dispensing tubing before the reward is delivered.

General ideas regarding the schematic (in case you’d find these useful):
For naming components, I’ve used a ‘_’ when a name has a natural space in it, and a ‘-‘ to separate related words. Additionally, I’ve zero-indexed all counting.

Components:
The following components are used in this design. I’ve included each item’s datasheet (or document page, if a datasheet was exceptionally hard to find). Additionally, all components are through hole, and all capacitors are multilayer ceramic capacitors. For the sake of brevity, I’ve excluded data sheets for through hole resistors and diodes, as well as for other "common" components (due to my link-posting restrictions).

Arduino Mega

Voltage Regulator, model L7805CV
Datasheet: https://cdn-shop.adafruit.com/product-files/2164/L7805CV.pdf

16x2 Character LCD Display:
Datasheet for the LCD Display: https://cdn-shop.adafruit.com/product-files/181/p181.pdf
Datasheet for the I2C IC: https://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf

Rotary Encoder:
Datasheet: https://www.handsontec.com/dataspecs/module/Rotary%20Encoder.pdf

MicroSD Card Breakout:
Product page: https://www.adafruit.com/product/254

Adafruit 12-Key Capacitive Touch Sensor Breakout:
Touch IC datasheet: https://cdn-shop.adafruit.com/datasheets/MPR121.pdf

Electromechanical Relay, model EC2-3NU:
Datasheet: https://content.kemet.com/datasheets/KEM_R7002_EC2_EE2.pdf

Contactless Solenoid Valve:
Product Page: https://www.mcmaster.com/5431t111

IR Receiver, model TSOP 38238:
Datasheet: https://cdn-shop.adafruit.com/datasheets/tsop382.pdf

IR Emitting LED:
Datasheet: https://cdn-shop.adafruit.com/datasheets/IR333_A_datasheet.pdf

RGB LED, Common Anode model:
Datasheet: https://cdn-shop.adafruit.com/datasheets/FD-5WSRGB-A.pdf

Schematic:


texts:
I'm wiring 5V from a power supply directly to a micro USB cable. I'm only using the +5V and GND connectors, and leaving Data+ and Data-. While I only plan to use the cable for power, do I need to do anything with that D+ and D- cables, or can I leave them disconnected from both ends?

UPDATE I should clarify that the USB cable is connected to a Raspberry Pi, not a basic circuit.


texts: How do I select the MOV for a multiple operating voltages. Consider the diagram below, when switch is in position 2-1 and 5-4 (both primary winding are connected in series), I can apply an input voltage up to 230V and when switch is in position 2-3 and 5-6 (both primary winding are connected in parallel) then I can apply up to 115V at the input. How can I select the MOV voltage rating and how do I connect the MOV in this circuit? Can I just connect MOV with working voltage of 115V parallel to each primary winding?


texts:
I was studying the "SG3525" IC and its functions, and I encountered this issue:

In the "Error Amplifier" section of the Datasheet, there is a parameter that named "DC trans-conductance" which it is "1.5mS" typically. At the bottom of the page it is mentioned that this parameter is related to the DC open loop voltage gain( Av = gm * RL ).

But on next page there is a diagram related to open loop gain vs frequency.
at this diagram, the value of the open loop gain at frequency closed to dc is not equal to the relation in the end of previous page ( Av = gm * RL ).

Is this diagram relevant to that DC-gain-relationship? ( Av = gm * RL )
If yes, then why are they not equal?


texts: How to smooth fluctuating DC from transformer?

texts:
For an audio amplifier, I designed an AC to DC (220v to 12V 2A) power circuit like this:

simulate this circuit – Schematic created using CircuitLab
When I powered my amplifier with the circuit above, it gave a noise which sounded like a 50Hz non-filtered DC noise. That is the reason I am having to power my amplifier using a 12 Volt battery.
What mistake did I make there in the circuit above resulting in unsmoothed DC output?
Note:
I did not use any bridge rectifier ICs.  I used 4 diodes for rectification.


texts: HP8116A Function Generator Signal Problem

texts:
I'm trying to use a function generator HP 8116A and an oscilloscope Tektronix TDS210. When i connect the probe to trigger output of function generator, i can observe  the square wave correctly.

However, if i use normal output of the function generator and send a signal of 5V and 10kHz (sinusoidal, square..) i observe this bad signal on oscilloscope display which i showed below. If you share your idea about this problem, i will be very happy.

Trigger Output (No Problem):

Sinusoidal Signal (With Problem):


texts: Best way to hand solder pads with castelations to wires

texts:
I have ordered a cheap XS3868 A2DP Bluetooth model, and don't know what is the best way to solder its joints to a thin wire such as AWG 30 or similar. For reference, here is a picture of the joints:

I do have a hot air gun, a soldering station with regular soldering iron, flux and soldering paste, but not a rework station. Since it seems that this design is intended for stacking it on top of another PCB, I can't figure out what would be best practice in the case where I just want to robustly solder a wire to it.

Also, since the joints are so close to each other, I have managed to ruin couple of similar boards by shorting connections and by over-heating the joints.

As a side note, it's pretty frustrating that most of these cheap A2DP Bluetooth models I could find come with this kind of soldering pads. The ones that has the extra header male pins are significantly more expensive.


texts: Why use a multiplexer the select from GND and VCC instead of an Inverter?

texts:
I have created a VHDL module that generates a one-bit wide pattern of "1010101010..." continuously, as long as an input signal called "start" is asserted high. This is the elaborated circuit design produced by Xilinx Vivado v2014.4 (64-bit, Linux):

The Question

What is the purpose of the "next_state_i" multiplexer? It seems like a simple inverter between Q and D would be a simpler design. Is there an advantage to using a multiplexer instead of an inverter?

The Code

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity TASK2_PRE is
    Port ( clock, start : in STD_LOGIC;
           data_out     : out STD_LOGIC);
end TASK2_PRE;

architecture Behavioral of TASK2_PRE is

    signal current_state    : STD_LOGIC := '0';
    signal next_state       : STD_LOGIC := '0';

begin

    -- no need to decode current state - map FFs directly to outputs
    data_out <= current_state;

    -- decode next state
    next_state_decode : process(current_state, start)

    begin

        if (start = '0') then
            next_state <= '0';

        elsif (current_state = '0') then
            next_state <= '1';

        else
            next_state <= '0';

        end if;

    end process next_state_decode;

    -- update current state
    update : process(clock)
    begin

        if (clock'event AND clock = '1') then
            current_state <= next_state;
        end if;
    end process update;

end Behavioral;

Note: I know the state-machine approach is a bit heavy-handed just to generate this pattern, but implementing this behavior as a FSM was a requirement of this project for a class.


texts: Is it safer to use a power supply that isn't high amps?

texts:
I have heard about batteries going into flames when left charging too long. And no doubt that can happen with a power supply that supplies just enough amps.

Is it possible for a battery to be badly designed such that it uses more amps than it needs? So, a power supply that can provide 2A to a device that needs 300mA, and the device mistakenly 'requests' all the amps it can get, and it gets all 2A.  Or worse, the power supply can give 10A and it gets all that.  And could it then ever go into flames from that? Is that possible?

So, if somebody has a cheap device like a cheap toy with a cheap battery in it, and they charge it from the mains..and the power supply can provide more amps than the thing needs. Are they more at risk if the toy or battery within the toy fails?

And if a supply can provide lots of amps like 10A, and a device only needs 1A, and there's a fault with the supply, is there more risk from a faulty supply rated at 10A?

Added-
Assuming a good power supply, i.e. not faulty. And supplying a cheap faulty device.
If the cheap device 'requests' more amps.. Could that happen? How likely is it?
And in the event that it does, then would a good 1A supply be safer than a good 10A supply?
Since, at least with the good 1A supply, the fuse would prevent 10A being supplied.


texts: Speaker wire is thick so why are the wires that go from a stereo plug to earbuds so thin? They seem unnecessarily thin. Is this so they break easier and then I need to buy another pair of headphones?


texts: Does narrow-band communication have any advantage over wide band communication?

texts: Generally more information can be transmitted if the bandwidth of the signal is higher, but is there any advantage of keeping the bandwidth as low as possible?


texts: alternative configuration for an overheating resistor

texts:
Background:
In doing some experimenting with low-voltage home lighting, I have an
application that requires a resistor (or else LED lights become damaged) and I have also, through trial-and-error, discovered the correct resistance to use in this application.

Everything works - except - the single resistor I am using is overheating.

I know how to use a multimeter, so I can measure the resistances involved, but I bought these resistors in bulk, so I have no idea of the specific stats of what power level they are rated for, etc.

I have some very basic-level understanding of electronics, and a theory on how to avoid this problem so that I can use my setup safely.

Question:
Would it be a viable strategy to replace my single resistor with multiple resistors connected in series, where the sum of the resistances add up to the value of the original resistor?

If I am understanding this correctly, even though the current (which in my head I imagine as number of electrons per second) flowing would be the same, the fact that there is a lower "voltage drop" across each individual resistor would reduce the power dissipation across each resistor, and result in less heat being produced?

Thanks for your answers and I will be happy make edits to my question to put it in the form where it can be more helpful to others in the future.


texts: Schematic Critique - USB CDC External Data Processor

texts:
[Can Skip] The Context
I was usually working with already-built boards and designing PCBs for simple operations like connecting wires, controlling AC using TRIAC SSR etc. However I've never developed a board with MCU onboard, so I'd like to ask if I'm doing anything wrong (except I think that with my skill everything is wrong)...
About The Device
The device itself is an PC peripheral. It's principle of operation is to get data from PC using HID/CDC, process the data using STM32 MCU (later MCU) and return data to PC. Sometimes during processing it needs to store some data on external FLASH memory (that data is 258-byte sized structure consisting of 256B array and two one-byte variables).
This revision is an proof of concept and minimum viable product for investment showcase. If it will work as intended, then I will probably switch to USB HS through ULPI.
Power consumption during FLASH write operation never exceeded 20mA on breadboard, however I was using UART to communicate with STM32 G031 (Nucleo32 Board).
About the Component Picking
For power supply I have choosen 200mA fuse and XC6206P332MR power regulator. Voltage should not exceed 5.5V on the PC USB. As it uses USB port, then reverse voltage protection has been ignored. To meet USB specification I've added USBLC6-2SC6 (recommended by manufacturer) as ESD protection.
Then power goes to MCU - STM32L432KBU6. This one has been choosen, because it does not require external crystal to work with USB, which both decreases price of PCB, space used and EMI compatibility. I will use USB SOF to sync clocks.
For the FLASH I think I should go with my favourite W25QXX or W25NXX from Winbond (often used it with Arduino or Pill Boards and never had a problem with it).
32 Mbit should be enough, but possibly it will require 64Mbit of FLASH. WSON Package has been selected, because both W25QXX and W25NXX have same pinout, so it will require only firmware upgrade to upgrade device from NOR to NAND.
All polarized capacitors are tantalum ones (16V). Non-polarized are ceramic 50V. Tolerance for all capacitors are 10%, for resistors 5%.
I know that I could remove C7 debouncer from NRST, but it's useful to have it to prevent multiple resets.
All passive components are 0603 (except fuse, which is 1206), soldered using paste.
Some PCB design rules are written black by side of schematic section. USB traces length will differ by up to 5mil. SPI trace length will differ by up to 3mil.
Schematic

Update1
a) Replaced Tantalum Caps with Ceramic (10V+, 10%)
b) Added pull-X resistors for W25XXX SPI FLASH, those are useless (never used ones and never had a single problem with this chip using breakouts)
c) Added decoupler for SPI FLASH
d) Rotated BOOT0 to make ground point downwards
e) Added some more "testing" decouplers for MCU
f) Test points will be added during PCB design (for me it's easier to manage them later)


texts:
Basically, I'm tasked to study the electrical properties of different screws (all in an unspecified titanium alloy, some fully anodized, others only the head) based on previous measurements that estimated the resistance around 0.15 Ohm for the one shown below.

I wanted to try a few different methods the see what was the resistance in DC, before moving on AC where i will study the impedance in function of frequency.
In DC, the way I was considering doing the measurements is linked below.

I've tried different configurations. I'm not using crocodile clip, because the wires have a higher impedance, and they don't stay put. So, I'm using twisted wires and "pinch grips".

The results are more stable (around 235 mOhms) than my first try with a 2 point measurement, there is no more significant wild fluctuation. However, I get very similar resistance value for configuration 1 and 2. Why is that? Also, when I try to include the head of the screw in the measurement, the values get really weird. Is it because it is anodized, or am I just doing something wrong?

I know the way I'm doing things is not optimal, so what could I improve, or which method should I use in order to obtain precise measurements?

Thank you for helping me !

the link: https://imgur.com/a/iNeKQH8


texts: Handling interrupts during device communication

texts:
I have the following situation:
I was given a AVR32UC3 (pretty neat thing) and a measurement device. These two communicate via SPI, which works as expected (after fiddling with SPI params and so on).

The program structure is as follows:

Init the device via SPI
Start the measurement via SPI
Wait for the measurement to be done (this is signaled via a GPIO --> Interrupt)
Read the measurement data via SPI
Go to 2

At this very moment, I can roughly guess how long the measurement will take (~3ms). I currently ignore the interrupt, do busy waiting instead of 3, then read the data.

Now for my question: I would like to get rid of that "busy" waiting. Of course, if another interrupt arrives (from some other peripheral) the code will execute that interrupt anyway but code in my main loop will not be processed during the busy waiting. How would I do this "clean" using the interrupt itself.

The idea would be:

Setup interrupt source + conditions
Start the measurement
Interrupt occurs
Pick up where I left

How does the source code (pseudo-code) for something like this look? How is this done PROPERLY?


texts: Altium 17: Smart Grid Insert: Parameters

texts:
When generating schematic symbols with large pin numbers (like µCs), we use an excel sheet to generate the Pins via smart grid insert.

The problem is that though the column identifiers match in the "grid insert" menu, after confirmation, when the new pins show up in the editor, neither Pin length, font nor the custom parameters are applied.
Only Pin name, designator and the positioning coordinates are correct.

In the Default primitives everything is set up correctly for a new pin.

What could cause that problem?


texts: TTL IC logic high output doesn't reach high enough voltage

texts:
I've been having a problem trying to build a breadboard circuit.

The problem being, that some IC high outputs doesn't reach a high enough voltage, staying around ~2V. That is not sufficient for a clear high signal, and indeed the logic gates that receive such a signal end up not working correctly.

Here is a pic of my wiring (in the pic there are some disconnected input pins, but the problem persists even when they are all connected):

The IC in question is the 74LS173, a 4-bit tri-state register. Link for its datasheet.

I feel like I must be missing something pretty simple, but I can't for the life of me find out what is it.

In any case, thanks in advance for the patience and for taking the time to help!


texts: Replacing analog potentiometer with digipot for DC motor speed control

texts:
I have a device with a beefcake DC motor controller like this one: https://www.bodine-electric.com/products/dc-controls/filtered-pwm-dc-basic-speed-control-open-chassis/0780/
The speed is controlled with a 10k ohm pot. The spec sheet says 0-5V referenced to chassis common or 10k ohm pot. Strangely, I measured 7.5V across the pot terminals, so this might not be the correct sheet.
I'd like to replace the pot with something I can control from an Arduino. I've done a little research and found out about the wonderful world of digipots like https://www.microchip.com/wwwproducts/en/MCP41HV31 or http://www.farnell.com/datasheets/686036.pdf
What considerations do I need to swap in a digipot in place of the current pot? What kind of isolation do I need between the computer/arduino and the motor controller? The controller is mains powered.


texts: Why a potential divider at high speed LVDS clock outputs?

texts:
I recently came across a Xilinx SOC design in which the system clock which is configurable up to sub GHz,  being an LVDS clock the output is been divided using a 1.2V rail, as shown below.

Will this bring more integrity in the clock,  or improve the noise figures, or improve the slew rate?

The same is not observed in the design in case of clocks used for much higher frequency demands.

The part used for clock generation(U42) is a SI570, which is a popular low ppm, high quality clock source for FPGAs.


texts: In order to define the transfer function of an EMI filter, I want  to know if I need to define the equivalent circuit in CM and in DM to calculate the total transfer function of the  filter below:


texts: How to evaluate equivalent insulation resistance of two cables?

texts: My guess was that the equivalent insulation resistance of two cables in parallel is same as the equivalent resistance of two resistances in parallel. But instead it is the sum of the two insulation resistances. What is the logic behind this?


texts: Why my circuit simulation is overly slow? Is there a way to solve this problem?

texts:
I'm doing a project in a working for my a subject in my university. It is a remote controller, and I know much probably there's a better way to do it, but I only can use this component:
voltage switch, capacitor, inductor, current source controlled by  voltage, transistor, resistor,in other words, basic components.
I Don't know how to solve it and what's the problem source, could someone help me???

the project is in the link bellow:
https://drive.google.com/drive/folders/13TGclP42EtCFSKa6jZXm2S6t2ftZs7oC?usp=sharing


texts:
What is that? No HD-SDI signal.
Black magic camera motherboard


texts: Ceramic resonator changes and maintains frequency when touched

texts:
I'm experiencing a weird phenomenon with a ceramic resonator test circuit, where the frequency of its output can be changed by touching the circuit with my finger. The circuit would maintain this higher frequency oscillation indefinitely as long as I don't disturb it again by touching or cycling power. It always starts up to the correct frequency on power up however.
This is what the output looks like on the scope. Note that both wave forms are stable even if left running for hours.
The resonator is a Kyocera KBR-480Y, specified to resonate at 480 kHz. I'm using two gates of a CD4011BE quad NAND chip as inverters to drive the circuit. Here is a hand drawn schematic:
Circled in red is the portion of the circuit that is susceptible to touch. It's around the leads of the resonator, including the feedback resistors and loading capacitors.

Here is what the circuit looks like from the top. The small surface mount device is a ripple counter, which should have no effect on this situation.
My questions are:

How does this happen? What mechanism causes this to happen? I vaguely understand that there are multiple modes of resonance in crystal and ceramic resonators, but I'm not sure why touching it would create this effect.
Would it be feasible to utilize/exploit this property intentionally in designs? Could there be a reliable way to induce this effect to generate a higher frequency signal from a resonator that is rated lower?
I guess related to the second question, how would one go about suppressing this behavior? Having this happen on a production board would not be good.

Thank you for taking a look at this and apologies in advance for my lack of knowledge and experience.
Additional information - here is what the signal looks like on both legs of the resonator. The purple one is connected to the input of the first inverter, and the yellow one is the leg connected to the output of the gate. Both probes are Siglent PP215 set to 10x attenuation, if that matters.


texts: Purpose of the Schmitt trigger in this midi circuit

texts:
I came across an instructable about using midi with a raspberry pi and I was a bit confused about the first circuit from step 2. What are those Schmitt triggers for and are they really necessary?

.

According to this post, they are meant as a buffer for when microcontrollers couldn't sink 5mA. Seems logical but according to this post, the raspberry pi should be able to handle up to 16mA per pin (with some configuration).

So does this circuit really need that buffer?


texts: PICkit 3 requires device erase in IPE before programming in MPLAB-X

texts:
I'm seeing a new behavior of my PICkit 3 that I did not have before. I hope someone can point me to a direction, it seems that I either messed with some MPLAB-X configurations, or my PICkit 3 is simply broken.

Device: PIC24FV16KM204
MPLAB-X: 1.90

During firmware development I usually could just program my device at any time after I made some changes to the firmware. I could also debug my project at any time. Now the PICkit 3 always returns the error message "Failed to program device" when the device is not empty. So after each Firmware change, I'm currently closing MPLAB-X, starting the IPE, erasing the device and finally restarting MPLAB-X. Then I can successfully program the controller without error message.

What I have checked so far:

The project properties / Config PICkit3 / Program Options have a default setting for erasing everything before a new programming.
My configuration bits in the firmware disable the write protections (FBS and FGS)

This is the output of the PICkit 3:

Connecting to MPLAB PICkit 3...
Firmware Suite Version.....01.29.08
Firmware type..............dsPIC33F/24F/24H

Target detected
Device ID Revision = 0

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0xbff
configuration memory

Programming...
Calibration memory
Address: 0 Expected Value: 0 Received Value: 0
Failed to program device

Any hints are greatly appreciated. Regards,


texts:
I'm trying to scope out what frequencies different common analog signals are. The DPScope design specs provides a list of common lower (sub 1 MHz) frequencies (copied below).

audio (20 kHz)
infrared remote control signals (38 kHz)
ultrasound (200 kHz)
servo signals (a few kHz)
bio signals, medical instruments (< 100 Hz)
I2C (1 MHz)
RS-232 (115 kHz)
one-wire
SPI (as long as <= 1 MHz)

However, some of those listed are used for transferring digital data (for example, RS-232).

Now my questions:

Under what situations would it be necessary to have a bandwidth capable of measuring these digital lines as analog signals?

What important analog signals (or digital signals that should be tested as an analog signal) have higher frequencies than those listed above?


texts: Simple 12V preamp circuit before speaker

texts:
In my apartment building, we have an intercom system with one central unit and multiple terminals, one per apartment. Unfortunately, after some unknown tweaks done a couple of years ago to the central unit, the volume of the ringer (when someone is calling from the central unit on the ground floor, to request access) is not even a quarter of what it used to be. We were told that that's how it is, nothing can be done; we can't touch the central unit (administrative reasons). All that's left is tweaking the terminals themselves.

The terminal's diagram is as follows:

Signal comes from COMP, at 12V, be it the ringer or the voice transmission. The Volum (volume) is set on HI, so there are no parts between COMP and SP (speaker), the sound is heard as it comes.

Most of it is a nice circuit board, that I don't want to touch. The only part that I'm willing to try my hand at is between Dif1 & Dif2 and the SP. That's where I want to add a nice simple 12V pre-amp circuit. Problem is I never actually done one. In my mind, it's something as simple as:

INPUT would be Dif1 and Dif2 from the first diagram (intercom terminal), OUTPUT would be the wires leading to the speaker (SP).

One config. I found for this diagram, at 12V, is:

R1 = 2.2 MΩ
R2 = 4.7 KΩ
C1, C2 = 10 µF, 10V
T1 = BC148B
12V, in my case, will come from a 12V battery.

Questions:

How are the values for the capacitors and resistors calculated ?
Is it possible to make it even simpler ?
If I want to add a potentiometer, where would it be located ?

Thank you for taking your time to read this :)


texts: How can I calculate the voltage over a microphone?

texts:
I want to make a microphone myself with the Arduino (capsule=microphone):

I have bought the following as  microphone:

As is in the datasheet the microphone operating voltage is between 1.5 and 10 volts. The problem is how do I calculate what resistor do I use to get that voltage? I can't use it as a voltage divider (the resistor with the microphone) right?

P.S. I have resistors laying around between 10 \$ \Omega \$ until 10 M\$ \Omega \$ so that won't be a problem.


texts: Initialising FPGA internal RAM from file

texts:
I have a design that relies heavily on internal dual port RAM found in the FPGA and I want to take advantage of the fact that blockram can have power-on initial values to populate all this memory with random data. How I plan to do this is to make a named pipe through a pre-synthesis TCL script, pump random data into it and have it read by a VHDL function. I've seen similar things done, only with text files.

My question is, doing it this way, will all instances of the blockram module be filled with the same pseudo-random data, or will each be synthesised "separatedly" somehow, ending up with different pseudo-random data, which is what I'm after?

The tools are Vivado 2015.4 and the part is Zynq-7000 (7-series Xillinx FPGA), by the way

EDIT/clarification:

I've seen people reading block ram initial content from a text file in VHDL and the result is synthesisable. I want to do something similar, but rather than a plain text file, I'm thinking of using a named pipe with the write end connected to a bash script to generate random initial blockram content in the bitstream. However, I'm not sure exactly what the synthesis tool does with the block ram module: is each instance of the same VHDL design file synthesised in one pass, making the RAM content of all repeated instances identical, or are they treated separately, thus populating them with different random data?


texts: Measure LiPo Battery Cells with Voltage Divider?

texts:
First, I am new in this topic, so please excuse unnecessary questions.

I want to measure the (four) cells of my lipo battery. The connector of the battery has a plus pole and four minus poles. (Image)

Now I want to measure the cells with the Raspberry Pi, which max. voltage is 3.3 Volt. I use the ADS1115 to add analog pins to the RPi (works well).

So I drawn a schematic for a voltage divider to bring the max. 16.8V to 3.3V (works well)

Now my problem:

How I make the schematic bigger, because if I connect every battery minus to ground I am not able to measure the difference.

I want a different measurement for every cell.

EDIT:

Solution [by Elliot Alderson]:


texts: How do Tx / Rx cable pairs work in an Ethernet cable?

texts:
This question will be a simplification as I lack the proper knowledge.

Lets suppose we want to send a signal over the network. We will use this scheme as this is hopefully how the signals are send over the network:

Providing the above is 'roughly' how a signal transmission works, how would a circuit scheme look like for an Ethernet 100TX network cable? (the cable uses wires 1,2,3 and 6 to transfer data, 1,2 pair for Tx (transmission) and 3,6 for Rx (receive).

By asking this question I want to understand, whether both Tx wires (1,2 wires) are used to transfer data simultaneously or maybe, I always have to have two wires to actually transfer a signal over a network. If the former is true, why do I always need two cables?

Ok, the "ground wire" concept. After reading your comment for the first time, I've thought that you measure the voltage between wire1 and wire1 (made no sense) or between wire1-wire2 (you can measure only one time, so how come 2 signals). After reading the comment for the second time, I realized there can be 'a third' cable in the system. And both PC1 and PC2 can have their own 'ground cables'. The drawing:

//edit:

PC2 has its own 'ground' cable
PC1 and PC2 cables are separate (not connected)
on the picture, I'm sending 1111111... on the first wire and 0000000... on the second wire simultaneously. Also, notice that the time is passing by and there is no 'clock' signal in the circuit. The clock signal that tells, when one signal ends and where another signal begins.


texts: Op amp voltage reference with emitter follower

texts:
The purpose of this circuit (taken from the Minimoog) is to provide a stable -5V across the 100R load resistor, as accurate as the -10V supply and the ratio of the 5K resistors in the potential divider, and capable of sinking tens of mA.  As I understand it, the transistor is configured as an emitter follower, and negative feedback around the op-amp ensures that the remotely sensed load voltage matches the reference voltage.

simulate this circuit – Schematic created using CircuitLab

I think the circuit would continue to work if either or both of the 4.7k resistors shown were replaced by wires.  Why were they included, and what effect do they have on the performance of the circuit?

For R5, I would suggest that it helps to match the offset voltage [caused by the op-amp's input bias current] at the two inputs of the op-amp, but I'm puzzled because the potential divider has a Thevenin equivalent circuit that is -5V in series with 2.5k, so a better value for R5 would be (say) 2.2k.


texts: Can someone tell me how i make the MACH3 software to communicate with this board?

texts:
I have a project to do in which I will need to use this board to move one of the axis of a machine.
But I can't find the datasheet for that board.
It serial number appears to be HW-3561224.
Besides, when I connect this card to the computer via USB, it does not make a sound indicating that it has found a device. There are no new drivers found. I've tested in a notebook with Windows 10, and another with Windows 7.
Can anyone help me with any relevant information about it?
Thanks in advanced.


texts: Like, this example didn't consider VCE in the equation at all. Why is that?


texts: Wiring a single phase electric motor with a run and start capacitor

texts:
I have a single phase electric motor provided with the following wiring diagram. The wiring diagram unfortunately omits the active line and neutral connection details. I've had a look at several other wiring diagrams and videos, but they seem to contradict each other. Has anyone has experience with these and would be able to explain where to connect the AC inputs?
(Cap line denotes capacitor line)
English translation:

Original diagram:

Motor inside:


texts: What is the purpose of the upper inductor in this speaker diagram?

texts:
What is the upper inductor symbol in series with the woofer used for in the below diagram?

It seems the tweeter and the woofer are both I guess 8 Ohm and that's why the 4 Ohm parallel equivalent resistor is shown(?)

The CL high-pass filter for the tweeter is obvious. But I couldn't figure out the the purpose of the inductor in series with the woofer.


texts:
I have the following circuit with a 10k 0.5w trim potentiometer.

simulate this circuit – Schematic created using CircuitLab

The voltage after the bridge rectifier is maintained at ~8.6 Vdc. The voltage is fine when I do not fully turn the pot to 270°. At 270° turn suddenly the voltage begins to fluctuate wildly between ~2 - ~5 V as shown by the picture below.

What is causing this effect? Is this an issue with the pot, capacitors, etc?


texts:
I'm having problems getting my communication code to work. I enter the data 1, 0, 255, 50 and then it errors (shouldn't it wait until 8 bits have been sent?)   it exits with my debug message of BadPacket and StartPacket, and then prints the number 49, indicating that it thought the first packet was 49. What's going on here?

This is what I am using:

const uint8_t kACKBit = 6;
const uint8_t kNACKBit = 25;
const uint8_t kStartBit = 1;

void setup()
{
    Serial.begin(115200);

}

void loop()
{
   if(Serial.available() >= 8)
   {
     readData();
   }

}

void badPacket()
{
    //flush the buffer and send a request to resend the data
    Serial.flush();
        Serial.println("Bad Packet");
    Serial.print(kNACKBit);

}
void goodPacket()
{
    //Packet good - send an acknowledgement
        Serial.println("Good Packet");
    Serial.print(kACKBit);
}

void readData()
{
        uint8_t startPacket = 10;
        startPacket = Serial.read();
        if (startPacket != kStartBit)
    {
        badPacket();
                Serial.println("StartPacket");
                Serial.println(startPacket, DEC);
        return;
    }

    //check that the address is valid
    uint8_t address = Serial.read();
    if(address >= 6)
    {
        badPacket();
                Serial.println("address");
        return;
    }

    //read in the RGB values
    uint8_t r = Serial.read();
    uint8_t g = Serial.read();
    uint8_t b = Serial.read();

    //read in the duration
    uint8_t high_byte = Serial.read();
    uint8_t low_byte = Serial.read();

    //combine the two values into a single int
    uint16_t duration = (high_byte << 8) + low_byte;

    //check that it ends in a null teminator
    if(Serial.read() != 0)
    {
        badPacket();
                Serial.println("nullterm");
        return;
    }

    //confirmed packet - send ack signal
    goodPacket();
    return;
}


texts: FPGA with low pin count (and therefore smaller and hopefully cheaper)

texts:
Are there any FPGAs with a low pin-count (8 to 16) and small package and hopefully cheap (nearly as cheap as a micro)?

It seems that FPGAs are typically intended for massively parallel & fast applications but with high-speed serial links, the pin count and large package size isn't required. PICs and other small micros are typically used for small/cheap logic controllers - and we're currently using a small cheap ARM Cortex STM32 for that purpose - but next I'll need something much faster.

I found a similar question here and the answer was no. If the answer really is no, I wonder why not?


texts: Burnt MOSFET in the following circuit. Why?

texts:
I made the following circuit. As the test load I used 10cm of a standard 12V LED strip to be sure I don't sink too much current.

Used 5V from uC to drive the circuit, toggling it on and off every second. It seemed to work properly but after literally a dozen of cycles M1 exploded loudly with a flame, permanently shorting its' drain and source.

What was wrong? According to datasheet, M1 can withstand over 2A of continuous current. Any ideas why it failed?

simulate this circuit – Schematic created using CircuitLab

EDIT:
D1 is a red diode which turns on whenever the main load is under power (theoretically). I'd like to keep it within this circuit but can also move it away to another pin and toggle by software.


texts: Problem programming ATTiny85 "Invalid device signature."

texts:
I am trying to program ATTin85 using Arduino
I used the hardware support file from "High-Low Tech"
here http://hlt.media.mit.edu/?p=1695

With this schematic:

After downloading the ArduinoISP sketch to the board, I tried uploading the blink sketch and tried burning the bootloader.

The IDE keeps responding with :

avrdude.exe: please define PAGEL and BS2 signals in the configuration file for part ATtiny85avrdude.exe: Yikes!  Invalid device signature.
Double check connections and try again, or use -F to override this check.

I also tried to using avrdude from CMD

avrdude -P COM5 -b 19200 -c avrisp -p t85 -v -e -U flash:w:sketch.cpp.hex

and it gave:

avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
     Double check connections and try again, or use -F to override
     this check.

avrdude done.  Thank you.

I tried choosing the three settings 1Mhz/8Mhz/20Mhz (without adding any oscillators)
and tried the three options with a 16Mhz crystal with two 22pF capacitors (I read somewhere online that this may work)
and still nothing changed!

I tried another ATTiny85 Chip, another Arduino Uno, and tested the continuity every single wire. but still I am getting the same error.


texts: Where to have PCB with microcontoller designed?

texts:
I’m involved in CNC milling/manufacturing/prototyping, a product we are designing needs an electrical interface that controls timing and dwell on 2 solenoids. This is something well outside of our skills and knowledge to accomplish on our own.

We’ve been looking into the world of electrical engineering for options to have a circuit board designed, with no luck. It seems all the places we are finding are prototyping services for PCB, but need existing circuit designs to complete the work.

What type of firm or engineer should we be seeking that can design the circuitry and programming?
(Sample design parameters below)

Control solenoids in a paintball gun, where the board will have a microswitch to register a trigger pull.
End user adjustable solenoid dwell time, fire control selection (semi/auto/ect)
LCD/OLED display to view setting parameters like: rate of fire, dwell, fire mode

Any help that points us in the right direction would be appreciated.

Edit: Following up from the answers below and contacting several engineering firms unable to design microcontroller circuitry/programming, they referred us towards the correct industry.

What we should’ve been looking for was, Application Specific Integrated Circuit (ASIC) design and solutions. Once we used the correct term “ASIC” thousands of providers now show up in our searches.


texts: Potentiometer for two 12V/1.1A fans in parallel

texts:
I recently bought a potentiometer to regulate the speed of two 12V/1.1A DC fans in parallel, powered by a 12V source. Its specifications are the following:
Resistance= 10k Ohm, MaxPower = 0.2W.
Can I connect the fans, the potentiometer and the power source in series, or do I need additional circuitry to avoid circuit damage? I feel like the potentiometer's maximum power is too low, but I may be wrong.


texts:
i dont know much about electronics.. ive got a set of active speakers set up, but currently have no way to switch them on/off easily without going around to each one and flicking the switch.. so i want to wire up a nice little box that connects to the mains, and then to each speaker. i've got this switch

rated at 16a 250v

basically i need to know if this switch is suitable, its not going to do any crazy overload spike that will damage my equipment.. and also, that it will be ok for the earth and cold wires to be connected to the device 24/7 as this will only break the hot wire.. thanks in advance for any help!


texts:
I have some trouble with understanding the following IC and its SSC interface:

https://www.infineon.com/dgdl/Infineon-TLE5012B_Exxxx-DS-v02_01-EN.pdf?fileId=db3a304334fac4c601350f31c43c433f

It is stated in the datasheet, that the SSC interface is SPI compatible, exactly what I need. Now first of all, how should I connect this SSC interface to an SPI interface? Can I do it as follows:

SSC -> SPI

CSQ -> SS

SCK -> SCK

DATA -> MOSI/MISO shorted together

Second, I'm not even sure if I can read out the absolute angular position of this sensor over the SSC interface alone, also I cannot find any list with all the available registers I can read/write to. I think this normally should be included in the datasheet. On the website of Infenion are no more datasheets available, that specifies this SSC registers. Anyone an Idea where this could be hidden?


texts: Replacing sealed Pb battery with car battery

texts:
I found a 2U server UPS by APC, that uses 4 sealed Pb batteries (12V 9Ah, 2 in series, 2 times in paraler, so the pack is 24V).
The batteries are totaly dead (after 8 hours of charging, they roughly give 3V and 2 of them have more rounded shape than a rectangular one.

I would like to use that UPS to power some of my devices, but buying new batteries from APC isn't cheap. However, It's almost quarter a price to buy 2 new car batteries. When connected in series, they also have 24V, but more Ah and propably could provide more amps than the sealed ones, so powering the UPS is no problem and they even should last longer. I tried the UPS on set of old ones and it works fine.

But I'm worried about charging them. If the power goes out, the UPS will run for some time and drain them.
BUT will the UPS be able to charge them again (I expect it would take much longer if so), and if it will, is there any chance that the UPS will damage them during charging? If so, is there any way to prevent it?

I'm on a low budget and I would like the build to be as cheap as possible. I got the UPS from electronics dumpster (the sealed batteries inflated so much they couldn't be removed from the UPS without using very hard force, that's propably why some throwed away fully-working (but about 5 y.o.) 1300$ UPS), and pack of these 4 sealed batteries is 370$ in my country, while 12V 45Ah car battery is like 50$ each.


texts: How to flash ATtiny85 with clock quartz (32khz) again?

texts:
I flashed ATtiny85 once with simple program blinking for 1 second. F_CPU = 32768.
I set low fuse byte to 0xe6 with avrdude. According to datasheet 6 = 0b0110 CKSEL is intended for low frequency quartz oscillator. In my case it is 32khz. Capacitors have 5ns.
LED blinks with expected period, but both programmers usbasp and avrispmkii cannot see the chip anymore. I tried to turn on JP3 on usbasp and was playing with avrdude -B option trying various values from 2 to 1500. Outcome is the same - avrdude prints 0xc9. Meanwhile same model chip is flashable with 10mhz quartz by both programmers (low fuse = 0xef).
I saw somewhere similar post and recommendation was to keep RESET pin low. I didn't get how this would help and what actually I should do. I was connecting RESET with GND.
I have lots of 32khz quartz. I tried to connect several of them in parallel in hope to double frequency ;) and didn't notice anything.
The chip doesn't start with 10mhz quartz.
Is it possible to make adapter for external clock to fool an AVR chip and simulate quartz generator at higher frequency, but compatible with CKSEL 0b0110?
I am not sure about SUT fuses too. There are several options available. Maybe problem is caused by them?
I think I chose correct option (avrdude lfuse gets = 0xef):
0b10 32K (32768) CK 64 ms Stable frequency at start-up


texts:
In the power supply design that I have, I used a NPN transistor to pull constant ~10mA from the linear regulator:

simulate this circuit – Schematic created using CircuitLab

Before the regulator I have a 4700uF capacitor after the bridge rectifier.

When having a circuit that is pulling some current from the main when the power is off, is using a bleeder resistor in parallel with the capacitor necessary?


texts: I have migrated from a 16x2 alpha-numeric display to a 128x64 graphical in existing project. With that in mind, I am planning on using a larger font instead of the "easy" 5x7. How do I integrate TTF font file in C?? How to generate hex for the same?


texts: Can I use two bridge rectifiers to rectify 240 VAC split phase?

texts:
I have a bunch of bridge rectifiers rated at 25 Amps with a maximum input voltage of 140 VAC RMS. They work for fine for rectify the 120 VAC found from the wall in North America.

Is it possible to connect two units together to rectify the 240 VAC supply (really two out of phase 120 VAC supplies) found in North America? I think this means the DC side is going to above or below the neutral leg potential, but that seems inevitable in any case.


texts:
Derating as the Wiki and other Google articles says operating the part at lower values than rated specifications to prolong its life.

Can some please explain "What exactly is Derating?"
How it is related to positive and negative temperature coefficient.
Derating is limited to only resistors and capacitors or it applies to ASICs also.

I know the question which I am putting here is like dots and expecting someone to connect them for meaningful information. But this is the only information I have now.


texts: Lattice Diamond FPGA set false path in lpf file

texts:
For a Lattice FPGA using the Diamond/Synplify Pro tools, I have a clock domain crosser circuit that I'd like to turn off timing analysis for (since it's guaranteed to fail) using *.lpf commands.
I've tried following this guide, specifically example 3 which shows:
BLOCK FROM CELL "myff1*" TO CELL "myff2*"

which always gives me a syntax error (I think it meant to say "BLOCK PATH FROM CELL ...")
So the best I could come up with is:
BLOCK PATH FROM CELL "sigA" to CELL "sigB";

Yet it still performs timing with failures. I've tried putting wildcard * on the front, back and both ends of the signal name, but I'm still not having much luck. It either completes the compilation and fails timing (no wildcard star, or wildcard star on the end), or it never completes the "Export Files" part of the process (wildcard star on the front).
I've verified that "sigA" and "sigB" is how the cell name appears in the "Timing Analysis View"
What is the correct syntax to do this?


texts: What is the best way to step my signal from 5V to 3V3?

texts:
I have some analogue signals between 0 and 5 Volts being fed from a multiplexer into another board that only accepts signals up to 3v3.

What is the best way to step down the voltage?

The signal doesn't need to be very precise (It is going to be used to select one of 32 options depending on which range of values it falls under and will be a fixed value)
and doesn't need to be updated often (User is only likely to change the value two or three times during operation)

I was thinking of just using a 3K3 Ohm x 2K2 Ohm voltage divider with precise tolerances but I wonder if anyone can foresee any problems with this or can recommend a better method?

How should I link my analogue reference? am I going to run into problems if I just use another identical divider to jump the 5V rail down?


texts:
I have a board that I would like to design and there are 11 devices that can only be spoken to via UART. I am restricted to a Microchip uC chip product range and I have found one with 5 UART ports. I have come up with a jumper based solution whereby the user, with making the connection via jumpers to the 5 available ports, can choose 5 of the 11 devices. I have been looking for a chip that will take either UART, SPI or I2C in and give me a few additional UART ports but I have come up short. Can anyone suggest a solution or a product that they may have come across?

It is not critical that all 11 devices are able to connect to the uC (that would be nice) but it is important that these devices are on the board for a modular product. However, I wish to make the product more user-friendly as the jumper based solution is a bit complicated at first glance or so I have been told.

EDIT

Okay sorry, I am not explaining the problem properly. With this method, you limit the user's options. Let say you link port a to device 1 and 2 and port b to device 3 and 4 and so on...

But what if the user would like to use device one and two? Then the product is limiting the user heavily. With 5 port options and 11 choices for devices, the binomial coefficient yields 462 combinations for the user to choose from. That is overkill, I am not looking for that level. But with the jumper based solution port a can connect to 9 of the devices while port b can connect to 7 of the devices, port c  can connect to 8, port d  can connect to 7 and port e  can connect to 9. The number of mux switches needed to do this would be over the limit.

Is there another solution to giving the user the option to use (close to) any combination of the devices?

I have thought about using two uC with 5 UART port each to connect to 10 of the devices and then using a much smaller jumper based solution for the last device, but this solution is too complicated for production and is expensive.

Are there any Chips or concepts out there that will expand the UART control to 11 devices?


texts:
I'm using a USB-UART IC with an MCU, which is powered from a battery.

The USB-UART IC is powered from USB connector, not from the battery, so that I don't need to open up a console every time when the switch goes off and on.

simulate this circuit – Schematic created using CircuitLab

edit: I didn't draw it on the figure but the IC has an internal 3.3V regulator and every VDD is on the 3.3V level when the switch is on.

Now I'm worried about when the USB is plugged and the switch is still off.

The MCU document says that every input pin's maximum rating is VDD + 0.3, which would be 0.3 V when the MCU is not powered.

If the TX/RX pair on the USB-UART side goes high, will it destroy the pins on the MCU side?

If so, What do I need between the TX/RX pairs?


texts:
I have multiple issues with LTspice. Take this trivial example:

XU1 N002 N001 vcc 0 N001 N003 ADA4807
V1 vcc 0 5
V2 N002 0 PULSE(0 1 0 0 0 0.5m 1m) AC 1
R1 N003 vcc 1k
C1 out 0 1p
R2 out N001 1
;tran 2m
.ac dec 1 100 1000Meg
.lib ADI.lib
.backanno
.end

tran works fine:

But ac gives me bogus results - like -47 dB "gain":


texts: Which is the "write enable" pin of flash memory in Stratix IV GX?

texts:
I am trying to use flash memory in Stratix IV GX fpga kit. For that I went through the pin details of the same. But the I was expecting "write enable" which will determine data is to be written to or read from the memory.

Is it the printing mistake of data sheet or is there other signals to do the same function ?


texts: Name of component on output side cable of a DC power adapter?

texts:
What is the name of this component (circled in red) of a charger?

What are the uses of this component?


texts: What condition must be verified by the frequency so that an RC circuit acts as a differentiator?

texts: So I am theoretically planning to make an RC differentiator circuit but I'm still a rookie with it so if someone can help me it would be appreciated.


texts:
I have an audio source input, that I am putting through the circuit below to create a balanced audio signal.

There will be one of these for each channel, left and right.

I have been asked to provide a "balanced or unbalanced switch", so that a user can flip the switch and have either balanced or unbalanced audio out.

But, as far as I can tell, if you want unbalanced audio from this set up, you would just take the audio from pins 1 and 2, and dont connect pin 3. This gives you an unbalanced audio output.

If I added an extra stage to combine the balanced audio to unbalanced, then I would just be converting back to the original input signal.

Or am I missing something here?

Is there some way to add an "balanced or unbalanced switch"?


texts:
When wiring the power cables in a house, normative says wires must be typically 2.5, 4 or 6 mm2 in section for 230 V and 10...40 A.

However, legs of a triac (thyristor, see this one by example) are much smaller, around 0.3 mm2 for a 16 A element. Even smaller will be the conductive layer of the board where triac could be mounted.

Could someone help me to clarify this apparent contradiction?


texts:
I'd like to make myself a cheap soldering / inspection station by taking an acetal plastic slab and mounting a linear rail to it for attaching a USB microscope.  However, I want to first ensure that the slab is either anti-static or conductive enough that grounding it will actually prevent charge buildup.
From wikipedia, it looks like the following properties are the ones I should think about:

Insulative
Insulative materials prevent or limit the flow of electrons across their surface or through their volume. Insulative materials have a
high electrical resistance and are difficult to ground, thus are not
ESD materials. Static charges remain in place on these materials for a
very long time.
Anti-Static
Anti-static materials are generally referred to as any material which inhibits triboelectric charging. This kind of charging is the
buildup of an electric charge by the rubbing or contact with another
material. One type of anti-static packaging material is commonly
referred to as Pink Poly. It is a clear pink (hot pink) polyethylene
that is available as a film for bags, bubble pack, or foam.
Dissipative
Dissipative materials allow the charges to flow to ground more slowly in a more controlled manner than with conductive materials.
Conductive
Conductive materials have a low electrical resistance, thus electrons flow easily across the surface or through these materials.
Charges go to ground or to another conductive object that the material
contacts.

Clearly, I want to avoid the acetal I have if it's insulative.  I assume that to determine if it's anti-static, I need to rub another material against it to see if one or the other becomes charged (uh... hold one of the materials next to my kid's head afterward?  LOL).  For the others, it sounds like I have to sandwich the plate between two metal bars and then measure resistance, or I have to insert probes and pass current through them, while measuring via two other probes.
I read that there is acetal ESD plastic, but I don't want to assume that all acetal is naturally ESD compatible.  It sounds like such a thing isn't likely, as conductive fibers probably need to be added during production.
Does anyone know of any other ways to tell if my plastic is safe as an ESD work surface?


texts: A very basic question about DAC conversion in a sound card

texts:
This is a conceptual question about how a sound card converts digital data to analog.

To illustrate this let's say we have constructed a discrete data which represents a sinusoid with particular number of points per period.

For example, below discrete sinusoid stem plot is composed of 48 points per period of a sine:

Imagine now this digital data is fed to a sound card which has 48kHz sample rate.

Would we hear f = 1/[48 * 1/(48000)] = 1kHz vibration?

Actually I wanted to be sure about this. I want to try this by using a program like Python or MATLAB ect. Do you know how to send such digital data to sound card? Secondly the sine in my question  has range -1 to +1. What is the relation between the volume and this amplitude for a 24 bit soundcard?


texts: What is the problem with charging a (lead-acid) car battery with AC power?

texts: The closest thread I've found (which didn't show up in the automated suggestions) was What happens if an AC voltage is applied to a battery?.  Unfortunately, I felt like the answers were more aimed at the device and schematic drawing instead of a directed explanation of why AC cannot be used to recharge a DC battery. I have a vague understanding of why AC cannot be used in electronics (something about the cycling between voltages would not fit the either "0" or "1" needs of a dc circuit) and I wouldn't expect you to try to teach me a bunch of theory that would require long study and research on my part to go down that road, but I was hoping for a clear explanation on specifically why AC power doesn't work for just charging a battery.  My educated guess is that the cycle from negative to positive voltage would some how cancel out the charge.


texts: How to poll UART while processing lots of other stuff

texts:
I have a GPS device which I need to pull data from (the NMEA strings.) However, many times per second my MCU will be busy processing something else. Is there any way to "pause" an UART/RS232 TTL signal or buffer it while my MCU does stuff? I'm looking at either a dsPIC33FJ128GP802 or an AT32UC38x.

The processing of my OSD cannot be interrupted, so interrupts are out.


texts: How do computers output a signal without an input?

texts:
I'm curious about how an output pin gets turned on at a low level when there is no input like pressing a button to complete a circuit.

If you program a raspberry pi to turn on and off an LED how does the output pin get switched? If its transistors doing the switching with a small current at the base allowing a larger current to flow through, what turns on and off the current at the base?


texts: How Much Heat will a 1800 Watt Bulb Produce?

texts:
I plan on placing a Metal Halide 1800 watt bulb 20 inches in front of me (not exactly in front but over my head)  - will this produce more heat than I can handle?

Someone said the question was vague so I'm adding details: The purpose of this experiment is to generate 40,000 lux of light in my immediate surroundings (basically to reproduce outside lighting conditions indoors). This is why the bulbs need to be placed so close to me. If I had put it 40 inches away, for example, perhaps there'd be less heat to deal with, but the amount of light reaching me would be cut in half which means I'd need to add more bulbs. With more bulbs I would have more heat and (I guess) run into the same problem?

Thanks


texts: What is the difference between MCPWM and LEDC PWM?

texts: The ESP32 microcontroller has MCPWM units (Motor Control PWM), used to control motors, and LED Control PWM. The ESP32 docs say the LEDC can be used to generate PWM for other purposes as well, and in fact I am using it to drive a servo. However, what makes it different from the MCPWM, which also produces a PWM signal?


texts: Raspberry Pi SPI interface with PIC-16f877A

texts:
My project is to receive sensor data at I2C of PIC and transfer it to Raspberry Pi via SPI.

How can I interface my PIC and Raspberry Pi so that PIC starts receiving data as per command (SPI master---> Raspberry Pi, slave---> PIC)?

Need your suggestion to interface my 16F877A PIC with Raspberry Pi for mentioned case.


texts: How can this capacitator discharge? (Make: Electronics experiment 9)

texts:
I am trying to get through Make: Electronics book and I cannot understand, how does capacitor in following circuit discharge when I press B button.

Wouldn't the current just go in the circle that push button completed, since there is no loop with ground?


texts: How are multi LED flashlights wired to control current w/o resistors or regulator?

texts:
I have several cylindrical LED flashlights that have a large number of LEDs in them (the one I'm looking at has 9, which I think is typical.)

They take 3 AAA batteries, wired in series, to give around 4.5 volts (More, on fresh alkaline batteries, but voltage probably drops to 4.5 or less under load)

I've had a couple fail and taken them apart. I don't see any current limiting resistors or any components. The little PC board the LEDs are wired into is crowded so it's hard to tell what's going on, but I think they are wired in series.

I gather that if you wire your LEDs in series and can get the total voltage drop across your LEDs to equal the supply voltage you can omit a current limiting resistor? But I don't see how you get a drop of exactly 4.5 volts out of 9 LEDs. With LEDs with a 1.2 volt drop, 5 LEDS would equal 6 volts, so that would work.

Actually, I just looked at the PC board and the LEDs appear to be wired in parallel. Are there ultra-bright LEDs that you can drive directly off of 4.5 volts without a current limiting resistor? Or are there special purpose ultra bright white LEDs made for 4.5 volt supply that have internal current limiting resistors?

Follow-up question: Does anybody know if the 12 volt LED bulbs that are in landscape lights have a voltage regulator in them? I'm interested in using them as room lights for a photography setup, where I can quench the lights as the camera shutter opens. If they are simply LEDs and resistors, the'll quench well within the approx. 50 MS before the camera shutter opens. If there's a regulator in the system, they probably won't.

EDIT: I looked more closely at the PCB, and it's wired with all the LEDs in parallel. The flashlights that have failed have had a failure in the switch/wiring, not in the PCB assembly. The one I photographed got messed up by leaking alkaline batteries. I was able to clean it off and repurpose it as a subject light for my photography. It's "grotty" appearance is the residue of the battery electrolyte paste, and the wires are wires I soldered on in order to power it directly from a trio of AA batteries. (The original flashlight uses 3 AAA cells wired in series.

Here is the back of the PCB, showing the traces:

And here is the front, showing the LED lenses:

There is nothing else to the flashlight aside from the metal barrel, the battery holder, and a switch. I guess it's possible there is a current limiting resistor in the battery holder that I missed, but I doubt it. Plus I've driven the LED assembly for 15 minutes or more from 3 AA batteries, so if it was going to heat up and fry, I would think it it would have happened already. My guess is that these are ultra bright white LEDs that have a 4.5 forward voltage drop. Is there such a thing as LED packages with built-in current limiters?


texts: What capacitors are proper to use for input of AC DC converter?

texts:
I am trying to build an 120 AC to 15 DC @ 200 mA converter using a Power Integrations LNK3206P. Using the full bridge rectifier setup on Table 10 from application note AN-70, Cin1 and Cin2 should each be >2uF/Wout * 3W = 6uF rated at 400V.

It appears that at least Cin2 should be of a low ESR to reduce the ripple voltage on the input of the converter and reduce the ripple current on the electrolytic capacitor Cin1.

Using ceramic capacitors such as this 2220 250V 2.2uF X7T, after de-rating due to the ~170 DC bias of the rectified 120 AC as seen in the right hand side middle graph of its details page from TDK, it becomes approximately 0.8uF.

This would mean that I would need at least 8 if these capacitors in parallel, for a total cost of about $30 USD.

Looking into other options such as ceramic capacitors with higher voltage ratings still results an an unreasonably high total cost. Similar thing with film capacitors.

With AC DC SMPS being so common and cheap, this does not make sense. What am I not thinking about or considering.


texts: What device limits output current such that input voltage is maintained above some limit?

texts:
I think my problem is that I just don't know the name of this device/circuit, but if someone can provide an outline of how to put one together also, or point me at a device, that'd be a help.

The device I seek is a current limiter, but it is rigged so that output current can take any value so long as the input voltage to the device does not fall below some fixed lower value. In contrast to more familiar current limiters which, well, limit the current to some fixed upper value.

The design intent is to have one power domain for controllers that never falls below X (say, 4V), whilst high-power devices (motors) can be operated freely on the downstream side of the device without fear they will kill the controllers if they draw large transient currents.

Thanks


texts: Are there other uses for the value of RMS current besides heating computations?

texts: For most purposes I've personally encountered, RMS current and voltage have been useful only for computing heat losses in a resistor. Do RMS current or voltage have other applications besides computing heat loss?


texts: Reusing Webcam and Monitor from old laptop

texts:
I asked this question on SuperUser.SE, about reusing the webcam and monitor from an old laptop (motherboard died).

Following a suggestion there, i posted this question here. I found out a question that addresses the lcd monitor part of my own question, but still would like to know if someone knows how to use an old laptop webcam.

I am assuming the interface is some variant of usb but with a different plug, although I am not sure. Can anyone help me with this?

To clarify as requested in comments:

I have extracted the webcam from the laptop but cannot identify the plug type, i will post a picture later for better illustration.

I'd like to use it connected to another computer, via usb or something, but i lack the electrical knowledge to know how to go about it..

I have no datasheets nor info on how to get them..i am supposing they are tech specs from the manufacturer for the assembler of the laptop (ASUS, in my case). How do i get them?

The webcam looks like this:

It's not clearly visible, but the connection plug has about 5-6 wires.
Here's a top view with cat paw for scale (are the numbers relevant for searching tech specs?):


texts:
I got this relay.
In the product description they say: "belastet bis zu 10 Amp/250 VAC, 5 Amp 30 VDC." which means: "charged up to 10 amp / 250 VAC, 30 VDC 5 Amp".

On the relay it is printed: 10A/125V~

I would say that the description is not the same. Can I use it to switch on and off devices that are using 230V?

Thank you for your help.


texts: How long will it take to completely run out of power a Li-ion battery of 3.7V and 1000mAh, if the load consumes 16mA?

texts:
I'm trying to determine the exact time that run out power a Li-ion battery of 3.7V and 1000mAh. I'm using a load of 16mA.

If I use the theoretical calculus:

$$time=\frac{1000mAh}{16mA} = 62.5 \;hours$$

Then I proceeded to do the practical test of this calculus, but my circuit take more than 90 hours and the battery is still alive. Can someone explain to me why this happens? Or what am I doing wrong?


texts:
I am working on a Wireless Sensor Network test bed. I am using a Zigbee Series 2 (2mW) from Digi.

So far, I was able to set up the network with 1 coordinator zigbee (C), 2 router zigbees (R1 - R2) and 4 end-device zigbees(E1,E2,E3 & E4) as sensing nodes for various types of variables (temp, humidity, etc..)

So far the network SHOULD be set up this way. (R1) and (R2) are in the range of (C). Both are in the range of each other at well. However, (E1) and (E2) are only in the range of (R1) and the same applies for (E3) and (E4) on the range of (R2) only. (Assume True if Zigbee's TX power can be controlled. So it is at its minimal now)

Since all of this is set up in a room, all the ZB modules are in the range of each other, however; I would like to know if there is a possibility from the Xbee library or a Physical layer option to reduce/increase the TX power at will.

The idea from this is to test a multi-hopping protocol, so if (R1) is down and (E1) needs to send, it will increase its TX power gradually, until it is able to reach and join (R2) and route its sensed values through it.

I know this may sound either dumb or complicated. But I would like to know of there is an availability for such a thing.


texts: What is the voltage range of a standard headphone jack from a phone?

texts:
I want to connect the output from the audio jack of an iPhone to an Arduino.

What voltage range can I expect to see on the audio lines from the iPhone? I assume that turning the volume up on the phone will produce a large AC voltage, but how large does it go up to?

I want to make sure that it wont exceed the voltage level that an Arduino can read on its input pins. Will I need to provide any circuitry between the iPhone and the Arduino?


texts:
What kind of chip and/or plug and play device could handle multi-input boolean logic with 24 volt signals?

I have three sets of 20 reed Hall effect, three-wire switches that each output a 24 Volt signal, and I need to combine them down to simply 3 24 volt signals using AND logic (where the signal is high only if all reed switches in a given set are also high).

I am currently using a PLC, but I think that is way more functionality and price than I need. I thought about powering each one of the reed switches using the signal wire from the previous one, but I sincerely doubt these reed switches can handle the amperage that would need.

Edit: @Transistor You are right, these are three wire Hall magnetic field sensors, not true reed switches.

A = AND(A1, A2, A3, A4...) or rather A = AND( AND(A1, A2), AND(A3, A4)) etc.
The AND logic is the A is high only if all A# are high. The same is true for B, and C.


texts:
I need to add ethernet connectivity to a PIC18f66j60.

The datasheets tells about magnetics. But I know only very little about that.

Do you know any surface-mount magnetics suitable for this use ?

I look for external magnetics. MagJacks are not an option.

Thanks

EDIT :

I've found a lot of parts such as H1102 or H2019, but they feature a kind of coil beetwen the two output pins. Will that work ?


texts: how to design a power amplifier's layout in l-edit?

texts:
i want to design a power amplifier in Tanner L-Edit.

I want to write code in the .ext file but I don't know what syntax or language the .ext file is expecting.  Is it spice? I couldn't find a good tutorial.

The second option is to use the Dev-Gen tool but it produced this error:

Device = Mosfet
Channe = N
Single Transistor Length = 1.00
Single Transistor Width = 22.00
Transistor Multiple Count = 22
Bulk Pattern = 0
Gate Finger Pattern = 0
Source/Drain Finger Pattern = 0
Generated by: Dev-Gen ver. 14.11

If I check the SPICE paramter back annotation as in this screenshot:

All I get is the error (when I choose the .ext file Generic_025.ext)

  Extract definition file is not selected.
  Please click Browse EXT File button to select the file.


texts: Why the base current decreases automatically?

texts:
Given this circuit:

simulate this circuit – Schematic created using CircuitLab

I don't understand why, when simulating it by increasing parametrially the V2 from 0V to 12V keeping V1 constant, the base current decreases exponentially until V2 reaches the V1. I understand that when V2 > V1 the bjt enters in the direct active region and then the Vce increases, keeping the collector current almost constant. But I don't see why the base current should decrease until V1 <= V2. This reduction is more higher than the Vbe variation. Sorry if it is a stupid question.

I've noticed that when simulating an emitter follower, and I thought that was due to the emitter drop that this base current was reducing. But that happens also in that circuit above.

EDIT: I've discovered that this decrease is coherent with the increase of the Vbe voltage, with a given base resistor. So the question is: why the Vbe increase while the BJT exits from its saturation state? Perhaps that answer is more easy, I think.


texts:
I am looking at interfacing to a HD44780 LCD display with an STM32VL discovery board. I am aware drivers exist but in the interest of learning I am doing it myself.

I am curious about the interaction between the DDRAM, CGROM and CGRAM. In the HD44780 datasheet an example of writing letters is given:

When I read the datasheet the character information for H (or any predefined letter/symbol) is in the CGROM as 01001000, as seen in the image. However it states that it is writing data to the CGRAM/DDRAM. I understand the CGRAM provides space for user created letters/symbols. So why does it state that we are writing to CGRAM and not accessing CGROM to create the pre-defined letter H which is stored in CGROM? (or any letter for that matter)?

Any help would be greatly appreciated!

Cheers


texts:
I have ALPS motorized faders + Arduino + H-Bridge setup.

I first controlled them using simple algorithm ( if delta>0 move right ). Results were quite good.

I tried to use PID to control them also but did not manage to get as good results (and I expected results to be better). I'm not sure PID is good for two reasons :

A single turn of the motor makes a big move (there's barely no demultiplier)
The engine don't turn at all if PWM is set under 200 (out of 255).

What is the state of the art way to control these faders ?

Thx

Edit : Thanks all for your interest.
Faders are ALPS RS60N12M, on the last column of the last page of this datasheet : http://www.datasheetarchive.com/dl/Datasheet-092/DSA0041115.pdf.

200 is the value of the PWM analogWrite() (255 is the maximum value 100% on).

For sure I did not tune the PID properly. How should I process in this case (very fast response of the system with a big deadpoint).


texts: Can I make or find a device that will switch between DC inputs on a priority basis

texts:
So my problem is i have 3 Hot DC lines that normally will only have one powered at a time, but if more then one powers on at once i want only one of them to pass through since they are used as triggers, something like so, apologies if the diagram is rough, still learning how to draw them instead of just read.

simulate this circuit – Schematic created using CircuitLab

So that the line with the higher letter will be the single one that passes through.

So if only C is powered it will pass, but if C and A are powered only A will pass, and if only B is on, it will pass fine, but switch to A if A also comes on, and so on and so forth.

Is this possible, and if so is it a simple component that already exists, or will I need to make a small circuit for it?

Anything that can point me in the right direction for more research would be much appreciated, but i don't know what terms to look up on here or google to find out more, even knowing what to google would be of great help since then i could seek the answer.

PS: Extended diagram if it helps

simulate this circuit

Getting power from any of the three lines should turn the screen on, but which line gives power to it's own trigger will decide what displays since i have the triggers tied to the cameras that display, hopefully the diagram has the diodes point in the right direction, but they would just make sure the power wouldn't flow backwards and energize all the triggers.

This might be to much detail but ti said be as specific as possible so maybe this will matter.

Thanks in advance, Lin.

Clarification Edit:
This is for a turn signal and backup camera system, normally only one signal would go through at a time, Reverse (A) Left (B) or Right (C) but i want to make sure in some situations when multiple sources are on, only one passes through based on a simple priority.

So if my Hazard lights are on, they will because of my underlying wiring, be sending power through both wires B and C, and if that happens I want to stop power from C so only power from B gets through.

If the car is then put in reverse with the hazard lights on, power will be coming from A, B, and C, in which case i wont to stop flow from B, and C, at the Priority box, and only allow A through.

Similarly if i'm backing up with the Left turn signal on, Wires A and C will both be live, and i want to block power from C at the priority box, and only allow power from A through.

After the box, my triggering all works well (I tested by manually switching power) but what I need is to have it switch automatically based on that pre-set priority between wires A, B and C.

But i have little to no idea how to go about making something that would block or allow power to flow through based on that pre-set priority.

The hope would be the power that passed through the Priority box, would be a solid 12V (ish, just whatever was going into it) hot wire until the initial wire De-energizes, it dosn't need to pulse or do anything fancy, just allow only one signal through, and chose which signal based on a pre-determined priority.

This is all being done with 12V DC (though I have had readings as low as 10V and as high as 13.5V if that matters)

If this still is unclear let me know, I just don't know enough to know what needs clarification, but will do my best and appreciate any and all help.

Again even the names of types of components to research would be of huge aid.


texts: Wake ESP8266 based MCU on contact close/open

texts:
I am trying to build what I thought was a relatively simple system (think deadbolt detector), that will fire an event when a simple switch changes state.

Currently, I am testing with an ESP-01 and an ESP32, using deep sleep but the power consumption still seems quite high, because I have to wake the device up every 10 seconds to query the status of the "switch".

I would like to only wake from sleep when the state changes, I can "easily" do this on "close", but I would like to do this on "open" as well like in this question.
I need a switch that not only detects open/close, but also sends a pulse to wake up an ESP8266 whenever the (debounced) state changes

I have read up on XOR/XNOR gates, but I am still not sure, how I would implement it.


texts: Changing the polarity of electromagnet using H-Bridge

texts:
I have made an electromagnet using copper coil of 1.0 mm diameter, iron core of 2 cm dia & 8 cm length for my project. Supplied voltage is 12 VDC and current it consumes is 9.0 Amp. It has 1.5 Ohm resistance. I want to change the polarity of electromagnet like pulsing. I have to control e-magnet pulsing through arduino uno.

I learned H-Bridge is a way to do it. What h-bridge should i use for this amount of current and voltage? What precautions should i take when connecting the H-Bridge to arduino if any? Any other things related to doing changing polarity of e-magnet if pointed out will be of great help for me.


texts: Measuring DC motor voltage with an oscilloscope

texts:
My current setup involves an analog controller board that is driving a DC motor and I would like to monitor the voltage being applied to the motor at all times.

How do I physically connect the oscilloscope voltage probes to measure the voltage going to the motor?

Do I need to:

1) connect one probe-end to the positive (+) terminal and the other probe-end to the negative (-) terminal of the motor? (I don't think that works)

or

2) connect one probe end to ground (analog ground?) on the controller board and the other end to either the positive (+) or negative (-) motor terminal?

or

3) some other way?

Thanks!


texts: J-Y(ST)Y..LG cable's charachteristic impedance

texts:
First: How to find out (e.g. calculate) the characteristic impedance for the cable mentioned?
Id like to know how to model that cable in e.g. Ltspice, so I would like to know either Z or L' and C'.
Second question is: What is meant by coupling (see pdf fom link): $$K1=80\% \leq \frac{300pF}{100m}$$
Link to cable's specification I have found so far
edit1:
@Marko Buršič:
So in order to find out L' and C' I need to calculate from the cables geometry, right?
What about my second question?


texts: Find voltage across inductor in RL circuit

texts:
I have this circuit in wich I try to find the voltage across the inductor (VL) at t = 0+ and the switch OPENS at t = 0

simulate this circuit – Schematic created using CircuitLab

Here are my calculations below, but I can't seem to get a correct answer. Can anyone help me? or tell me how to do it?

I know that if t tends to infinity, the inductor acts as an short circuit, which allows me to calculate the equivalent resistor: $$R_{eq} = 3.75 \mbox{ kOhm}$$ ((4+2)//(6+4)) and the general voltage when the switch is open: $$V=3.75*10=37.5V$$

So I have $$I_{R1} = 6.25 mA$$ and $$I_{R2} = 3.75 mA$$

And I know that on resistor R2, the current is $$\frac{V_L-V}{6} = 3.75$$ wich gives me $$V_L = 3.75*6+V = 3.75*6+37.5 = 60V$$

I do not have the answer but I know that this answer is not correct (we submit our responses to an online quiz which is corrected directly). Is there an error in what I did?

Thanks a lot.


texts: Need understanding of the concept of word (memory)

texts:
I've been reading how memory works from a book. The problem is my weak english so I can't catch the meaning correctly.

The text from the book :

  A computer with a 32-bit word has 4 bytes/word, whereas acomputer with
  a 64-bit word has 8 bytes/word. The significance of aword is that most
  instructions operate on entire words, for example, adding two
  wordstogether. Thus a32-bit machine will have 32-bit registers and
  instructions for manipulating 32-bit words, whereas a 64-bit machine
  will have 64-bit registers and instructions for moving, adding,
  subtracting, and otherwise manipulating 64-bit words.

Before you laugh, I will show my interpretation of the text. The diagram is extracted from the book. Its for 32 bit case.


texts: What are some reasons to connect capacitors in series?

texts:
Usually you either combine capacitors in parallel because you want to increase the total capacitance while fitting the components in a certain shape/position, or you just combine capacitors by buying a single capacitor of a larger value.

Combining capacitors in series reduces the total capacitance, and isn't very common, but what are some possible uses for it?  It shouldn't be used to increase the voltage rating, for instance, since you can't guarantee that the middle will be at half the DC voltage of the total, without using bleeder resistors.


texts:
Some paper will mark the size of MOS,like \$ \frac{40}{4}\$ below,and MOS have minimum size for any process,take U18 for example,its minimum size is W=240nm L=180nm.

i want to ask why don't author reduce fraction,i mean write\$ \frac{40}{4}\$ as \$ \frac{10}{1}\$,or is the \$ \frac{40}{4}\$ means that the MOS width is 240nm*40 and length is 180nm*4 so it can't be written as \$ \frac{10}{1}\$ ?


texts: The relationship between \$\beta\$ and \$I_C\$, \$V_{CE}\$

texts:
It was pointed out to me recently that I don't have a good understanding of the varying relationship between a BJT's \$\beta\$ parameter (or \$h_{FE}\$) and the operating point of the transistor.

Typically you would think that this sort of information comes from the datasheet, but when you go to a common one like a 2N2222, you get a mixed-up sampling of random operating points:

I did learn that you cannot rely on \$\beta\$ or \$h_{FE}\$ as a design parameter which can vary with temperature and age (up to around 50% to 200%), but the relationship between \$\beta\$ and operating point is not something that any class covered.

What general trends and rules of thumb are used to make sense of the varying \$\beta\$ value? What are the factors and considerations for the varying \$\beta\$ when you are designing transistor circuits?


texts: How does the iPad not electrocute people without grounding?

texts:
I've noticed for a while that my iPad had a tingling sensation when I brushed my hand along the back of the casing. I found out today that it was because the charger is not grounded, and this was intended by design.

I'm curious though, how did we avoid electrocution even though there is no ground? Why do other chargers like Samsung's need a ground, given they are both handheld electronics with probably similar power ratings? Does that mean it's unwise to use an iPad while charging when wet, even if we avoid touching the lightning cable?


texts:
I'm working on an ADC ATSAM3x8e arduino due board. I'm trying to write new .h and .cpp files.

How do I create a datatype like same as instance name of the  processor?
Example: In ADC of the processor the datatype name like as ADC* p_Adc, In EMAC the datatype like as Emac* p_emac

I've already written one program; the error is showing like:

error 1. Variable or field ' function name' declared void
error 2. 'ADC' was not declared in the scope  (ADC is datatype)
error 3. 'p_adc'  was not declared in the scope

My Header file contains:

void ADC_Mode_register(ADC* p_adc,uint32_t value);
void ADC_control_register(ADC* p_adc,uint32_t value);


texts: What happens if I omit the pullup resistors on I2C lines?

texts:
Just now I realized that the I2C data and clock lines (SDA and SCL) must have pullup resistors.

Well, I've built a couple of clocks using the DS1307 RTC (see datasheet) according to the schematic below. Notice that I have omitted both pullup resistors.

Both clocks work fine, one of them is working for more than 3 months now. How is that possible? In any case, I wanted to know:

What happens when the I2C pullups are omitted?
Is the lack of pullups likely to damage any of those two ICs in my board?

I'm after answers that address my specific case of connecting ATmega328P to a DS1307 RTC like in the schematics I provided, but if the question doesn't get too broad, it would be helpful to know what happens when the pullups are omitted in general, i.e., in other scenarios of I2C operation.

PS. I did search the Net to find the answer, but could just find articles about dimensioning the pullups.

Update: I'm using Arduino IDE 1.03 and my firmware handles the RTC using the DS1307RTC Arduino lib (through its functions RTC.read() and RTC.write()). That lib in turn uses Wire.h to talk to the RTC.

Update 2: Below are a series of scope shots I took to help explain how the I2C is working without the external pullups.

Update 3 (after I2C pullups added): Below is another series of scope shots I took after adding proper (4K7) pullup resistors to the I2C lines (on the same board). Rise times dropped from about 5 µs to 290 ns. I2C is much happier now.


texts: Modeling diode connected transistor in differential amplifier

texts:
I have question about the analysis of common-mode gain of BTJ differential amplifier with active load on the Sedra Smith book. In this book, the differential-mode gain \$Ad\$ is derived based on the transconductance \$Gm\$ and output resistance \$Ro\$, \$Av=Gm*Ro\$. These are represented in the figure below.

Notice transistor \$Q_3\$ which is connected as a diode. In the equivalent circuit, \$Q_3\$ is represented as the resistance (\$r_{e3}\$//\$r_{o3}\$). Where \$r_{e3}\$ represents the resistance viewed from the emitter, and \$r_{o3}\$ is the Early resistance of \$Q_3\$.

Now for common-mode analysis, we have the following equivalent circuit for determining the gain. Notice now that the diode transistor \$Q_3\$ is represented by the resistance (\$r_{e3}\$//\$r_\pi\$//\$r_{03}\$), where \$r_\pi\$ is the input resistance of \$Q_3\$.

My questions are: Why is \$r_\pi\$ used to represent \$Q_3\$ in common-mode? Is it ok to use (\$r_{e3}\$//\$r_\pi\$//\$r_{o3}\$) for differential-mode too?


texts: How to solve this resistive network using divider rules and ohms law

texts:
I have a homework problem I've been trying to solve.
So far I think I'm using the right formulas for the calculations.

I just need help finding: The total resistance of the circuit, finding Vab using the voltage divider rule, finding IR2 using the current divider rule, and finally finding the power dissipated by R1.

Here's what i've worked out so far.

This is the original circuit

Maybe I need to calculate the resistor in parallel with the battery, and add it as the total resistance.
But how would you calculate that, and would it work?

Any advice is appreciated thanks.

[edit]

I re-did (R2//R3) in series with (R4//R5).
And calculated the total resistance.

[Edit]

I tried calculating Vab but I'm not sure if I'm correct.
Here's my calculations.


texts: Flash devices that allow write (or read) and erase in parallel?

texts:
Is there a flash device that allows you to read/write and erase in parallel (as long as they are in different sectors/blocks naturally - so we can ignore chip erase)? Just to be clear, I don't expect reads and writes to occur in parallel, because you would be using the same interface to transfer the data, so that would not be possible. But you could trigger a sector/block erase, and then immediately start a read/write perhaps?
If for example you look at a flash part such as ISSI IS25LP256E, which uses a standard interface, it is made clear that the reads are ignored if a program/write/erase is in progress. However it is less clear if a program is allowed, while an erase is in progress. You can suspend an erase or a program but that is not the same thing as running in parallel. I suspect it is not possible to run things in parallel on this chip, but I may be wrong.
So one scenario I have in mind is the ability to record the very latest data in flash, so that in the event of a power failure or unexpected reset, the most recent data is preserved, without having to rely on one final flush to flash. For example, while the app is writing to block A, block B is being erased. When block A is full, the app starts writing to the freshly erased block B, while block C is erased. When block B is full, the app writes to C and block A is erased. And so on.
So at any one time, one block is being written to, one block is being erased, and one block contains some history (to allow for overlap etc). This is simplistic and no doubt there is a more refined algorithm, but you get the idea. (In fact you may need several blocks to allow for the erase time, depending on how fast you are filling up the blocks.)
If we could read/write and erase in parallel, as long as we take into account timing versus block size etc, we could reduce waiting time. If the app has multiple uses for the flash, then one module could be erasing, while another writes.
I would expect this to be a common need and so may be reflected in flash chip design.
So rather than having multiple flash devices on the same board, which is a solution I suppose, are there flash chips that are optimised for this kind of thing, as well as your usual flash usage?


texts: SIM808 can't get GPS fix on custom board

texts:
I have designed a board with SIM808 which is connected to the 32-bit microcontroller. There is some extra power circuitry on board - MPPT switching converter. Distance from switching controller to GPS_antenna SIM808 trace is about 30mm.

My SIM808 GSM and GPRS communication works perfect. It connects to cellular network in matter of seconds and everything works. But GPS... can't get it work. Below you can see my board design(both layers "transparent", top layer, bottom layer). On bottom layer, below GPS copper trace and antenna connector, there is plain solid ground copper pour. Surrounding vias are grounds. PCB is 2-layer. Trace width is 0.61mm.

Using standard passive GPS antenna: https://e-radionica.com/en/ceramic-gps-antenna-1575-42mhz-with-ipx-connector.html
System is powered from battery and there are enough capacitors around which should cover current peaks(up to 2A for SIM808).

Tried going outside with it, leaving it for some time, once even whole night :), tried bigger passive antenna - no movement. I have tested if I have got a fix using both LED from 1PPS pin and using AT+CGNSINF command.

I even got so far that I googled bunch of different breakboards with SIM808 and, oddly(or not?), all of them had trace for GPS antenna routed not directly from my pin, but at 90 degrees angle. Don't know if that could be the key.

I am really confused about this one. Before designing this board, I read few online articles regarding antenna and traces and tried to apply those rules as close as possible. It worked for GSM, but for GPS can't not find solution.


texts: symbology interpretation in the datasheet

texts:
I am creating a footprint for QFN28 package and found the following symbols in the datasheet.

Immediately below, I found the following table of values.

My question is: What do these symbols mean? How should I interpret them?


texts: I am trying to add RJ11 (telephone wire) sockets to my PCB on Eagle but am having trouble finding it in the libraries.  Is this a standard socket that is included or do I need to install some external library?  If the latter, where can I find such a library?