texts: I am new to MCU programming, I use STM32, C language, IAR IDE, HAL. I need to erase SRAM of the MCU STM32L071RZT6 when the "Erase" button is clicked. How can it be done? Will it cause app crash? Can memset() be used for that?


texts: ATmega dual pin function JTAG and analog input

texts:
I need measure temperature to adjust ticks as temperature changes. I suppose thermistor nearby crystal (10ppm) as low cost solution. I'm using AT90USBxxx but I have allocated PF0-3 for more important analog signals. So I need reuse pins shared with JTAG interface and I need debugging option enabled when thermometer is disabled. Thermistor is not capacitive load hence I can connect circuit behind serial resistor as explained in AVR042 app note.

simulate this circuit – Schematic created using CircuitLab

When starting I can adjust JDT bit of MCUCR register.

But is somehow possible to detect if JTAG cable is plugged in?

I don't think so. As workaround is possible to modify bootloader or implement a custom JTAG on/off parameter stored in EEPROM.

What JTAG pin (TCK, TDO, TMS, TDI) is preferred or does not matter?

Any ideas or objections against proposed solution?

Reference: http://blog.lse.epita.fr/articles/61-dealing-with-the-pull-up-resistors-on-avr.html (but they do not want to support JTAG)


texts:
I recently bought a 2N7000 transistor and though it was a cheaper replacement MOSFET compared to the STP55NE06 as I didn't need to handle high voltages and high currents. However it acted very differently. Usually with the STP55NE06, when I connect like this:

simulate this circuit – Schematic created using CircuitLab

The LED starts as OFF (assuming the MOSFET gate was previously set to ground).

If I connect LINK 1, the LED turns ON and when I disconnect LINK 1, it remains ON as the MOSFET gate is floating towards the positive. If I then connect LINK 2, the LED turns OFF and when I disconnect LINK 2 it remains OFF.

HOWEVER

If I replace it with the 2N7000:

simulate this circuit

This time the LED starts off being ON. If I connect LINK 1, nothing happens. If I disconnect LINK 2, nothing happens. Then when I connect LINK 2, the LED turns OFF. If I then disconnect LINK 2, the LED turns back ON.

It honestly feels like the 2N7000 behaviour is like the STP55NE06 but with a pull up resistor on the gate...

simulate this circuit

Also how come I can power the LED like this (albeit quite dimly):

simulate this circuit

Wait this means that my theory with the 2N7000 having a internal pull-up resistor could be true.

Anyways, can someone tell me why 2N7000 behaves so differently compared to the STP55NE06 despite both being Mosfets?

Edit: I measured the resistance between the GATE and DRAIN of the 2N7000 and I'm surprised to see a 6.5k resistor between it. The STP55NE06 had NONE! additionally the 2N7000 has A DIODE from SOURCE to GATE. The STP55NE06 also had NONE! It's like this:

simulate this circuit

Can someone confirm that there is a pull up resistor and a diode inside the 2N7000?


texts: Is there a way to find out the motor phases without opening up the motor?

texts:
Good day,
I am doing a group project and we have a hub motor that looks like it was rewired by the previous students. For this reason we cannot tell which phases are which. We need to get it working with an A B C phase output esc. Would it be possible to find out which phases are a b and c by using a multimeter and turning the wheel? Or perhaps connecting the phases and seeing where the resistance is?
Update: We were lucky to find a teacher who specializes in electric motors and ESCs. We just had to try the phases in whatever order and swap two if it wasn't running right.


texts: How do we test reliability and quality so as to minimize the risk of board failure in the field?

texts: We are developing a smart cable for a customer. The market potential is hundreds of thousands of units. The vendor who designs and supplies the boards (with firmware) that will be built into the cables is making prototypes now. We can easily test these for correct functionality, but as far as long-term reliability and quality, I'm not sure how best to reduce the risk of systemic or high incidence field failure, which in those quantities would be an absolute nightmare scenario for a small company like ours. How do we test prototypes and mass production first article samples to minimize such reliability and quality risk as much as possible?


texts: can pins 3 and 11 on the 556 timer use the same capacitor to ground?

texts:
can the control voltage pins 3 and 11 on the 556 timer use the same capacitor to ground? I assume that I can double the capacity of the 0.01\$\mu\$ capacitor to 0.02\$\mu\$ and share the capacitor between pins 3 & 11, I found some info and looked at the spec sheets but none of it was helpful in answering this.

Info I found:

http://www.kpsec.freeuk.com/555timer.htm
http://www.national.com/mpf/LM/LM556.html#Overview
http://en.wikipedia.org/wiki/555_timer_IC


texts: DIY UPS for Home Automation/Energy Management system

texts:
OK, the original post asked too many questions and I was asked to rewrite the post question. So after reviewing the old post and rethinking the project here it is. So, as requested, I will ask 1 question per post.

I have a Home Automation System and Energy Management System. I need to keep them powered during power failures, as they sometimes have issues rebooting in the proper sequence.

Supplying power to these systems is:

110 VAC to 12 VDC Switching Power Supply, and
12 V (630 Ah) battery power, which is charged by 250 watt 36 VDC SOLAR panel, with a MorningStar TS60 MPPT SOLAR Charge controller. The solar is from another project.

I want the SOLAR to be the primary source of power.

Below is the schematic of the proposed circuit, redone from the original design.

Question: As the circuit is, can I have both the battery and the switching power supply wired as shown?

I am not sure that the circuit will work, because the SOLAR part will be putting out 14 VDC during the day and the Switching Power supply will be set at 12.2 VDC. The way that I understand Schottky diodes, is that the circuit will use the higher voltage of the 2 inputs, but I am concerned that the voltage difference will create some issues.


texts: Detect sudden change in current and send signal to arduino

texts:
I am trying to make a smart power socket using Arduino.

The socket should power even high power equipments at 230 Volt 50hz through a relay.
I want my arduino to analyse the amount of current taken by the equipment, so that when there is a sudden drop in current taken by the equipment , the arduino will switch off the relay.

The idea is that when a charger finish charging a device ,there will be drop in current taken and so it can be turned off.Or in case of a TV when it is switched off by remote there will be a drop in current and the relay will switch off to conserve energy.

I know how t o connect and program but don't know how to detect the drop in current and send signal to aruino. It will also be fine if I can linearly decrease current and voltage so that it is compatible with arduino.


texts: KC705 Ethernet to SFP Data pass through design

texts:
Board : KC705   Vivado :2017.3
Project: Connect board via the ethernet port and output the data via SFP+ module. No data manipulation or filtration needed. Just take packets and send them. Data rate of ethernet and SFP+ will be 1Gb/s itself.
Here's the design I've made on the Vivado IP integrator tool:

I've used TEMAC and PCS/PMA cores in the design. Although for the MAC to PHY I should have choose GMII interface, but somehow I can't connect it the onbard PHY so I had to change it to MII and then it got connected. However, I'm stuck. Can someone please help me validate the design. I also want to know how would you instantiate the MAC configuration via AXI ethernet MAC lite block or some other non processor block.
Also, I'm getting some address overlap error. Please refer to this link for the address error:
https://forums.xilinx.com/t5/Memory-Interfaces-and-NoC/Ethernet-AXI-interconnect-Address-editor-Overlap-issue/m-p/1126306


texts: External watchdog reset for AVR required

texts:
I had a circuit with ATmega644PA and use internal watchdog timer to bring the controller from a hang state to known by a reset. but my code still hangs in some loop somewhere, and causes the system to be non-responsive.

So I need to use an external reset source that can work to monitor a pin of microcontroller, if the pin status remains constant for more than, suppose, 60 secs it will reset the controller.

In my application code I will provide pulse on the pin regularly.

Other suggestions welcome.


texts:
I have a small Arduino Uno powered robot I'm entering in a competition, and it uses some small servos to position sensors and other actuators. According to the rules, it can't move until a pre-determined signal is received, at which point the robot is manually switched on. However, when it starts up, the Arduino will actuate the servos to random positions, causing a "jitter" that would immediately disqualify the robot.

How do you wire/code the Arduino so that, when initially switched on, any attached servos will remain at their current position and will not "jitter" at all?

The servos are connected to the standard DIO pins using the built-in servo library.


texts: How to calculate current through an H-Bridge

texts:
Given the below H-Bridge, how do you calculate the current through the conduction paths? This particular IC, the L298, has a per-bridge limit of 2A - so  I know the upper limit.

If I were to place a motor across the leads then, based on the motor's load, I would have a rough idea via the datasheet of that motor.

But what if I were to place a resistor across OUT1 and OUT2, or short them?

If shorted:

The entire supply Vs would appear across two transistors. Would it simply be distributed as Vs/2 per transistor? How would you calculate the associated current?

Does the answer lie withing this characteristic?:

So, does this mean that if the transistor has 400mV across the collector-emitter junction thn the current will be saturated at 150mA? So that is, with two of these transistors and  OUT1 and OUT2 shorted together, terminals in the below bridge would have 150mA through them since the supply (if the supply Vs is greater than 800mV) would be across their junctions?

How would you calculate the current if the terminals were not saturated - or do transistors in this application always operate in saturation mode?

If OUT1 and OUT2 are tied together with a resistor:

If the supply is greater than 800mV, will the transistors automatically be in saturation mode with 150mA of current draw (for the 2n2222)? If so, the voltage across some resistance R connected across the terminals of OUT1 and OUT2 would then be 150mA*R.

And consequentially, would the voltage across the transistors would be Vt = (Vs-150mA*R)/2?

Basically, what I am asking is how to calculate the current in the following two configurations:

simulate this circuit – Schematic created using CircuitLab

Assuming that transistors are biased with base current as shown in the above IC schematic. How would you calculate the voltage across the resistor and the current in either case?


texts: I have connected Pickit3 and the above TQFP PIC microcontroller on a PCB and connected the respective pins to it.  I  have checked for short circuits between pins and found none.  What could be the reason the PIC is not detected by the programmer?


texts: PWM or switch port programmatically for Servo

texts: Is there a huge difference between using a PWM and switching a port through a program (like using switch) for operating Servos? For smooth movement is PWM necessary or switching using a program will work fine? What about the durability - can switching ports break down as they are not designed for operating like that? I wanted to get a PWM but I keep reading that a Digital Output port can be treated as "PWM" by turning it on and off in certain time intervals? And now I am confused and don't know if its worth investing in a PWM Driver.


texts: How can I switch solar panels on and off with a microcontroller?

texts:
I have built a li-ion 18650 7S pack as my solar backup.  It is being charged by 3*250W solar panels in series (about 105V 8A.)

My charger doesn't have an option to monitor individual cell voltages. It just charges the battery pack to the given voltage (4.2V*7 = 29.4V.)

I have a BMS monitoring my pack and if a cell goes above 4.2V it generates a signal which I monitor using an ESP32.

What I want to do is turn off solar side if cell goes above 4.2V with that signal.

Can Mosfet do this job or is there a better way to achieve this?

Note: The BMS has overvoltage cutoff but if I connect the solar charger through the BMS, it cuts off the battery power to the controller while PV side is on. The controller manual clearly say that cut PV before battery.


texts: Problems with PCB Trace / Signal -- But Continuity Present

texts:
I've been working with a reasonably sized Chinese PCB fabricator, and we've had random problems with boards for the last few months.

I'm not an expert PCB layout guy, but we aren't talking about EMI issues here.

Here is my most recent issue:

On the trace circled in red from NetJ1_2 is a data signal that goes from an MCU loading tool to the MCU.  I've had this set of plated holes for 6 months in a few revisions of a board.

Last month, I conducted a minor re-routing of this signal.  All the dimensions / topology of the routing are well within fabrication limits / DFM checks in Altium and within any stated limits of the PCB fabricrator.  This is a toy board with 0.2mm traces -- nothing earth shattering here.

After this minor re-routing, pictured below -- I get the boards and 3 of the 4 boards I am unable to "see" the MCU when I connect the loading tool to it.  When I say "see", I mean the loading tool is not able to boot up and communicate with the MCU.

I desolder the boards with not-working MCUs, and solder some known good MCUs with software already loaded and the MCUs function with the existing preloaded software.  But my loading tool still doesn't "see" the proven good MCU.

I know think the data input trace (circled in red) is defective.  I do probe the trace with a multimeter and there is continuity between the plated hole and the pad.

Has anyone had a circumstance where a PCB trace has continuity but marginal functionality?  Seems unlikely, but I'm not coming up with any other explanations...

Has anyone going down this rabbit hole and not get burned, going forward using a board house having issues like this?  I've made some minor changes each time to a board to fix some flakey fabrication problem areas, but I'm worried I make 5000 of these boards and they have an issue.

[I've had another crazy fabrication issue with this board shop, a signal trace to an LED somehow picked up power on the board, and permanently kept the LED on!  Don't know why -- cause there ain't anything touching in Altium...]


texts: vhdl strange output flickering with test bench

texts:
i'm new to vhdl and fpga. I'm currently working with a basys3 board programmed in vhdl using vivado. I made a 3(binary) to 8(decimal) dencoder with a for loop.
My test bench is also with a for loop. What i now notice is strange output flickering between my normal output changes. Could somebody give me a reason for this problem?

main:

entity bindec38 is
Port ( sw : in STD_LOGIC_VECTOR (2 downto 0) := (others => '0');
       led : out STD_LOGIC_VECTOR (7 downto 0)  := (others => '0'));
end bindec38;

architecture Behavioral of bindec38 is
begin
process (sw)
variable int : integer := 0;
begin

    int := to_integer(unsigned(sw));
    for j in 0 to 7 loop
        if (int = j) then
           led(int) <= '1'; -- correct schrijven deze led hoog
        else
           led(j) <= '0'; -- schrijven de andere dan laag tijdens de loop
        end if;
    end loop;
end process;

end Behavioral;

test bench:

entity simdec is
--  Port ( );
end simdec;

architecture Behavioral of simdec is

component bindec38 is
    Port ( sw : in STD_LOGIC_VECTOR (2 downto 0);
       led : out STD_LOGIC_VECTOR (7 downto 0));
end component bindec38;

-- input signal
signal sw : STD_LOGIC_VECTOR (2 downto 0) := (others => '0');
-- output singal
signal led : STD_LOGIC_VECTOR (7 downto 0) := (others => '0');
begin

UUT: bindec38
Port Map (sw => sw, led => led);

-- sim process
sim_pro: process begin
for i in 0 to 7 loop
sw <= std_logic_vector(to_unsigned(i, 3));
wait for 100 ns;
end loop;

wait;
end process;

end Behavioral;

see the simulation output

it only happens in 2 out of 8 transitions.


texts: How do I select what values to load in CCPR1L register (for generating PWM signal with PIC)?

texts:
I need to generate PWM signal with PIC18F2550 microcontroller at near 20kHz. I read the datasheet, I found it too complex and confusing, then I started to search for a sample code on the net to finally see this PWM tool.

I used it with parameters \$ F_{OSC} \$=20MHz and \$ F_{PWM} \$=20kHz to generate these two different codes for corresponding two different duty cycle percentages.

// Duty cycle = 0%
PR2 = 0b11111001 ;
T2CON = 0b00000100 ;
CCPR1L = 0b00000000 ;
CCP1CON = 0b00001100 ;

// Duty cycle = 100%
PR2 = 0b11111001 ;
T2CON = 0b00000100 ;
CCPR1L = 0b11111001 ;
CCP1CON = 0b00111100 ;

The datasheet tells me that the 4th and 5th bits of the CCP1CON register are the LSBs of the "PWM duty cycle with" value, and its MSBs are stored in the CCPR1L register, isn't it?

That makes, for 0% duty cycle, the 10-bit PWM duty cycle timing is,

00000000 + 00 = 0x000

And for 100% duty cycle,

11111001 + 11 = 0x3E7

So, according to this tool, I must set the values between 0x000 and 0x3E7 to the relevant PWM registers to have duty cycle ratios between 0% and 100%. At this point I become confused and the following questions arise in my mind:

What is this 0x3E7 value? How is it calculated? How would I find it myself if I hadn't had such an online tool?
What is the resolution of this PWM signal (i.e.; what is the time difference of length of two duty cycles for two sequential values like 0x3E6 and 0x3E7)?
Why can't I load higher values to the CCPR1L register like all ones (0xFF); that would make 0x3FF for the overall PWM duty cycle length value. What happens if I do so?
The tool says that, I can use PWM feature only with 9-bit resolution with the working parameters I specified. So, why the number 0x3E7 is a 10-bit number? Is the "9-bit" comes from integer truncated value of \$log_2(0x3E7)\$?

This happened to be a long question, but it would help me greatly if someone kindly explains me the overall steps and logic of PWM signal creation with PIC microcontrollers.

Thanks.


texts:
I have been doing some work on this for a while now and I am confused by the very first point.

Looking at the bode plot it starts off at 50dB and has a slope of -20d/dec. I am not sure how to handle this first section.

My transfer function so far is:

I know how to find K and zeta but in my equation the value for a alludes me. My initial assumption is to take a=.00001, something close to 0.

As in class we have only ever gotten bode plots with an initial section which is a constant, if anyone can tell me a way to reasonably handle the first second I would be appreciative.


texts: Takes days to charge phone from 10W solar panel

texts:
I bought a small 10 W solar panel which is rated to deliver 570 mA at its peak, according to the specifications:

Power: 10 Watt
Max. Voltage: 18 Volt
Max. Current (Imp) : 570 mA

So I bought a step-down converter that drops the voltage from 18V to 5V. Then I connected a USB port to it to charge the phone. Now, the problem is that it takes days to charge the phone battery, which is rated at 7.22 Wh.

So with a maximum power of 7 W from the panel (let's say that it will never reach 10 W), it should charge the phone in roughly one hour. Well, this is not happening and I would like to know why...

I initially thought it is the converter, so I have tried also with a 5V Voltage Regulator (the well known LM7805), and it has the same problem. Moreover, when I use an LM7805 and connect the phone, the voltage drops to 3V, so I suspect that there is not enough current from the panel.

The Step-down converter is this one, which has the specifications:

Rectification: non-synchronous rectification
Input voltage: 7V-35V
Output voltage: 1.25V-30V
Output current: adjustable maximum 3A
Conversion efficiency: 92% (the highest)

So I have these two voltage regulators, and it takes days to charge a phone. Now, the question is: am I doing/understanding something wrong or can the solar panel not handle this? Is there any way to check this out?

EDIT:
After seeing the comments and the answer, I tried to measure the current in full sun. I get this:

This mean that the current is 0.7 mA, right? It's the first time I'm doing this and I followed this sketch to measure the current with a multimeter:

In my case, the battery is the solar panel and the light bulb is the phone.

I hope the measurement is correct.


texts:
Under what conditions would a faster, higher rupture capacity, higher voltage-rated fuse be less safe than the equivalently current-rated fuse which was slower, lower rupture capacity or lower voltage-rated? My intuition is that a faster fuse is not always good because it may trigger too easily but that higher rupture capacity and voltage rating is always safer.

As an example, I have a multimeter which has "fast" 250V fuses (one glass 200mA, one ceramic 20A). I presume at least the glass one is not HRC. It is rated for measuring up to 15A/600V DC or AC (two separate probe sockets for low/high current, corresponding to the two fuses). One of the fuses has blown and I am considering replacing both with >600V HRC fuses of the same speed and current rating. It strikes me that in the case of user-error on a 600V circuit, you would want the fuses to be able to cope safely.

It also seems that fuses tend to be rated for AC volts (LBC fuses state "breaking capacity at maximum voltage rating and then state maximum voltage in VAC, HBC fuses often have gaps in the charts for DC like this). Littlefuse implies that you should halve the AC rating, but also suggests contacting them to be sure.


texts:
I want to graph \$h[n] = \frac{1}{n+1} \ n\in [0,29] \$

I tried the next code, but won't compile:

n=linspace(0,29,30);
h =1/(1+n);
figure
stem (n,h);


texts: I know how to measure the average power dissipated on a component but I have a very big circuit with lots of components so I am looking for a short way to calculate the total avg power in the whole circuit using Ltspice


texts:
I bought a nano ITX motherboard on ebay (a Smartyacoo DS-2019), to build a computer in a gingerbread cookie tin.
In the corner of the board there is a tiny (and I do mean tiny, overall about 7mm wide, fitting a plug about 3mm wide) white connector labelled 'PWR_BT'. I was hoping I could attach a power button there, but step one is finding a plug that will fit in this connector, and I'm stuck. Can someone help?


texts: Differential Amplifier with Large Capacitive Load

texts:
I am experimenting with the following mixer circuit for audio:

EDIT: SCHEMATIC FIXED

All of the subcircuits work fine separately but when the diff amps are combined with the summer circuit, the large capacitances C3&C4 cause them to go unstable. Placing 47 Ohm resistors at the amp outputs helps, but doesn't entirely solve the issue. I want to use these amps for the high CM input, is there any way around this instability issue? Thanks.


texts:
This is a follow-up to SN65176 RS485 contention .

I have solved the contention issue by waiting for at least 26us after the stop bit of a PC-connected XS201A RS485 driver before transmitting from the SN65176. However, avoiding contention is not enough.

Initially, my PIC-side termination network consisted of a single differential 100ohm terminator:

simulate this circuit – Schematic created using CircuitLab

As soon as the XS201A is done transmitting, the differential voltage returns to an average value. However, this average value is not 0V differential as I would expect. Instead, the driver is strongly pulling the line halfway to the mark state. In the process, it thinks that that means a start bit and issues a "0" byte (or a corrupt partial byte from the PIC side, if it starts transmitting soon after).

I then made a bias network to mimic the "space" (opposite of mark) state, such that:

the differential impedance is still 100ohm
the differential voltage is biased to 500mV
the bottom line is biased to 1.5V

simulate this circuit

Adding this bias network made it such that over a few thousand bytes, my error rate is now about 0.4% (down from 100%). However, even with this improvement, there is no visible change in the idle-state voltages - the XS201A is essentially overriding my bias network and reversing the polarity of the middle resistor.

My questions are:

Why does the XS201A not enter a high-impedance state when idle?
Why does the XS201A have a strongly-maintained non-zero differential voltage when idle?
Is there anything wrong with my new bias network?
Should I not expect to be able to have a simple termination resistor instead of a bias network, especially since the XS201A
claims to have a failsafe bias network built in?


texts:
Good Day,

I am trying to build an IR system that works via the Arduino. So far, it works great. However, I want to have one IR Led on the back of my device and one in the front. However, the Arduino pin only supplies 40mA max.

Hence, when I used on IR Led, the range was still pretty decent. However, upon connecting two of the IR Leds to the same pin, it was very weak (1m range only). I was thinking that to solve this problem, I can get a cheap 7400 series AND gate. Then, I can feed the IR Line from the Arduino and split them into the two AND gates, and the AND gate will drive the IR Leds, and both will get full power (I am not sure of the rating output of a 7400 AND gate)

Is this a good idea? Any idea what a 7400 series AND gate output max current is?


texts: PhotoMos relay -calculating the right resistance value and input voltage

texts:
For a EM coil relay I would choose the input voltage based on the coil rating. And a freewheeling diode based on maximum reverse voltage that appears across the coil.

I am not able to find something that tells how to make sense of ratings provided in the PhotoMos datasheet. Below are the Specifications of a PhotoMos relay (link to datasheet. not able to attach snaps).

1.How to arrive at the input voltage across the LED (maybe a range)?
2.How to calculate the value of the external current limiting resistor?
3.some articles speak about the RF rating of the external resistor used, how does this impact operation of the relay?

datasheet link:
http://www3.panasonic.biz/ac/e_download/control/relay/photomos/catalog/semi_eng_rf1a_aqy22_s_cr10.pdf


texts: How to calculate the input and output capacitors of a common emitter amplifier using BJT?

texts:
Sorry if the question is stupid, but my head is still hard as a coconut and I am learning...
I am dealing with this circuit that I have calculated from scratch.

This circuit was designed to have

Vc = 4.5V
Ve = 0.5 V
Ic = 10 mA
Ib = 44.44 uA

Now I am trying to calculate C1 and C2.
The documentation about this is vague and conflicting but as far as I have researched you calculate these capacitors like this:
C1

Several authors say to calculate this capacitor equal to the input impedance at the cut frequency.
Some authors say the frequency must be the lowest frequency, below which, I want to remove from the signal. Some say it must be the highest frequency the amplifier must amplify. I am considering the first hypothesis.
The input impedance of this circuit, I found to be
\$ Z_{IN} = R_1 \ // \ R_2 // \ (r_{\pi} + R_E) \$
where
\$ r_{\pi} = \frac{kT}{qi_B} = \frac{26 mV}{i_B} \$
So, for iB = 44.44 uA, we have
\$ r_{\pi} = \frac{26 mV}{44.44 uA} \approx 581.6746\$ Ω
So,
\$ \frac{1}{Z_{IN}} = \frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{r_{\pi} + R_E} \$
\$ Z_{IN} = 268.82 \$ Ω
If C1's reactance must be equal to ZIN at the cut frequency, lets say 80Hz, then
\$ C_1 = \frac{1}{2 \pi f Z_{IN}} \$
\$ C_1 = 7.4 \mu F \$
C2
For C2 we have the same calculation but now C2's reactance must be equal to the load impedance (8 Ω) for speakers.
then,
\$ C_2 = \frac{1}{2 \pi f Z_{LOAD}} \$
\$ C_2 = \frac{1}{2 \pi (80) (8)} \$
\$ C_2 = 248 \mu F \$
Is this the correct way to calculate these capacitors?


texts:
Working on a board currently, but cannot find any info on what kind of component this is.
I have some suspicion/intuitive feel, but I`d like to be sure.
It appears to be a SOT 89 package.
Anyone please.
Thank you.


texts:
I am looking to read the status of a battery charger using an Arduino Board. The battery charger shows red when a battery is being charged and green when a battery is charged. I understand that the charger uses a Bi-Color LED.

One option is to use an RGB color sensor (eg. https://learn.adafruit.com/adafruit-color-sensors/overview)  but I am looking to see if there is any way I can read the Bi-Color LED directly on the Arduino pins.

Any ideas?


texts: Reset as output... So how to unlock Atmega8?

texts: I by accident set port C as output, and now I can't load new program to cpu, but processor is detected (I using mkAVR Calculator(programming process is "done" but in verification process I get error)). So how I can reverse my mistake ?


texts: Energy dissipation and current decay in this circuit

texts:
I have a circuit that looks like this :

A 200 A current controlled power supplies delivers the current to a coil (with inductance ~ 5 mH) when the MOSFET is open.

The varistor is there to clamp the voltage in case of a back emf spike.

When there is current flowing in the coil and the FET is closed, the diode+varistor part of the loop provide a path for the energy stored in the coil to decay.

Questions

How do I treat the varistor in circuit analysis?
What kind of varistor do I need based on my values (see later)
What will the timescale of the current decay?

Attempt and data

For 200 A and 5 mH, the energy stored in the coil $$ E = \frac{1}{2}L I^2 $$ is 100 J.

So do I need a varistor that can withstand more than that? Or comparable to that? What would happen if I did not have a varistor?

Does the current decay like in a typical LR circuit with $$ I \propto e^{-\frac{R}{L}t} ?$$ or does the varistor modifies this?


texts:
What's the cheapest way to link a few microcontrollers wirelessly at low speeds over short distances.

I'm looking to keep it ultra-cheap, use common discrete parts and keep it physically small. I don't care about bands and licensing so long as it works.

802.15.4/ZigBee, Bluetooth and WiFi all require an expensive coprocessor, so aren't an option.

Alternatively, are there very cheap radio modules available to hobbyists? The kind of things you find in car keyfobs and wireless thermometers, perhaps?

Would building a simple transceiver on a homebrew PCB even be practical, or will I be plagued by tuning, interference and weirdy analogue stuff?

Could something like this be driven from a microcontroller?
What about receive?


texts: Transformerless power Supply - 24VDC, 120V AC and 230V AC

texts:
I want to know if it is possible to design a power supply for a circuit that can operate from DC and AC using the same input terminals.

Thus, the output should be xxV DC (5-24 or whatever is decided on), and on the input side the consumer can connect whatever he has available - 120V AC, 230V AC or 24V DC.

A transformerless AC to DC power supply can work for at least the AC side, but the ideal one looks to be the capacitive type which would not allow DC to get through, am I correct?

There is also an resitive transformerless design, not ideal at all since it is very ineffecient.

Any ideas? Thanks!


texts:
I have a blown 15A fuse and a red thermistor about 16 mm in diameter that has blown I can’t get any info on it as I don’t have a part number any suggestions what size the thermistor might be so I can replace it

This is closeup of what I assume was thermistor


texts: Turn off an always on led with transistor

texts:
I've been trying to turn off a always on led with a push bottom and a transistor? What I want to do is to turn off the led when I push the botton.

simulate this circuit – Schematic created using CircuitLab


texts: How are you supposed to know what crimp tool to use for a given connector?

texts:
There is a dizzying array of crimping tools available on digi-key, mouser, and other distributors. But they nearly always just say they're for specific wire gauges, without reference to what type of connector they're meant for--and just today I came up against a problem where a crimping die I'd paid $50 for turned out to not work at all for the terminal I was trying to crimp onto the wire; even using the 6 AWG hole didn't fit (it's 8 AWG wire with an ordinary uninsulated brazed-seam lug). How are you supposed to know which tool to use for which type of crimp?
I'm aware that manufacturers usually list a specific tool to use, but I can't afford to pay $3000 and wait out a ten-week lead time just to get a few terminals crimped onto some wire.
It'd be greatly appreciated--and hopefully of use to others as well--if someone could give a run-down of different types of common crimp connectors and what sort of tool they're intended to be used with.


texts:
I'm making JKnRnS master slave flip-flop, here is my code:

library IEEE;
use IEEE.std_logic_1164.all;

entity JKnRnS is
  port(
       C : in STD_LOGIC;
       J : in STD_LOGIC;
       K : in STD_LOGIC;
       nR : in STD_LOGIC;
       nS : in STD_LOGIC;
       Q : inout STD_LOGIC;
       nQ : inout STD_LOGIC
  );
end entity;

architecture JKnRnS of JKnRnS is

signal Q_int: std_logic := '1';
signal NQ_int: std_logic := '0';

signal a,b,c1,d,f,e,notC: STD_LOGIC;
begin
a<=not(C and J and nS and NQ_int);

c1<=not(d and a and nS);

d <= not(nR and b and c1);

b <= not(Q_int and nR and K and C);

e <= not(notC and c1);

f <= not(d and notC);

Q_int <= not(NQ_int and e and nS);

NQ_int <= not(nR and f and Q_int);

notC <= not(C);

Q<=Q_int;
nQ<=NQ_int;

end architecture;

which works fine, but when I change it into:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_MISC.all;

entity nand_3 is
    generic (t_rise: TIME:= 0 ns; t_fall : TIME:= 0 ns);
     port(
         in1 : in STD_LOGIC;
         in2 : in STD_LOGIC;
         in3 : in STD_LOGIC;
         out1: out STD_LOGIC
         );
end entity;

architecture nand_3 of nand_3 is
begin
    process (in1, in2, in3) is
    begin
    out1 <= not(in1 and in2 and in3);
    end process;
end architecture;

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity nand_4 is
     port(
         in1 : in STD_LOGIC;
         in2 : in STD_LOGIC;
         in3 : in STD_LOGIC;
         in4 : in STD_LOGIC;
         out1 : out STD_LOGIC
         );
end entity;

architecture nand_4 of nand_4 is
begin
     process (in1, in2, in3, in4) is
     begin
         out1<=not(in1 and in2 and in3 and in4);
     end process;
end architecture;

library IEEE;
use IEEE.std_logic_1164.all;

entity JKnRnS is
  port(
       C : in STD_LOGIC;
       J : in STD_LOGIC;
       K : in STD_LOGIC;
       nR : in STD_LOGIC;
       nS : in STD_LOGIC;
       Q : inout STD_LOGIC;
       nQ : inout STD_LOGIC
  );
end entity;

architecture JKnRnS of JKnRnS is

signal Q_int: std_logic := '1';
signal NQ_int: std_logic := '0';

signal a,b,c1,d,f,e,notC: STD_LOGIC;
begin

E1: entity work.nand_4(nand_4)
    port map(in1=>C, in2=>J, in3=>nS, in4=>NQ_int, out1=>a);
E2: entity work.nand_3(nand_3)
    port map(in1=>d, in2=>a, in3=>nS, out1=>c1);

d <= not(nR and b and c1);

b <= not(Q_int and nR and K and C);

e <= not(notC and c1);

f <= not(d and notC);

Q_int <= not(NQ_int and e and nS);

NQ_int <= not(nR and f and Q_int);

notC <= not(C);

Q<=Q_int;
nQ<=NQ_int;

end architecture;

I get an error:
KERNEL: Error: KERNEL_0160 Delta count overflow. Increase the iteration limit using -i argument for asim or the matching entry in simulation preferences.
What is wrong here?


texts: How do I connect these modules to an arduino?

texts:
I am trying to connect three components to my Arduino Uno: a Wave Shield, an LCD Screen and a keypad.

There are not enough ports for all these modules and I am wondering how I can extend the Uno.  Do I have to buy an extra part? Or can I use a breadboard to use the ports on the Uno for more than one component?


texts: State-Space-Model from more dimensional Transfer-Function

texts:
Im trying to extract the State-Space-Model for an cascaded Buck/Boost-Converter from an set of Transfer-functions \$ G(s)\$ (which I generated with Plecs/Matlab).

First of all I want to analyse the Buck-Modus (Sboost=0).

The State-Space-Model should look like this:

\$ \begin{align}
 \dot{\vec{\Delta\mathrm{x}}}
 =
    \begin{bmatrix}
        \dot{\Delta \mathrm{uC1}} \\[0.5em]
  \dot{\Delta\mathrm{iL}} \\[0.5em]
  \dot{\Delta\mathrm{uC2}}\\
 \end{bmatrix}
 =
    \begin{bmatrix}
        \mathrm{A_{11}} & \mathrm{A_{12}} & \mathrm{A_{13}} \\[0.5em]
        \mathrm{A_{21}} & \mathrm{A_{22}} & \mathrm{A_{23}} \\[0.5em]
        \mathrm{A_{31}} & \mathrm{A_{32}} & \mathrm{A_{33}} \\
    \end{bmatrix}
 \cdot
    \begin{bmatrix}
        \Delta\mathrm{uC1} \\[0.5em]
  \Delta\mathrm{iL} \\[0.5em]
  \Delta\mathrm{uC2} \\
 \end{bmatrix}
 +
    \begin{bmatrix}
        \mathrm{B_{11}} & \mathrm{B_{12}} & \mathrm{B_{13}} \\[0.5em]
        \mathrm{B_{21}} & \mathrm{B_{22}} & \mathrm{B_{23}} \\[0.5em]
        \mathrm{B_{31}} & \mathrm{B_{32}} & \mathrm{B_{33}} \\
 \end{bmatrix}
 \cdot
 \begin{bmatrix}
        \Delta\mathrm{Uin} \\[0.5em]
  \Delta\mathrm{Uac} \\[0.5em]
  \Delta\delta
 \end{bmatrix}
\end{align}\$

As you can see, my Buck/Boost-Converter contains 3 State-Variables.
I did an Impulse-Response Analysis in PLECS (Simulation) to obtain the Bode-Plot from the perturbation in an equilibrium Point.

After that I used \$\mathrm{tfest}()\$ in Matlab to generate \$G(s)\$ for the Bode-Plot.

I have following Transfer-Functions:

For \$\mathrm{uC1}\$: \$ \dfrac{\mathrm{uC1}}{\mathrm{Uin}}(s),\dfrac{\mathrm{uC1}}{\mathrm{Uac}}(s),\dfrac{\mathrm{uC1}}{\delta}(s) \$

For \$\mathrm{iL}\$: \$ \dfrac{\mathrm{iL}}{\mathrm{Uin}}(s),\dfrac{\mathrm{iL}}{\mathrm{Uac}}(s),\dfrac{\mathrm{iL}}{\delta}(s) \$

For \$\mathrm{uC2}\$: \$ \dfrac{\mathrm{uC2}}{\mathrm{Uin}}(s),\dfrac{\mathrm{uC2}}{\mathrm{Uac}}(s),\dfrac{\mathrm{uC1}}{\delta}(s) \$

and want to convert them into an State-Space-Model.
How can I achieve that?


texts: High-pitched noise from boost converter. Need your help

texts:
I'm experiencing some high-pitched squealing noise from my boost converter, I'm getting some resonating frequency when I start increasing the load current.The inductor is a 47uH inductor. The part number for the diode is MBRD640CTT4G.

This is my schematic:

 [1]

I checked the power line with the scope and this is the 12V line @ 100mA using AC Coupling:

 [2]

As you can see, the ripple noise isn't so bad, I'm getting about 200mV peak to peak.

But when I run it at 500mA load this is what happens:

 [3]

The ripple is horrible, I'm getting about 4V p-to-p.

Any ideas what is going on?


texts:
I am trying to build a panel of IR LED lights  (5mm IR 940nm, forward voltage: 1.2V.)
Does each LED need a resistor or will one do for all of them?


texts: Can you use a 3ph BLDC controller without a potentiometer?

texts:
I'm attempting to build a 12v fan and I'm looking at controllers to drive the 3 phases of the motor.  It seems every ESC i find has a potentiometer included. I want my fan to always run at full speed and be turned on by a simple relay.

Can I just short the positive and signal legs on the board in lieu of connecting the pot in order to simulate a pot at 100%?


texts: How to wire an LED light that turns on when potentiometer raised past a certain threshold?

texts:
I’m building a device that, in part, uses two 9V batteries to power a computer fan which is controlled by a potentiometer. If the potentiometer is below 60% or so, the fan fails to move. I want to hook up an LED that is only on when the fan is spinning.
I tried using 2 AA batteries and a transistor to power and control the light, but that didn’t work. I don’t need all the calculations done for me, but I’d appreciate input on where to go from here.
The circuit is very simple. A push button controls on/off, and the potentiometer controls speed. I understand the two 9V batteries can't power the fan very long, but I will only need to run it for ~5 seconds at a time, very infrequently.
I think this diagram better represents what I'm working with. After looking into it I realized I've had the potentiometer wired as a variable resistor.


texts:
What does the symbol in the red circle mean?

(Product page)


texts: C code for analog read of SD24 ADC (MSP430I2041)

texts:
I am trying to read the output of the ADC into an array by taking the output from the memory register but for some reason it is not working, the array values stay as 0:

   int adc[100] = {0}; //Sets up an array of 100 integers and zero's the values
   int i=0;

  // Function prototypes
  void adc_Setup();
  void adc_Sam();

  void main()
  {
    WDTCTL = WDTPW + WDTHOLD;           // Stop WDT
    adc_Setup();
    while(i<100)
    {
      adc_Sam();    // activating the adc 100 times
    }
  }

 // ADC set-up function
 void adc_Setup()
 {
   SD24CCTL0 = SD24OSR_1024+SD24SNGL+SD24IE;  // SINGLE CONVERSION ENA IONTURRPUT
   SD24INCTL0 = SD24INCH_0;        // Select Channel A0, SD24INTDLYx = 00
                                   // SD24INCTL0 |= SD24GAINx FOR GAIN FROM 1 TO 16
 }

 // ADC sample conversion function
 void adc_Sam()
 {
   SD24CCTL0=SD24SC; // activates the adc this is a control register
   __delay_cycles(1000);
   while (SD24CCTL0  & BUSY)// waits
   {
      __bis_SR_register(CPUOFF + GIE);// Low Power Mode 0
   }
    adc[i]=SD24MEM0; // takes  the data from the output of the adc
    i++;
 }

Also this memory register holds only 16 bit out of the 24 bits. You can switch if you want it to hold the LSB or the MSB. So If I want all the bits. do I have to switch it and save the info twice, then take the missing 8 bits? Or is there a better way?

update:
There was no problem CCS Only display values of the variables that are declared in the main function that is all


texts: Can the HAL_ADC_Start(&hadc1) function be executed only once?

texts:
I am using STM32F103C8T6 ADC1 single channel continuous conversion mode to collect the ambient temperature, but I am not very clear about using the function HAL_ADC_Start (& hadc1) because the function is called once before the "while" loop of the main () program and the  Call this function multiple times in the loop, will this affect the value collected by ADC1?
Thanks for the answer


texts: Trouble writting a code for "wii nunchuck controlling pan tilt servo system"

texts:
I have spent days searching for code on the net there is heaps of code for controlling servos for pan/tilt using a wii nunchuck and arduino. However I want to make it wireless, using:

*2 arduino duemilanove boards

*Wii nunchuck

*2x servos

*433MHZ transmitters / recievers

Does anyone know of any code that can be used? OR Can help me be writting some (willing to pay)? OR knows of anyone who can help?

Thanks guys any help would be great

Alex.


texts: How to find the data direction register given a port address?

texts:
I am writing a custom library for Arduino (for example using the ATmega328P). I would like to get the data direction register given an address of the corresponding port address. For example,

#include <avr/io.h>
DDRB = get_data_direction_register(PORTB)

How can I possibly achieve this?


texts: dsPIC30F: 10-bit ADC DONE bit vs the ADIF bit (interrupt request)

texts:
The ADC module has 2 very similar signals. The DONE bit in the ADCON1 register and the interrupt request bit from the ADC. For some reasons samples in the documentation poll the ADIF bit and not the DONE bit.

Is there any difference in how these signals are raised? The difference in how they are cleared is clear. Please, do not comment on this.

Are there any pro/cons on what signal to poll from the software?


texts:
I'm trying to take 12 digital signals and convert them to a linear analog signal (0-10 V or 0-20 mA). In an ideal world each digital signal would increase the analog output by 0.83 V and it wouldn't matter what order the digital inputs are on. So if I had bit 0 and 11 on I would get 1.66 V or if bit 3 and 4 are on I would get the same.

Is this possible with a DAC or R2R ladder?

Thanks


texts: Current vs time under fixed bias in semiconductor

texts:
Could someone please tell me how would the Current vs time curve of a pn-junction diode would look like under constant applied bias? Is the current going to go to zero as time gets large?

Thanks


texts: Whats this effect on this set of opamps?

texts:
I was trying this circuit

I have calculated the transfer function
as
\$H(S)=\frac{R_{2}R_{3}R_{5}}{R_{1}(R_{2}R_{4}-R_{3}R_{5})}\$
Then I applyed a sin signal at 100 Hz, showed here

this does not make sense with the transfer function since applying the values of the components gives a gain of -10 and in the practice this gives a gain of -100.
But the reason of this question is when I raise the frecuency to 4800 Hz the cropped top of the output signal appears complete!

Why? I understand that with the 100 Hz signal thats the physical limit of the 741 in this mode with the components showed, the \$R_{5}\$ control the gain, but I do not figure out this effect.

the green signal is the input and the blue is the output.


texts: Why does a square wave in frequency domain have less amplitude?

texts:
For a square wave in time domain to frequency domain, the amplitude decreases, as shown in the spectrum image below.

I dont understand why the amplitude decreases. In the time domain, it looks constant to me. Hard for to reason out. I just know that the amplitude decreases but not in the time domain.

Great explanations will help me a lot.


texts: MPLAB XC8 + PIC18 + external memory = Error 712 (can't generate code for this expression)

texts:
I'm currently having a bad time trying to use an external RAM chip (512 kB) with a PIC18F8720 and the Microchip XC8 compiler (v1.35, PRO mode).
Whenever I try to write some code to modify a variable in the external memory, the linker throws an error (712): "can't generate code for this expression". This doesn't happen when reading far variables: only when writing into them.
This error is reproducible, even in this small example program:
#include <xc.h>
#include <stdio.h>

far int intArray[10];
far int intVariable;

void main(void) {
    intVariable = 2; // --> ERROR 712
    intArray[1] = 3; // --> ERROR 712
    printf("%d\n", intVariable);
    printf("%d\n", intArray[0]);
}

The compilation+linking commands are generated by MPLAB X v3.20:

"/opt/microchip/xc8/v1.35/bin/xc8" --pass1  --chip=18F8720 -Q -G  --double=24 --float=24 --emi=byteselect --ram=default,+20000-9FFFF --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=require --mode=pro -P -N255 --warn=-3 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    -obuild/default/production/main.p1  main.c
"/opt/microchip/xc8/v1.35/bin/xc8"  --chip=18F8720 -G -mdist/default/production/Test01.X.production.map  --double=24 --float=24 --emi=byteselect --ram=default,+20000-9FFFF --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=require --mode=pro -P -N255 --warn=-3 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    --memorysummary dist/default/production/memoryfile.xml -odist/default/production/Test01.X.production.elf  build/default/production/main.p1

Compilation output:

main.c:9: error: (712) can't generate code for this expression
main.c:10: error: (712) can't generate code for this expression
Microchip MPLAB XC8 C Compiler (PRO Mode) V1.35
Build date: Jul  7 2015
Part Support Version: 1.35
Copyright (C) 2015 Microchip Technology Inc.
License type: Node Configuration

What am I doing wrong? The compiler output doesn't help much, as the error is way too generic to give any clue.


texts: In RC LPF, what is the magnitude at the pole location?

texts: In RC LPF Transfer funciton = 1/1+sT, the pole location is -1/(time constant). So As per the pole concept the magnitude response at this pole should be infinity. But why it is -3dB?


texts: Any tips for a new grad in power engineering in Australia?

texts:
I am close to graduating from EE at an Australian university. I've recently found a job in the electrical distribution field and I'm realising that I know close to nothing about the standards and equipment used in the field. Does anyone know any good resources that can be used to help bring a new grad up to speed? Key information that I'm looking for would include things like sizing of distribution boards, busbars, drawing system one-line diagrams etc. To the guys who made the jump from uni into the power field like me, what advice would you guys have on this? Did you get taught this stuff at uni?
Thanks :)


texts:
I am unsure what is wrong with my amplifier / microphone coupling.

I have read many of the posts on stackexchange including the following:

http//electronics.stackexchange.com/questions/68525/electret-microphone-with-class-a-amplifier-has-no-speaker-output

I am using low impedance headphones (~38Ω, Logitech)
I have tried bridging the pins on the jack leaving the LM386 and it helps, but not enough

http//electronics.stackexchange.com/questions/76020/linkwitz-mic-preamp-mod

I tried measuring the impedance on the mic - obviously incorrectly.  But, initial values seem to start around the same (I think this is the problem?)

The amplifier circuit on my breadboard :

Based on this audio amplifier kit.

Datasheet here: http//www.jameco.com/Jameco/Products/ProdDS/151204.pdf

As far as I can tell, the circuit is working as designed (i.e. there is audible output from the circuit; gain adjustment seems to work, no smoke, etc)

So far, I only have one microphone to test it with.  It is a "Boundary Business Microphone" from RadioShack.

As sold, there was a pendant about 18" from the condenser microphone which housed a small circuit and took a single LR44 (button cell, 1.5v) battery.

It is currently modified to take an LR6 (AA, 1.5v) battery.  The diagram for the (modified) circuit is below:

http//i.imgur.com/rrswB49.jpg

I presume the reason for the inclusion of the pendant is the ~16ft long cable (which I have no desire to remove).

When I made the aforementioned modification, I was suspicious that the change from an LR44 to an LR6 (AA, 1.5v) would alter the behavior of the microphone.  However, this has not been a problem when using this mic with a PC audio card (SB Audigy) or a handheld voice recorder.  With this circuit, I can hear only faint input even when blowing hard onto the mic or tapping it with my finger.

Do I have an impedance mismatch due to two/too many pre-amp circuits?

If so, how do I fix it?  If not, please point me in the right direction.

My proposal:

Return the microphone circuit as near to the original operational parameters as possible: (for the sake of "knowing it is right")

The LR44 has an internal resistance of 4.19Ω
The LR6 has an internal resistance of 0.28Ω
^Values obtained here: http//www.g-holbeck.com/english/elteknik/indexri.htm
The resistor in series with the battery on the circuit board is 2.2kΩ
I should replace the 2.2kΩ resistor with a 2.6kΩ in the microphone circuit?  Is it that easy?

And, since I will need to use this microphone with this circuit for now:

Add a bypass to the microphone to decouple the pre-amp circuit in the pendant

or:

Reduce the input voltage on the amplifier circuit

Currently at 9v
The datasheet for the circuit recommends 7 - 15v input.
Lowering the voltage will reduce the output from the LM386?

Reduce the voltage supply to the microphone

Seems like this will require adjustments to the bias voltage.
Not sure I have a clue how to do this...

or:

Something I have totally overlooked?  I am a newb after all.  Please forgive my ignorance.

Thanks for any help, I really want to understand this.

PS: Could only add two links, so some are intentionally broken above.

Edit://

The circuit which I built is on the right below.  I included the microphone pendant circuit in this diagram on the left.  I had to draw this myself because the datasheet listed above explicitly claims copyright to its contents (so, no screenshots).

^^Right click, view image (in Firefox, IE at least) to see the full size.

I tried to embed the image other ways but EE.SE considers anything other than this way a 'link' that contributes to my two link maximum.


texts: In a single diode rectifier circuit, is capacitor offering additional energy to Load?

texts:
I am a graduate student majoring in electrical engineering.
Now, I am studying about wireless power transfer and energy harvesting.
While reading a paper written by Bruno Clerckx, who is senior member at IEEE, I encountered something that doesn't make sense to me (maybe makes sense for experts naturally.)

Take a look at the following circuit diagram; single diode rectifier circuit.

Surely, the authors did not consider Vin as a simply sinusoidal signal, but for simplicity and for striking what I do not understand, I assume Vin is a single sinusoidal signal.

Then Vout will be a signal $$V_{out} = \max ~\Big\{V_m\;\cos(\omega t + \theta), ~0 \Big\}$$
if the capacitor does not exist.

On the other hand, if the capacitor exists like the figure, the Vout will be smoothened like the figure.

Of course, Vout keeps higher in this case than in the case without the capacitor, so I expect to harvest energy better.

However, in the power view, Let P1 be transmit power, P2 receive power, and P3 output of rectifier's power. P2-P1 is the loss of the power due to the wireless channel, P3-P2 is the loss of the power due to the block for rectifier.

Then, I think P3 is anyway determined by the efficiency (power loss) of the channel, the one of the rectifier block, and the transmit power.

Why can we get more harvested energy if adding the capacitor, even though the capacitor is not a source but an energy consumer (anyway, one of resistances).


texts:
Here is revision 6 of the circuit. Hows it look? :)

(This is an ohmmeter circuit. It measures resistances from 1 to 10M ohm with an accuracy of 1%. The resistor (not shown) is measured between J5 and J6. The comparator goes to the wakeup pin of a uC. The uC then wakes up and takes a reading using the SPI interface on the ADC. )


texts:
I designed a two layers PCB for an AVR. The board would communicate with other peripherals(sensors, a micro SD card and so on) via SPI, I2C, and UART. The maximum speed on the PCB should be associated with the 16Mhz crystal oscillator and SPI bus. Since it is first time for me to design a PCB I wanted to ask if there is any big issues in my layout. More specifically, I wanted to know about the following points.

(1) the numbers/spacing of GND VIAs (related to the area "1" in the image)

I placed VIAs every 2mm in the GND plane, just because I heard it is helpful to have as many GND VIAs as possible to reduce GND plane inductance. But is the spacing of 2mm good enough or crazy(too many VIAs)? Even though it's a low speed device board, I wanted to make the design reasonable.

(2) having power planes on both of the layers (area "2" and "3")

The area "2" is the voltage output from a switching regulator. The expected current is lower than 0.5A. The area marked with "3" is the voltage dropped through a Schottky diode. For each of the areas I made copper pours on both layers to decrease inductance/resistance. However, on the bottom layer I have ground rings around these power planes. Would it be better to just have the power planes on one layer and increase the area of the GND plane?

(3) a power track separating GND planes

On the bottom layer (Green color), I have two GND planes almost separated by a 1cm thick 5V track in the center. I connected the left side and right side of the GND nodes around the track using the GND planes on the top layer. Therefore I have a chain of GND planes. I changed the routing method many times but could not find a better way of doing this. Is such track okay in general?

I'm afraid that my decisions on the track width, spacing, area assign are all based on only qualitative tips from internet. It would be appreciated if one could recommend a well associated literature..


texts:
Is this correct:

"Current is directly proportional to voltage if resistance kept constant"

V = I*R
Ohms law is only applied when resistance kept constant or not?


texts: I'm working in the 50V, 10A range with un-shielded wire to drive a brushless DC motor. Are there any advantages to braiding the 3 phase wires? will it reduce EMI and spiking?


texts: Could FCC-unapproved RF devices still be used legally?

texts:
If my reading is correct, FCC allows the use of RF devices that are unapproved. One condition is that it is used for the purpose of

  Evaluation of performance and determination of customer acceptability,
  during developmental, design, or pre-production states.

ftp://ftp.fcc.gov/pub/Daily_Releases/Daily_Business/2013/db0321/DOC-319712A1.txt

I think the 'determination of customer acceptability' is a loose concept. What does it involve? Couldn't a customer be given a device for use for 3yrs and still be part of the 'customer acceptability' process?


texts: Node voltages using a combination of voltage and current sources

texts:
I have come across the the circuit below and found it to be difficult to figure out what the node voltages are. I implemented it on circuit wizard as below. Can someone please explain how to work out the node voltages at TP2, TP3 and TP4? Thank you!
?
Attempt:


texts:
My book said that \$I_1=I_T \times \frac{R_1}{R_1+R_2}\$,and \$I_2=I_T \times \frac{R_4}{R_4+R_5}\$

simulate this circuit – Schematic created using CircuitLab

I have two questions about these formula

1.Why don't we need to consider \$R_4\$ and \$R_5\$ when why calculate \$I_1\$? i know \$R_1\$ and \$R_4\$ or \$R_2\$ and \$R_5\$ are not series connected ,nor parallel connected,but we didn't find the equivalent resistance of \$R_1\$ and \$R_4\$ or \$R_2\$ and \$R_5\$,we just ignore \$R_4\$ and \$R_5\$ when why calculate \$I_1\$,why?

2.Why is \$I_2=I_T \times \frac{R_4}{R_4+R_5}\$?why isn't it  \$I_2=I_1 \times \frac{R_4}{R_4+R_5}\$?


texts: Tradeoffs of XBee vs. Wifi for remote sensor & camera

texts:
I'm planning to build a remote sensor for my driveway gate, which is about 250' from the house (line of site).  The basic requirement is to notify my HA system when the gate opens or closes, but I would also like to take a photo of the gate each time it opens.  I have 120VAC power at the gate location.
I'm thinking a Raspberry Pi + camera would be ideal for this application, but I need to choose a wireless communication method.

The location is on the edge of where my phone picks up our WiFi network, so WiFi may be an option, although the specific device chosen would be a factor.   If I can find a WiFi device with enough range, this would be the simplest, as I can simply use HTTP and/or FTP for notifications and file transfers.

XBee, especially with the higher powered Pro versions, seems like it would have plenty of range (and I already have a dedicated Pi in my garage that could be the receiving end), but I would have to invent a protocol to move status updates and photo content over the XBee serial connection or configure a SLIP connection.

Are there any other tradeoffs that I should consider?


texts: Some questions about BJT in saturation region

texts:
In below circuit I sweep Vb from zero to 5V Vcc.
And I obtain the following plots for the currents:

I have a bit problem with understanding two things in saturation region:

1-) Why/how does the Ic decreases with Vb after the saturation point?

2-) How can I quantify/formulate Ib at saturation region?


texts:
I want to measure voltage presence when an LED lights up (i.e. the IC_Output goes LOW, LED is common anode).

The -Ve of LED is connected using a 1k resistor to the output of an IC and +Ve to VCC.

Instead of adding a separate voltage divider, can I just add one resistor in series with the 1k resistor?
How will this affect the brightness of the LED?

original circuit:

simulate this circuit – Schematic created using CircuitLab

modified circuit:

simulate this circuit


texts: Question electrolytic capacitors electronic devices

texts:
I have electronic devices from 1990 (SNES, CRT TVs) and I know that these devices that have not been used for a long time cause faults and depolarization in the electrolytic capacitors, is it necessary to use these devices in the interval of 1x a month to preserve the electrolytic capacitors from failing due to disuse? are used electrolytic capacitors manufactured since 1990 and assembled in electronic circuit
the devices it is necessary to use them 1x a month to avoid damage to the electrolytic capacitors ?? what reccomendation?


texts:
I'm building my own high voltage capacitors, for science, and I'm running into an issue. I'm 90% sure what I'm looking at is coronal discharge but I wanted to be certain. The caps are two aluminum foil plates with 4 layers of some unknown plastic sheeting between them and then hooked up to my 15kV NST.

In this picture you can see the arc that forms after running on AC for a while. The whole thing is much brighter in person but this picture captures the problem I'm having. The thing I'm curious about is that when I hook up diodes to it to make a half wave rectifier this problem does not occur. This only happens on AC and if I reduce the number of layers of dielectric to just 1, it's not so much corona as it is just a constant lighting storm with big arcs like the one seen shooting off all over the place.

So just to confirm, is this coronal discharge?
Why does it only happen on AC?


texts: Why does not all the current flows through Zener diode?

texts:
Let's assume the following circuit, where Zener diode is used as a voltage regulator. R16 (R18 later) is the load.

When the input voltage is sufficiently high for Zener diode to be reverse-biased, according to the current-voltage curve of the Zener diode, the current will flow through it. Also, I know that the resistance of the diode is very small (milliOhms) when it is opened.

Considering all of the above, I guess we can exchange the diode with the resistor of low resistance (R20 in the image below).

Now we can calculate the currents through R20

So, if the load has a small resistance, then most of the current will flow through Zener diode.

My questions are:

Is it the correct interpretation of Zener diode's functioning?
Do we use it for the loads, where only the voltage is important?


texts: Unobtrusive sensor for detecting touch on a plush toy?

texts: I'd like to modify a stuffed animal to react to petting/scratching. The last toy I had with a feature like this was a Furby, which you "petted" by simply pressing a rather obvious switch hidden just below the fabric. Has the state of the art progressed at all in the past decade? I feel like conductive thread would be a good place to start, since it could be sewn right into the fabric, but I'm not sure what to do with it.


texts:
I'm designing a circuit that will disconnect a connection when 5 consecutive square wave pulses are missing. If less than 5 consecutive pulses are missing then I want to reset the counting process.

      _   _   _   _  1  2  3  4  5      _   _  1 2 3 4 _   _
In  _| |_| |_| |_| |___________________| |_| |________| |_| |_

                                   ____
Out ______________________________|    |______________________

To give an idea:

I'm thinking of using a counter that will count the number of pulses. This will connect to a multiplexer, to initiate selection between counter reset or charge bank of cap(s). Bank of capacitors charge to reach 5V. This will be compared(op-amp) to ~4.9V.

The capacitors will initiate charge after each pulse, but will discharge and start charging when the counter resets. If 5 consecutive pulses are missed, the caps will be at 5V. This 5V will be higher than 4.9V at the comparator. Which will create the signal I need....(the rest of the circuit I have already).

So I need some ideas from the experts. Do you guys think this is a good approach? Do you have a better way of doing this?

Edit: Counter will be used to count missing pulses. The time interval will always be the same and very robust. Duty cycle is going to be 30% on and 70% off. I will have to pick the correct capacitors but it is not critical now. Frequency is 10Hz

Any feedback is appreciated.

Thanks in advance.


texts: Looking to understand this DAC and op-amp schematic

texts:
I have been looking into high-voltage op-amp LTC6090-5, here it is its datasheet: http://cds.linear.com/docs/en/datasheet/6090fe.pdf

On first page of it, there is a reference circuit for using with DAC:

Since my intention was to use this high-voltage op-amp with DAC, I am looking into understanding this reference schematic. My target circuit is very similar to this example.

Questions that I have in mind are:

why is there 10k resistor at DAC output? Is it used as current limiter? Why is current limiter needed if op-amp sinks very little current at its input?
Why is there a capacitor at the same + input?
at the feedback resistor(453k one), why is there a capacitor across it?
why is there extra connection from from DAC REF voltage(2.5V) to the voltage divider of negative voltage feedback of op-amp?

(I understand negative feedback connection at the op-amp)

Thanks everyone! :)


texts: PIC Processor, SPI to microSD card, 25Mhz Clock slew is bad

texts:
Using a PIC24 processor which has a rated SPI clock speed of 25Mhz, we see quite a jaggered sort of wave for the clock, instead of nice square pulses. Given the spec is rated to the speed we are using, it is not clear what the problem is.
Slowing it right down and the pulses come nice and clean, but we don't get the speed we need.
It works at the higher speed so the clock cant be that bad, but we just get issues now and then which is unclear if its electrical yet, but I thought I would post here to narrow that argument down a bit.
Tracks on the PCB are short, we have maybe 10-15mm total of tracks between the processor and the microSD socket, no capacitors on the lines. No wires, all PCB tracks only. This is operating as SPI mode, not SD mode.
What could cause this?
Bad Slew I know can be from capacitance, or if the driver is not up to the task of driving what is connected, but this is just a microSD card.
This was measured with a battery powered isolated 200Mhz Hantek scope, with a 100:1 probe. I know some of this could be potentially from the scope loading the lines, which is why I used a 100:1 probe rather than a 10:1, and it certainly is better using the 100:1 but its still not as I would expect. Next would be to get an Active Probe I guess, but really I am not sure that is going to be possible, but it would indicate what is really going on I guess.
Should the pulses be nice and sharp and square at this frequency?
Pics of 10:1 and 100:1 probes attached.

Any suggestions?
Regards
J


texts: Why is the phasor expression of the currents and voltages of this circuit zero?

texts: Why is the phasor expression of the currents and voltages of this circuit zero except V1 which is apparently equal to Vs.


texts: Energy stored in capacitor system formed by plates

texts:
In this circuit we can see that the equivalent capacitance is 2C as two C's are in series which in turn is parallel to another two C's is series.This is connected in series to another capacitor of capacitance C.So equiavalent capacitance must be C/2.

Therefore net energy stored must be 1/2(C/2)V^2=1/4CV^2.But it is not matching any of the options.Am I going wrong?Where?

[Here C=Aε/d]

P.S:This is an exercise problem from my textbook.Unfortunately no solutions are provided in the book.


texts: How can I identify a salvaged LCD? 21 pins

texts:
I did something that might be considered bad practice. I desoldered an LCD from a fan heater by silvercrest and i'm having some trouble identifying the pinout of it. From what I can tell, pin 1 is GND and pin 2 is VCC but i'm quite new at this and couldn't find any datasheet at all. It's 21 pins, and then a seperate LED backlight.
The different sections of the LCD light up when the LCD is connected to power and you ground the different pins. My goal would be to use the numbers in the right lower corner with an arduino. Any help is appreciated! Here's the PCB I desoldered it from

And here's a video of me grounding the different pins while pin1 and 2 are connected to GND/5v
https://streamable.com/0gx7hi


texts: Effect of Rs in a CS amplifier with degeneration

texts:
I was studying the topology of CS amplifier with degeneration (a resistor connected from source to ground and I have two question about this topology:

It is clear for me that Rs will decrease the gain (cons.) and increase the output resistance (cons.).

I know also that the input capacitance will decrease (pros.). Is there any other motivation behind using this series resistor Rs?

They also mention that Rs adds noise, while adding an inductor instead will not add noise and will give the same (pros.) as the resistor. I know that resistors give thermal noise, but why inductors don't? Is it because they don't dissipate real power? And is this the only difference between adding an L or an R?


texts:
I am trying to find the ABCD parameters of the two port network in this circuit (where \$R = 1\Omega\$ and \$x = 1\$):

simulate this circuit – Schematic created using CircuitLab

To determine A and C, we leave the output port open so that \$I_2=0\$ and place a voltage source \$V_1\$ at the input port. We have

\$V_1 = (j10 + 1)I_1\$

and

\$V_2 = I_1 * \$ what?

Should I do this with nodal analysis instead?


texts:
I am a beginner in electronics. I am trying to understand AND gate on this
page.

I have only solved circuits that make loops and don't have a ground. How to make a positive voltage (for A=1) at a point A? Can we make this circuit in looped that is no ground or lone wire?
How to find direction of a current at any point? I have read and watched the handwavy explanation and I still don't get it. Previously I used KVL/KCL to find out the direction but I don't know how to it here?


texts: Why do solar panels need to be the same voltages when in parallel?

texts:
I have an off grid solar system which I reciently upgraded from 12v to 24v. I have two 12v solar panels which I put into series to boost the voltage to 24v (I will refer to this as a single 24v panel as to not confuse) and then I bought a 24v solar panel and put it in parallel with panel.

Now everything should be 24v and I should be getting lots of amps. However as with all panels they are not exactly 24v they are usually a little higher. Because of this the panels do not make the exact same voltage. One puts out around 30v while the others make around 32v.

Now I understand that when devices are put into parallel the voltages accross the board drops to the lowest voltage however I thought that would look some thing like this:

If I have two panels like so:
10amps @ 30v = 300w
10amps @ 32v = 320w
= 620w

Put them in parallel and the voltage drops slightly
10amps @ 30v = 300w
10amps @ 30v = 300w
= 600w

So yea a little drop but not really a concern. However it seems that this too is not the case. It looks more like one of the panels is not providing any power and instead is drawing a little power from the array. Something like this:

10amps @ 32v = 320w
-1amps @ 32v = -32w
288w

These numbers are generally estimates but I can definately see a drop in amps when I connect up the second panel.

My questions is why is this? How close do the voltages need to be for the amps to stack up and work together? Also if anyone has any information on the theory of why this is that should be great.


texts: How realistic is a 4 ports charging only USB hub mount inside a wall outlet box?

texts:
Here's a concept of a wall outlet variation. It's size of a wall outlet (occupies the same size standard box in a wall) but instead of mains outlet it has four USB ports for charging various devices.

Now this thing would have to contain a power supply that would convert mains AC into low voltage DC and it would have to support all flavors of protocols for fast charging so that ports are not limited to 0,5 amperes.

The problem is such power supply would dissipate quite a lot of heat (like several watts) as by-product and this heat would need to somehow be dissipated which is rather problematic for a device mount inside wall.

How realistic is this setup in terms of dissipating heat produced by the power supply?


texts:
I'm setting the Analog Channel Select bits in the ADCON0 A/D control register. In the data sheet it list "CHS<4:0> Analog Channel Select bits".

In MikroC I write the below to set up my input channel.

ADCON0.CHS4 = 0x14;

What I don't understand is the "<4:0>" part, what does this represent?


texts: Placement of undervoltage monitor and cutoff

texts:
Suppose I have a circuit running at 3.30V, supplied via an LDO regulator (e.g., ADP124), powered by a Li-ion battery. In other words:

Now, I would like to implement an undervoltage cutoff to "turn off the power", because of these two coexistent reasons:

This prevents the load (i.e., microcontroller, ADC, etc.) running at anything less than a regulated 3.30V
Equivalently, this also prevents the battery from discharging to anything lower than 3.50V (i.e., equal to 3.30V + 0.20V dropout) thus ensuring that it doesn't enter deep discharge.

Question 1: Which of the following options is preferable for the undervoltage monitor's sense-LOCATION (i.e., point where it measures the voltage)?

Option 1)

Option 2)

Option 3) Other?

Question 2: Which of the following options is preferable for the undervoltage monitor's switch-ACTION (i.e., the way it implements the cutoff)?

Option 1)

Option 2)

Option 3) Something else?

To me, Option 1 appears best/most-direct for both Question 1 and 2 above, but perhaps I'm missing some considerations.


texts: For Altera LPM_MULT to have registered output, is it enough to set latency to 1?

texts:
It is recommended that the inputs and the output of the LPM_MULT be registered. This will make it possible to achieve highest frequency for the design, although introduce latency.

With latency of 0, there is no clock input for LPM_MULT. However, adding latency of 1 adds clock signal although it does not increase the resource usage.

Therefore, in order to "register" the outputs of the LPM_MULT, do I explicitly register its output in a process that has rising_edge(clk) in it? Or do I take it for granted that the output is actually internally registered when I set clock latency to 1 although the resource usage does not change when latency is 0 or 1??


texts: Justification For Dropping Real Part of s in Transfer Functions, \$F(s)=F(j\omega)\$

texts:
Transfer functions always seem to take the form $$F(s) = F(j\omega)$$
However, going back to the original Laplace Transform used to obtain the transfer function, \$s\$ is said to be a complex number, \$s = \sigma + j\omega\$.
What is the justification for dropping sigma, or the real part of \$s\$?


texts: How actually an integral transformation(Fourier and Laplace) works?

texts:
After seeing a question on one of the posts I got this confusion in my mind. Here I'm not much interested in just mathematical explanation but I would like
to know how a transformation actually turns a time domain signal to frequency domain. And what frequency domain representation actually means.Since the signal say a unit step has 0 frequency.
Is it just a plot of magnitude of signal with frequency parameter or there is more to it?


texts:
I need to calculate battery voltage using my PIC's ADC. My battery voltage is 24V and ADC has a 12 bit resolution, the PIC operating voltage is 3.3V.

I am using the PIC's internal Vref+  and Vref- as reference voltages, ferrite bead (model 1206 ) I don't know the correct value. Why is the ferrite bead used?

How can I calculate the battery voltage using this circuit please help me with the calculation clearly?


texts: How does thermal runaway occur in a battery?

texts:
I've always learned that when a wire or conductor heats up it'll increase resistance due to the free electrons crashing into other vibrating electrons.

So I'm confused how thermal runaway has its resistance decreased, as temperature increases?

If anyone could explain, I'd be grateful!

Thanks!


texts: Is it advisable to exceed the rated currect of a relay for a brief moment, when using it to drive an inductive load (a motor)?

texts:
I am building a relay circuit for pump control with a microcontroller. It is a 1.5 HP single-phase water pump that draws around 13A during normal running and has a starting current that briefly (< 1 second) reaches 25A.
My relay is rated for 20A. The datasheet rates it for over 50,000 operations for steady state currents at about 13A, which is my nominal power draw. Can anyone with experience in this kind of thing provide some insight on the degradation of the relay over time? I expect the relay to accumulate less than 15,000 cycles over 20 years.


texts: Heating a li-ion battery for use in sub-zero temperatures

texts:
I have a design that I'm working on that is to be outdoors year round, with a 1 watt solar panel trickle charging a 6 Ah li-ion battery during the day.

I expect there to be about 3 to 4 months of subzero temperatures during the winter given the local climate.

I understand that charging lithium polymer batteries when they are at sub-zero temperatures is a bad idea, since it will cause lithium plating, thereby compromising the battery's future performance.

So, when the battery is too cold to charge (below freezing), my charge controller (MCP73871) automatically stops charging the battery.

In such a case, I would like to be able to take the solar energy that isn't being used and send it to some nichrome wire i'll have wrapped around the battery.  I'm thinking that some sort of configuration like this would work... any thoughts?

simulate this circuit – Schematic created using CircuitLab


texts: ISIS Simulation "is not running in real time due to excessive CPU load"

texts:
Here is an animation showing the problem in action :

https://gfycat.com/ImmaterialNextGermanshorthairedpointer

I press Play, it works, I stop and play again, it stops working until I remove the connections and plug them in again.


texts: Lightweight (subset) of standard C library (ANSI C library)

texts:
I'm porting standard C library for bare metal "OS" (ARM Cortex-M4, ARM GCC). I want to have functions like strlen, sprintf, (and memory allocator, maybe), etc.

I've ported PDCLib and Newlib.
Newlib isn't lightweight (and try to implement files operations, etc.).
PDCLib is not in active development.

So, I want Microlib exactly. But it's not for GCC and closed source.

Are there some alternatives for this? And are there some "bare metal subsets" of standard C library?


texts:
My Google-fu is letting me down today.

What do PA and PU mean in ATmega88PA and ATmega8-16PU?

If P for PDIP what is A and U, then?


texts: What are the physical phenomena which occur when a voltage is pulled towards a source level?

texts:
Wikipedia's entry on pull-up resistors states that

  A pull-up resistor pulls the voltage of the signal it is connected to towards its voltage source level.

Being that voltage is a measurement and not a physical object, the use of the word "pull" seems to be metaphorical.

However, the sentence also appears to be describing a specific physical phenomenon beyond simply an inexplicable change in a signal's logic level.

What is the physical phenomenon to which the metaphor of "pulling" refers?  (If it is a series of events, a description of each event would be most informative.)


texts: Can someone give me feedback about this adjustable floating voltage reference?

texts:
I am not sure actually with the name of the circuit so excuse me if the naming is not accurate.
What I am trying to make is I want to have an adjustable output voltage whose reference can be adjusted too.
Assuming I have a voltage reference (Vref), I can adjust the output voltage (F4) with respect to its reference (E4) by changing VC. I can also change the reference E4 by changing Vref.
I am planning to do it as an integrated circuit, so this would be a transistor level implementation.
I do not have access to Cadence until Monday so I simulate it with LTSpice.
any feedback or reference would be really appreciated.
To be more specific, I am expecting the feedback whether it is a possible way to build the functionality that I described above.


texts:
I have a battery-powered device using an STM32F107. The device works and I am currently working on minimizing its power consumption.

One of the bigger current draws is the USB subsystem itself, using about 8mA when idle.  The USB is only used for configuration purposes; it is almost always unnecessary to have it enabled.

I am using ST's USB Library v2.1.0. It communicates as a CDC class Virtual COM Port ("VCP"). I'm using the embedded Full Speed PHY.

Upon power-up I want the USB to initialize and be active for, say, 30 seconds.  After this, assuming there is no connection to a host, I want to simply shut down the USB functionality. As if I had never enabled it in the first place.

I don't see anything exposed in the API which would make this possible. There are a few noteworthy functions but they don't seem to be what I need:

from the API template: usbDeInit()

This is intended for custom user code.  However, it is called by the device driver function usbd_cdc_DeInit(), which is never actually called, as far as I can see.
in the cdc_core library: usbd_cdc_DeInit()

This is the file that never is called in the driver source.  It closes the endpoints, then calls the (previously mentioned) usbDeInit() function.  It seems promising; however, it is declared as static in the driver source.  I'm hesitant to change the driver library code directly as this will get overwritten when updating ST's driver in the future.
from the device_core library: USBD_DeInit()

This is called by the driver in a few places, but is empty. That is, the function contains no code at all. Again, I'd rather not change ST's driver source.

My initialization routing looks like this:

// Configure USB Clock Source
RCC_OTGFSCLKConfig(RCC_OTGFSCLKSource_PLLVCO_Div3);

// Enable USB Clock
RCC_AHBPeriphClockCmd(USB_AHB_CLK, ENABLE);

// Initialize USB
USBD_Init(&USB_OTG_dev, USB_OTG_FS_CORE_ID, &USR_desc, &USBD_CDC_cb, &USR_cb);

Of course, if I simply disable the USB clock source then the microcontroller hangs.

I've made sure that the USB_OTG_FS_LOW_PWR_MGMT_SUPPORT switch is enabled in the usb_conf.h file, but the current draw remains. I'm assuming it doesn't go into suspend mode (which, as Ali Chen says, would be the proper solution).

Anybody know how to achieve what I'm looking for?
Is there anything special I need to do at the Host side to tell the device to suspend?


texts: MOSFET as Variable Resistor in High Amp Circuit

texts:
I'm trying to create a variable wattage heater circuit as shown below.  I'm clearly not a trained electrical engineer (simply a hobbyist) so please forgive my crazy idea and general stupidity.  You can imagine R1 as a light bulb or a toaster, or whatever you like.  The goal of the circuit is the idea that you can replace R1 with a heating element with a resistance of anywhere from 0.05 ohms (uncommon), to 0.1-0.3 ohms, and control the wattage of the heating element to be something like 150-250 watts by only partially turning on the MOSFET via a voltage regulator at the MOSFET's gate.

(power is supplied by two high-drain Li-Ion batteries in series.  yes this is a lot of load for these batteries, but yes they can handle it in pulse situations.)

I've built a few prototypes, and as some of you have probably already guessed, I keep blowing MOSFETs.  I've been using a MOSFET which supposedly handles around 200a continuous, which would be more than enough for this purpose, but evidently when the MOSFET gate isn't saturated, the resistance it creates dissipates a ton of wattage as heat.  After a few seconds, the gate breaks down and the MOSFET conducts (like crazy) regardless of the absence of gate voltage.

So my question is, how do I achieve the goal of this circuit?  I assume I could use multiple MOSFETs to disperse the load between them, but the overall dissipation would still be the same, which is unacceptable in a handheld device.

Could I use the rapid switching capabilities of the MOSFET to create perceived adjustable wattage at R1?  Would this solve my power dissipation issues?  I'm just starting to learn about gate drivers, but are they capable of varying switching times with simple input like adjusting a reference resistance via a potentiometer?  Or do they always require an MCU (way beyond my capabilities) to tell them what to do?  What kind of switching speed range would I need to achieve my goals?

I know I can use DC-DC converters to get similar results by adjusting the voltage at R1, but there's virtually nothing commercially available that will handle the necessary amperage and cost less than $500 or so.  Hence the goal of using a comparably cheap MOSFET to control the current (rather than voltage) in a circuit that simply provides more voltage than I need.


texts: Why I can't get twice the input voltage from a double voltage circuit and how I can solve this?

texts:
I'm planning to drive an H bridge with a single 12V LiPo battery. But I thought it must turn off as long as the battery discharges and the H bridge starts to warm up and maybe smoke because of the upper PNP active/saturate states. So I asked here a good way to do this here.

I got the idea of using a 741 op amp to compare 5V (from a 7805) with a voltage divider connected to the battery. I set 11V to be my critical voltage, such that the divider produces 5V when the battery is 11V. With this, my 741 outputs V+ when the battery is more than 11V and V- when it's less. I wrongly assumed V+ would be shorted with 7805 5V and V- would be GND.

The problem is the 741 isn't perfect and outputs around 1.6V less than V+ and around 1.6V more than V-. I'm using the 741 output to turn on and off a BJT that feeds the entire H bridge. In this configuration, both the "on" and "off" output states turn the transistor on, such as V+ = 5-1.6 and V- = 0+1.6

This is undesired. Thus, I must have at 741 output V+ which can turn the transistor on and V- which cannot. To do this, I tried to create some negative voltage with a double circuit inverted to feed the V- 741 terminal, as in this schematic:

This schematic is from an Arduino forum, but my microcontroller is 3.3V logic, so my double inverted circuit is driven with a 3.3V PWM input. I only got -1V with this circuit, and I needed at least 1.6V to have 0V at the 741 output. Thus, I thought I could drive a BJT with my PWM to have more voltage at the double inverted circuit input.

With all this in mind, here are the questions:

1) What are the possible solutions to provide the necessary amount of negative voltage?
EDIT: I have spare logical, PWM, 3V3 and 5V pins besides the battery voltage, which can oscillate between 12 and 11V

2) Can the 741 drive so much current when V- is at output allowing the V- drop to zero and thus have 1.6V at the output when it shouldn't? And with this undesirably turn the BJT on when it shouldn't?

3) In the schematic above, why don't the polarized caps smoke when the voltage is inverted? And what are the desired values for their capacitances?

4) Is there any additional advise or any mistake I'm doing?

PS: All this came from an idea to build a RC car from scratch. Since my low budget and the university IC's, all I can get is the IC's I've mentioned above. Since that, I would appreciate a solution with only the mentioned IC's.


texts: Super Beginner Question on Soldering to a 5v to 12v USB step Converter

texts:
thanks for taking the time to read my question. The real question is on the bottom, the context is super simple stuff that should take 2 minutes to read. Please tell me if you need clarification.

I have this 5v to 12v step up converter
  that will convert my power input from 5v to 12 volt; however, I want to directly solder some wires to this converter. As you see, there are two slots for a 12V Power Output in which I can directly solder live wires to. I want to use this molex cable as a Y-Split connection to attach 2 more devices from the power output on the USB stepup, and thus I want to solder the wires on the molex to the step-up converter.
 .

However; you might notice that at the start of the Molex cable there are 4 separate pins with 2 wires in each pin. My plan was to cut off the molex connector just described (as I want to solder wires directly onto the USB Step Up module), and then solder those wires right onto the 12V power output.

So here is my question: If I cut off the Molex connector by cutting the wires right before, I expose the two wires coming into 4 separate pins. If I want to solder the wires to the 5v to 12v USB Step up PCB (and receive power output) would I first solder the black and black wires together (I know there are 2 black wires going into 2 separate pins so I should ignore one of the black wires, right?), and the red and red wires together, and then solder the now combined red wire to the positive output and the now combined black wire to the negative output?

OR

Should I de-attach the molex cable to expose the the pins that were in the connector  and solder the pins onto the USB step up converter? I feel like the first way of doing it is better as the pins don't transfer electricity, they are only fitting devices so that the wires attach to the molex vs soldering the wire directly onto the converter.

If you have a better way of soldering, please tell me.


texts:
I'm looking at performing a chip conversion for the Sparkfun LED RingCoder. The sample code provided with the product works well on an Arduino UNO, but it uses a pin for each I/O - 5 pins for the shift registers and 6 pins for the RGB rotary encoder. What I want to do is use a 6 I/O Tiny85 instead of a full-blown UNO.

ATTiny85 sharing pins with LEDs, rotary encoder (Swtich / RE A / RE B) and shift registers:

simulate this circuit – Schematic created using CircuitLab

So I would like to re-use 5 of the 6 pins available and delegate between FSM states. That said, it looks like the three RGB LEDs will have to share a line with the shift register data/latch/clk etc.

My question: Will placing an LED on a shift register data line screw the data up?


texts:
I recently purchased this HM-10 board. I can connect to it and everything, so it works perfectly. I ran into a problem, the range is only around 7 feet.

How can I increase the range? I need it to go around 30 feet. Thanks!

Datasheets:
https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf
http://www.pridopia.co.uk/pi-doc/BT4.0-HM-10-Serial_Port_BLE_Module_Master_Slave.pdf


texts:
I'm trying to couple an audio signal from an given Circuit and Output it to a speaker. I have no experience with analog circuits and the circuit I already have is the result of searching the web.

I tried both circuits and I can see on an oscilloscope that there is analog output with both circuits. But as soon as I connect the 8Ω resistor there is no more signal and I can't hear anything.

Maybe someone can explain what I`m doing wrong and it would be very kind if someone explains why it is wrong.

Thanks in Advance

EDIT

Thank you all for your help, all of your answers got me closer to a solution. I changed C4 to a higher value and got rid of the potentiometer and replaced it with a 20R resistor. Also i took a different speaker (from a phone) with 46R. Now I can hear the sound that is carried over the circuit (it is really quiet but it is ok since the speaker is just for testing purposes, it will be connected to the mic-in of a SoC later)

If someone has more information for me I'm thankful for any kind of help :)


texts: What is "Collector-Emitter Sustaining Voltage”

texts: In many transistor datasheets, there is a \$V_{CEO(sus)}\$ specification, what's the meaning of it? Can someone give some explanation or a link is just OK.


texts: How do fireplace direct ignition control modules work?

texts:
My gas fireplace has an electric spark ignition that isn't sparking. I'd like to 'test' it, but I'm not sure what a working one would be doing.

The spark contact has 120VAC with 4A current when I hook up my multimeter from the 'high voltage' to the 'burner return'. I would have thought it'd be enough to cause an arc of sorts, but even when I use probes that are very close together and attached to the terminals, no sparks.

How, generally, do these things work and where might I start in debugging it? Should I expect sparking with that kind of current?

I'm especially curious if the black circular part in the bottom left can be identified (there are no markings on it and I don't even know what kind of thing it might be).

This control module is RAM-1MC1-06, if that makes a difference.


texts: I heard that one can predict the nature (low pass, high pass...) of an active/passive filter just by looking at the filter response in high and low frequencies. How exactly can that be done?


texts: what is the easiest trick to check whether a transistor is used as a switch or current amplifier?

texts:
Newbie in electronics here.

I think I know the basic theory behind transistors.I would like to know based on the schematic how you can know whether the transistor is used as a switch or an amplifier (as far as I know these or the two only things it can be used for). Appearantly you also have ta take into account something called "linear region". Could someone explain how you can mke the differenxe (prefferably using an example)


texts: Degradation of resonant sine wave signal in coil/solenoid after adding second layer

texts:
I have hand-wrapped a couple of air core tube coils/solenoids with 50 gauge wire (0.001 inch diameter). My goal is to obtain a resonant frequency of ~10 khz without the use of a capacitor and to keep the coil length (not the length of wire used) to ~3 inches. The first coil I wrapped is far too fast at a resonant frequency of ~148 khz. I then wrapped another coil but this time completed two layers. For the double layer coil I made sure to maintain the wrapping orientation using the right hand rule for both layers (i.e. the first layer was wrapped over-to-under and the second layer continued this over-to-under pattern). The second layer was started at the end of the first layer and was wrapped back towards the first layers starting point. Both layers are the same continuous piece of wire.
Here is the oscilloscope reading of the coil with one layer:
Works as expected but just too fast. So I decided to add more turns with a second layer and got this (on two separate wrappings of the coil):
Channel 1 (yellow) is just the gate signal for a transistor and is left in the image as it is the trigger for the scope, Channel 2 (purple) is what I'm after. Besides the coil change there is no other change to the circuit or the microcontroller program controlling it. There is a layer of regular scotch tape between the two wrappings. Another interesting point is that after (tearfully) dismantling the first two-layer attempt I had the idea to remove only the outer layer and hook up the inner layer to the o-scope. This "rang" as expected and looked very much like the first image posted here.
On a more human note I'd like to point out that hand winding each coil with such small wire is a process that takes many hours and leads to strained eyes and hand cramps :) Since the length of the wrapped coil is ~3 inches and each wrap only accounts for ~.001 inch of that 3 inches, this process took around 6000 wraps... and this not counting screw ups! If it took less time and effort I would just try the other obvious configurations before coming to StackExchange with blistered, trembling fingers and crossed eyes. But it does take so long and so here I am.
Where did I go wrong?


texts: What's wrong with my C++ Template code for Arduino?

texts:
I'm trying to implement a C++ templated member function in Arduino 0022, but I'm getting an error in code which seems correct to me.

// in Settings.h
template <class T> void save( T variable );

// in Settings.cpp
template <class T> void Settings::save( T variable ) {
  Serial.println("Want to save a variable of size " + String( sizeof(T) ) );
};

  // compiler (linker) output
  TimeMachineArduino.cpp.o: In function SimpleScreen::left():

  SimpleScreen.h:85: undefined reference to void Settings::save<int>(int)

  SimpleScreen.h:86: undefined reference to void Settings::save<double>(double)

  SimpleScreen.h:87: undefined reference to void Settings::save<char>(char)

The SimpleScreen::left() function is where I'm implicitly instantiating the template functions (by calling save on an int, double, and char).


texts:
(https://i.stack.imgur.com/fpWP4.jpg)
What is Waveform of current in rl series AC circuit when operated for first time i.e. from time t =0?
Is it 0 from 0 to 90 degree