texts: Spot welder: High current advantage over high voltage

texts:
I've looked several of these "DIY spot welder" videos on Youtube, such as this:

https://www.youtube.com/watch?v=hTaGa93lOGU.

We have a much larger number of turns on the primary than on the secondary. Then we connect the primary to an AC voltage, say 240V and a small resistance load on the secondary (or we short it).

I have found several explanations for what happens and they all say that as the voltage is stepped down on the secondary, the current is stepped up accordingly. The voltage on the secondary is now only a few volts, but the current can be up to kiloamps. This high current generates high heat which melts the metal (the secondary load).

But shouldn't the power be the same? The power is the product of current and voltage. Because of conservation of energy, as the current is stepped up, the voltage is stepped down as the product stays the same.

In the opposite case where we step up voltage I can understand what's going on by looking at the transformer model:

If the secondary coil number gets higher, the current to the R_s branch gets higher. So even though the current is stepped down, the power used becomes higher as we are "pulling" more current from the supply.

But what happens when the current is stepped up? If the primary has more turns, it would seem that the ratio N_p / N_s is higher and the current to the R_s branch is lower.

Could somebody explain to me what is it that I'm misunderstanding? Why is it better to step up the amperage, rather than just use the input AC voltage or step up the voltage instead of the current?

EDIT: A lot of the answers state the relation between current, resistance and power:

$$P = i^2R$$

But we also know that the voltage across a load is also a function of the current, by Ohm's law:

$$V = iR$$

So if we have a high current, we should have a high voltage as well. Now Ohm's law and transformer seem to disagree!


texts: What is the purpose/function of this power inductor in parallel?

texts:
The inductor in question is part L3, a power inductor with both coils in parallel. Datasheet.

The complete circuit is the power supply for an RFID reader, where +5V_A is the output for the antenna drivers and +5V for more general purpose stuff.

The question: Why use a "power" inductor in parallel instead of just a "normal" inductor with 22uH @ 100kHz as the datasheet says for this one in parallel configuration?


texts: What is the function of "Picture tube charger"?

texts:
There is a bizzare device called picture tube charger or CRT-Charger.
Here I attach the some diagrams of it from a circuit-book.

Now, what is its function? what changes it create inside the CRT?

such- as, Is it a method to reverse the metal-evaporation from CRT-electrodes? or is it a method to increase the electric conductance of the low-pressure-gas kept inside the CRT? or something else?

Also, What is the principle behind automatic turning-off of the larger-bulb and glowing-up the small-bulb at completion of the so-called rejuvenation process? (though in these circuit-diagrams there is no mention of any automatic timer-circuit, and as-if it is implying the picture-tube changes its electrical behavior at the end of that rejuvenation process)


texts: Shunt regulator - smaller output voltage than the reference voltage

texts:
I have a Zener's diode with \$V_Z\$ of \$5.6V\$, an op-amp, NPN transistor and an input voltage pulsating from 14V to 17V. My task is to design a circuit with a stable \$2.8V\$ output voltage - and I kinda can't figure out, is it possible to have a regulator with an operational amplifier that will produce a smaller output voltage than Zener's (i.e. reference) voltage? If yes, then how would this circuit look like?

Assume that \$I_{Zmin}=5\text{mA}, \ I_{L} = 50 \text{mA}, \ I_{Cmax}=100\text{mA}, \ \beta=400 \frac{A}{A}\$


texts: How to measure micro and nano amps via microcontroller

texts:
The objective is to build/construct a circuit powered by an ATMEGA32 IC, using C++. This circuit will essentially be an ammeter for small current levels (10-6 and 10-9).

I've done some basic points from reading the forums:

Assign on or the ports of the IC to the purpose of being an ammeter
Possible current control via a hall effect sensor and MOSFET
Op-Amp used for the voltage regulation as an alternative without the need to develop a control system PID for it.
The output will ideally go to an LCD screen displaying current measurement as it is connected with a circuit.

Any pointers that can help me on my way?

Many thanks


texts: Does there exists "3 state" relay switch, with 3 input pins?

texts:
Normally relay has 5 pins: 2 control pin (signal and ground), 2 input pins, and 1 output. If there is voltage on control pin relative to grounded pin output is connected to first pin, if there is no - to second.

I wonder does there exists relay with 6 pins and 3 inputs, so that

- if positive voltage presents on control pin => output is connected to first input
- if no voltage (grounded) => output to second input
- if negative voltage => output to third


texts:
I am trying to saturate a transistor , a BC547 A , but I am having a hard time figuring out something.What hFE should I use to compute the base and collector current to make it turn on fully?

Here is the datasheet


texts: Interfacing HD44780 compatible LCD display and Spartan 3 FPGA

texts:
I've recently bought HD44780 compatible LCD screen (16x2) from eBay. I want to use it with my Spartan 3 FPGA development board, but after I've thought a little about it, I'm not sure that I can use it.

The main thing that's bugging me is that the display that I've bought works on 5V, and all Spartan 3 I/Os can work at max. 3.3 V. So is there any way to use Spartan 3 and this display ? Is it possible that it will work with 0V and 3.3V as logical levels (or does it require TTL levels) ?

I don't have datasheet for it, so I'm not sure. I've searched it physically for some marks, and I've only found this: "1602ZFA", but when I google it, I don't get anything good.

I've also asked the seller to send me datasheets, but I think he sent me wrong ones ...
Here's what he sent me:

I have only 16 pins on my display.

So, is there any chance that I can use this display with Spartan 3 FPGA ?


texts: Is this circuit for Piezo Transducer and corresponding resistor values correct?

texts:
I want to drive this piezo transducer (https://www.mouser.com/datasheet/2/670/cpt-9019s-smt-1310960.pdf) at 3V and 4kHz with STM32F0 microcontroller. This is a follow-up to my previous question (Is this circuit for Piezo Transducer sufficient?). Since then, I've made some progress and come up with this circuit:

simulate this circuit – Schematic created using CircuitLab

R1 is to limit the amount of current the microcontroller pin draws and R2 is to discharge the speaker when there is no output to the speaker (since it acts like a capacitor). The MCU can draw a max of 25mA of current, but the speaker only uses a max of 5mA when driven at 3V and 4kHz. So I will limit the current draw from the MCU to 10mA. This gives i_c a value of 10mA and R1 a value of \$330\Omega\$.  (R1 = \$\frac{3.3V}{10mA}\$). Since the speaker draws a max of 5mA, i_s = 5mA and i_b = 5mA. The schematic with the values plugged in is:

simulate this circuit

To determine R2, I know I want 3V to be applied to the speaker, so the voltage drop over R2 will be 3V. Using Ohm's Law, \$R2 = \frac{3V}{5mA} = 600\Omega\$.

My two main questions are:

Is this circuit fundamentally correct to drive the transducer?
Do the values for resistors R1 and R2 make sense or am I overlooking something?


texts:
I have no idea how to solve the following exercise, can you help me, please?

Find the periodic function whose Fourier coefficients are

$$C_{k} = \frac{sin^{2}(\pi k T)}{(\pi k T)^{2}}$$

I think that this function is a definition of sinc ...


texts: Transient Voltage Suppressor (TVS) Diode Array

texts:
I am having a hard time understanding this logic. Please bare with me if my question is very basic. I would appreciate if someone can explain what is happening?

If I look into any typical TVS IC data sheet, I would see a similar design to the following:

For example the above is the circuit for SRV05-4.

I can understand what happens in general, but not the details.
For example, pin 5 is usually tied to a 3.3 voltage source on the board. And pin 2 is obviously the ground. And, pin 1,3,4,6 are the input pins.
The first question is that I know if we apply let's say a huge spike of (-20 V) on pin 1, then the lower most left diode will protect it by pushing it down to zero.
But what happens to the huge voltage spike? Shouldn't the diode have a forward bias of about 0.7 volt? So, what is exactly happening? How does this -20 volt being taken care of? What is the voltage drop across the diode in such case?

And, more importantly, how come there is only Zener diode in one direction and not the opposite direction? My guess is it is there in case if the voltage on pin 5 suddenly rises for some reason, and it will clamp the voltage. But what about a case that it suddenly falls to a very low voltage? Shouldn't we have a protection on the other direction as well? How come they see it as a possibility for voltage on pin 5 to rise very high, but not to fall very low?


texts: DC-DC regulator what is and when to use FPWM variant

texts:
Hello i am planning to use LMR36520 and noticed that it comes into 2 variants a Forced PWM version and a non Forced PWM version
What is this Forced PWM and when do i used a Forced PWM version of a DC-DC converter


texts: Do I need to supply IPC documents to PCB fab house?

texts:
I would like to have a PCB design manufactured and plated with an ENEPIG finish. I have found a fab house that states they can perform ENEPIG finish and their site lists the plating option as one that is available. I asked said board house if their ENEPIG plating adheres to IPC-4556, which defines the plating process. They said that I would have to send the IPC-4556 document if I wanted it to adhere to it.

I have only worked with a couple of board houses in the past, and have never had to supply IPC documents for plating. These requirements were always met without question. Is requiring the customer to supply IPC documents common protocol in the PCB manufacturing world?


texts: USB charger - tell the phone it can draw more power

texts:
I have 8A 6port usb charger. It has two ports marked as fast charing, and the phone here actually charges faster than in the two other ports. When I dismantled it, all the USBs were on the same power line, so the charger is definitely somehow telling the phone how much current can it use.
There are bunch of resistors around the ports, looks like connected to the data pins, but I will have to desolder the USB's to see how they are connected, as most of the paths are on the PCB covered by the ports.
I would like to be able to make the third port also fast charge (don't worry, I know there are current limitations and the other ports are used for handsfree and smartwatch cahrging which takes ~500mA, and as the phones draws ~2A, it will still be in the power source's limits). I tried to find a schematics for the resistors connections, but only thing I was able to find is about how it's done for Apple and tons of articles about quickcharge with no tech specs.

Only thing I need is to tell Android phone it could draw more than 1A from the USB. I'm also going to build charging station from PSU (5V 30A) and here I would also want to tell the phones that they could draw more power.
Thanks for any help.


texts: New Amazon music streaming service and Nyquist sampling theorem

texts:
I read this story on The Verge the other day,

  “It’s a better bitrate, better than CD quality,” said one of MBW’s sources, indicating the new service will put Amazon in direct competition with Tidal’s $20-a-month hi-res streaming tier. Tidal is able to offer these “Master” quality recordings, thanks to a partnership with hi-res music technology company MQA, although Amazon is reportedly intending to offer a better bitrate than CDs without a similar partnership.

I'm a bit confused about this. Based Nyquist's theorem a sampling rate of anything greater than 40 kHz should be enough to reproduce a signal that has a bandwidth upto 20 kHz, which I assume is 99.999% of the listening public.

Given that CDs are sampled at 44.1KHz, is it fair to assume that CDs carry the best possible audio quality discernable to the human ear?

If yes, then isn't this just a marketing gimmick?


texts: How to store the last counting value in EEPROM in ATmega8 after power failure

texts:
I written a program to store the last counting value according to ATmega8 datasheet. but it didn't save the last value. The counter variable went to zero after power failure.
Please check the following code.
#define address1 0x00
#define address2 0x02

//***********************************************************************//
void EEPROM_write(unsigned int uiAddress, unsigned char ucData)
{
/* Wait for completion of previous write */
 while(EECR & (1<<EEWE));

 /* Set up Address and Data Registers */
 EEAR = uiAddress;
 EEDR = ucData;
 /* Write logical one to EEMWE */
 EECR |= (1<<EEMWE);
 /* Start eeprom write by setting EEWE */
 EECR |= (1<<EEWE);
 }

 unsigned char EEPROM_read(unsigned int uiAddress)
 {
 /* Wait for completion of previous write */
 while(EECR & (1<<EEWE));
 /* Set up Address Register */
 EEAR = uiAddress;
 /* Start eeprom read by writing EERE */
 EECR |= (1<<EERE);
 /* Return data from Data Register */
 return EEDR;
  }

 //**************************************************************************//

  int main(void)
  {
   lcd_init();
   init_timer1();

   while(1)
    {

    EEPROM_write(address1,second);
    last_value=EEPROM_read(address1);

    sprintf(lcd,"Timer:%03d",last_value);
    dis_string(0,0,lcd);
      }
    }

    void init_timer1(void)
    {

     TCCR1B |=(1<<CS12); // prescaler set 256;new freq=31250;
     TCCR1B |=(1<<WGM12);  // 8mhz/256=31250; count in 1 sec
     TCNT1=0;
     OCR1A=31315; //this amount of  tick count in 1 sec;
                  //after counting an interrupt generate;
     TIMSK |=(1<<OCIE1A);
     sei();
     }

   ISR(TIMER1_COMPA_vect)
   {
   second++;

   if(second==60)
  {second=0;
   minute++;
     }
   }

Can anyone help me. need to solve urgently.
Thank you


texts: What is the physical meaning of integrating the output characteristic of a MOSFET?

texts: If I integrate the output characteristic of a MOSFET, calculating the surface area under the curve \$I_{ds}\$ - \$V_{ds}\$ at constant \$V_{gs}\$, what will be the physical meaning of the calculated value. Is it used power? dissipated power?...etc


texts: What things to think about when selecting a relay for controlling small valves?

texts:
We are creating a novelty drink dispenser that controls a set of 8 pumps with a Siemens Simatic Step7 1200 PLC. The decision to use this PLC was based on our need to have a very stable prototype.

Now we are nearing a stage where we are going into mass production, and the PLC feels like overkill. It has many features that we don't use and it costs a lot. We would like to replace this with a simple relay-card.

We have limited experience with making electronics and we will most likely use a professional service for the development and production of this card. However given the importance of this card for our business, I would like to ask some general advice here first.

For example, what are the most important things to think about when selecting a relay for controlling small valves, and what features should we know about in a valve that can make our product better?

Of course, we want them to be able to open/close as many times as possible without failing, and when failing, never failing in an open state. Also if there is any way to detect wear/failure that would be awesome.

For reference, our valves are 24VDC 5W solenoids.


texts:
See this page.

Is this OK? I know that Pb-based solder is extremely creep-sensitive, so you don't want any force exerted on solder connections. That's why heavy components (think transformers or components mounted on a heat sink) should always have a mechanical fixing (screws) apart from the solder connections.

So for me it's a no-no. What do you think? Do other solders show less creep?

edit (re Fake's comment on snap-in)

The snap-ins seem to be hooked pins which hold the bar in place (during soldering), as there are also soldering pins:


texts:
In a power plant, what keeps the power at a solid 60hz? It seems like turbines can't always be running at the exact same speeds, given that combustion doesn't always give the exact same temperature (my dad works at a waste to energy plant, which is why I say this).

Also, just for giggles, what would happen if AC power at a different frequency accidently got released into the lines?


texts:
Working on an enclosure in which there will be low voltage high precision circuitry (my area of more experience) coexisting with fairly high current (~15A) 120VAC load wiring (my area of less experience).  Would be it be advisable to twist those AC wiring pairs which carry equal + opposite currents to reduce the amount of field radiated from these wires?  Or is it considered sufficient just to route them together side-by-side?

Obviously I don't care about the susceptibility of the mains wiring, only its emission and the susceptibility of the low voltage circuits.  Never seen this done before but don't work with mains powered devices much.  Don't want to reinvent the wheel or do something dumb / non-standard so anyone's experienced take would be appreciated.


texts: Is it safe for micro to switch pins from input to output in a loop?

texts:
I'm trying to make use of a keypad that I took out of a phone which has 3 columns and 4 rows. I've traced out the schematic on its PCB and figured out a way to drive it that I think might work, but I'm not sure whether it's safe for the microcontroller (it's a teensy++ 2.0 in this case, but I think the answer would be the same for most AVR microcontrollers).

The way the keypad works is that it has 3 pins out for column 1,2,3 and 4 pins out for rows 1,2,3,4 when you press a button to completes a circuit between the row and column that the button is in.

So the circuit I designed would work like this: I have 3 output pins connected to the columns and 4 input pins connected to the rows. I would cycle through the columns putting a high signal and then reading the rows to see if any button was pressed.

I realized one safety issue with this design which is that if you hold down two buttons on the same row, there would be a short between two different columns and since one was set to output high and the other output low that could create an overcurrent condition (like it described in http://www.ruggedcircuits.com/10-ways-to-destroy-an-arduino).

To resolve that I had the idea to make the column output pins actually input pins when they're not being used to output a high signal - and adding pull down resistors to my row input pins. What this would mean though is that I'm flicking the pins between input and output mode in a loop that repeats every 15 ms (since I sleep for 5 ms between polling the columns).

  Is it safe/healthy for the microcontroller to switch its pins between input and output in a loop of about 15ms? or could this circuit be made safe in a different way?

I would also really appreciate any links to pages that describe which basic circuits with input/output pins are safe and which aren't.


texts:
I would like to use an IR transmitter/receiver pair to detect when an object obstructs (or does not obstruct) the path between the the transmitter and receiver and illuminate an LED when the path is not obstructed. Initially, using an input for each of the IR receivers and and output for each corresponding LED would work, but IO would quickly limit the size of the project. Ideally, all (or almost all) of the IO would be configured for input to detect the state (high/low) of the LED circuit.

I was thinking about using the IR receiver to open/close the gate on a MOSFET that then powers the LED and measure the voltage on the drain side of the MOSFET via the microcontroller input.

However, the data sheet for the IR receiver suggests a PWM signal output from the received signal. (https://www.adafruit.com/product/157)

Would this signal cause issues with keeping the gate open/closed, or is the pulse width small enough that the gate would remain open/closed? If not, would there be a simple circuit/device that would solve the issue? Or maybe there is an "IR signal detector switch" that I am unaware of.

TIA


texts:
Regarding different types of std_logic in VHDL, there are little information about the real differences among some types.

TYPE std_ulogic IS ( 'U',  -- Uninitialized
                     'X',  -- Forcing  Unknown
                     '0',  -- Forcing  0
                     '1',  -- Forcing  1
                     'Z',  -- High Impedance
                     'W',  -- Weak     Unknown
                     'L',  -- Weak     0
                     'H',  -- Weak     1
                     '-'   -- Don't care
                   );

Why there is a need for WEAKs? What is the difference between - (don't care) and U? Is there any example that shows why WEAKs are necessary? In which situations should someone use them (or -)? When does X occur? A minimal example should clear that.


texts: Where can I find more information on this mysterious IC? (V100 ZJ51VMP)

texts:
I'm trying to identify this logo/part, I've searched combinations of the letters that appear on it as well as IC manufacturer logos and didn't have much luck.  At one point I was pointed to a "display processor" site but I can't seem to find it again.  Here is the image:

There is a USB port with the power pins running to this chip.  I supplied 3.3V with my programmable power supply, it appears its is drawing about 300 mA.  The display turns on, displays a lightning bolt graphic/animation, as if the battery is charging, and that's it.

Other info: A rather unique device was turned into lost and found and no one has claimed it, so it was turned over to the hardware lab to properly dispose of it--but I'm curious, what is it?!  It is a device that has a lithium ion battery, some push buttons, a small speaker, a panel display (HYB070HD), and a 2Gb NXP RAM component. None of it is in an enclosure, rather its a circuit board glued to the back of the display with the push buttons dangling by wires soldered t other.


texts: Voltage regulator for 0.1mA load, with lowest possible power draw

texts:
I want to make a circuit that will provide 2.05V regulated DC from the li-ion battery voltage range of  inputs (3.3V - 4.1V).

The load is almost nothing, approximately 0.1mA. However, this regulator must be extremely low-power-draw, ideally not drawing more than 1mW.

Any suggestions for the simplest possible circuit that can accomplish this?


texts: LT SPICE Simulation Error OPA1664 and AD8067

texts:
I simulated  circuit which consist of a trans impedance amplifier ,some multistage amplifiers and filters.In my first circuit TIA used is AD8067 and for other parts I used TL074 op amp from TI.This circuit was working perfectly in LT spice.
After this I replaced TL074 with OPA1664 and TIA remains the same.But for this circuit I am getting an error as shown below.

Singular matrix:  Check nodes d:u3:u2:1#int1 and u1:13
   Iteration No. 2
Fatal Error: Singular matrix:  check nodes d:u3:u2:1#int1 and u1:13
   Iteration No. 2

Circuit diagram and screen shot of error file are attached along with this mail.

I connected a 1GIG Resistance from non inverting point to ground.But the problem still exists.

I am attaching the circuit files along with this mail.Circuit 1.Its op is connected to ip of circuit 2.

I connected a 1GIG Resistance from non inverting point to ground.But the problem still exists.
I am attaching the circuit files along with this mail.Circuit 1.Its op is connected to ip of circuit 2.


texts: Why MOSFETs in Battery Management System are connected to negative terminal?

texts: I have seen that the MOSFETs and current shunt resistors are connected to the negative terminals of the battery or the BMS. Is there any specific reason for this? Why aren't they connected to the positive terminal? If BMS can connect or disconnect the battery from the load then why not control the flow in the positive terminal?


texts: Converting momentary button presses to states

texts:
The goal is to implement a circuit in hardware with 2 inputs (A, B) and 2 outputs (A On, B On). An input (button press) toggles it's respective output, but also turns off the other output.
State diagram:

I've tried modifying a T-flop solution from the related question, but I can't get it to work.
Related to:
Make a momentary switch control a toggle
EDIT:

By a button press I mean a transition (positive or negative)
To clarify the states:

'A On' means A is on, B is off
'B On' means B is on, A is off
'Off' means A is off, B is off

Off is the initial or reset state


texts: Powering microcontroller with a capacitor

texts:
I have a ESP32-SOLO-1 microcontroller mounted on a moving part of a machine which moves in a circle. The idea is to power it with a capacitor and then charge the capacitor in a fixed location when the MCU/capacitor part comes around (for example via some sort of sliding contacts connected to a power brick.)
The main problem is the charging of the capacitor, as it has in the current configuration around 0.14 s to charge and it has to last about 8 s with a load of 0.04 A at 3.3V until it charges again (except the first time it goes around the MCU has to boot and it requires 0.1 A for about 1 s.)
I used so far a 0.47 F supercap with a rating of 5.5 V (here the datasheet.) I already had with a MCP1700-3302E-TO voltage regulator to have a fixed 3.3 V output. The cap has an ESR of about 16 ohm which in my understanding is far too much for charghing it in such a short time.
My idea was to use this capacitor --> 0.033F 25V and a very low ESR (0.027 ohm in the datasheet) charged with a 24V power brick and power the MCU with a DC-DC converter (this) that outputs 3.3 V.
What are your thoughts on this? Am I completly wrong or could it work? Do you have any suggestions on how to make it work?
EDIT: The MCU evaluates and sends data from a Hall sensor, which is used to mesure the distance of a magnet. So I would rather not have electromagnetic interference and therefore use "touching" parts. Also the goal is to avoid if possibly using a battery.


texts: I would like to build a very simple, circular wooden platform that rotates automatically - no stopping.  The torque is not very important, as it doesn't need to support much weight.  As far as rpm, not too fast, but not incredibly slow - about the pace of a fast escalator?  That's the only comparison I can make.  It's for an art project.  I know this is probably an easy one for most people, but I am starting from square one.  Thanks for any help.


texts: How do I go about building a charger circuit?

texts:
I am working on robot, and I want it completely automated. Everything I can tackle, except for when it comes with power. (Pretty big problem, I know.) I want to know how I can make a charger circuit that can charge (a) battery(s), have a light or something when it's done charging (all I need is a way to check with my microcontroller, Arduino, of coarse!), and then also be able to supply power to my device while charging so it can still perform tasks like organizing data, etc, or waiting to get a signal to "dispatch" itself. I know a fair amount of electronics, but I'm no expert or anything like that.

Basic Power Requirements (Voltage, etc.):

I need around 8-12 V output from the battery, lets say up to 750 mA to 1 A at a time, and have about 2-3 hours without a charge.

How should I get started: (I know this is a broad question but it still can be answered with recommendations and previous experience.)

Should I do lots of low-voltage batteries or fewer higher voltage batteries? I would think that lots of low-voltage ones would provide more instantaneous current, but how would you put them in series with charging?
How should I handle safely charging? Should I have power bypass the batteries while plugged in to prevent tons of current being drawn through them?
Is there an affordable (I'm on a tight budget) breakout board or similar that would satisfy my needs? I cannot find anything on Google.
How would I go about efficiently handling step up/down voltages without loosing lots of power but still using the most out of the battery as possible?

What's the best approach for my needs and can be very cheap? What types of chips are there for my needs? I have seen a few ICs that manage voltage and current, but how would I match that up with a battery?


texts: key switch rated 220v 1A is it OK to use 12v 3A

texts: I'm in the process of designing a actuator lift for the drinks cabinet and I want to use a key switch to stop the kids getting in. The only ones I could find are rated 220v 1A. The actuator is 12v 3A. I did physics so I know the power is 36W vs 220W but I did not take the electronics module and just need to know if this is safe.


texts:
As you have asked me, I will explain in better words my problem.
I'm working on real-time bench. I have an algorithm on my laptop and I interact with hardware through a calculator supporting real-time testing.
My main goal is to test things and see how they work in different situations.
I have a tank filled with a liquid. I have a heater which is a resistance that drains maximum 7.08A at 12V. The ambient temperature and the heating temperature , in my algorithm, are inputs or outputs for 2 other less powerful heaters and a pump. The idea being that my pump, by varying its speed, changes other variables (like temperature, pressure or level in the tank or in the line) and those variables change the input of the heater and how it behaves. Or by changing some sensor signals in my software, making the heater behave differently. That's what I meant by "varying a lot".

Now, my problem is that the heater that I want drive drains more current and is more powerful than the output of my calculator can afford. My PWM output pin can give 5A and 12V signal which is not enough for my heater. So I thought about a DC power supply which is able to give the heater the right amount of power, that takes the PWM outputted by my calculator and drives its own DC voltage output with it to bear with the heater voltage or current variations.

Finally, my question is : Is this idea feasible ? Can I solve my problem with a different way ?

Thank you for your time and have a nice day.

Landau


texts: Power dissipation when connecting LED to +-15v

texts:
In my audio project that is powered off dual +/-15v rails, I would like to connect a simple LED indicating power on. However, when I connect it with a 1.5k resistor in series (2W), the ~28V dissipated as heat are excessive and the resistor gets very hot (too hot for touching).

What is the best way of dealing with this? Should I use two larger value resistors in parallel with each other so they share the heat? Should I connect it just between + and GND instead of between + and -? Wouldn't that put a imbalance in my rails used mostly for op-amps?


texts: NFC tag antenna detection without a NFC chip

texts: hope that you are good. I need to build an application to detect NFC antenna without NFC passively power chip. As we know that we can detect NFC tag by power the NFC chip inside this tag then it broadcast its ID to the mobile using NFC data transmission field. So, what about if I bulid an antenna with some kind of load such as resistor by this I can detect that there is a power drain caused by the NFC adapter in the mobile. As result i will be able to detect that there is a NFC antenna in the back of the mobile. Any ideas please. Thanx in advance.


texts: How to obtain clock signal from crystal oscillator?

texts:
I got myself a 3.579545 MHz quartz oscillator. However, I would like to use it as clock source for another chip (for example the YM3812 needs this clock rate).
The piece has just two pins. How do I connect them with voltage source, to obtain clock signal of this specific frequency?


texts: Sedra and Smith - Common Mode Input Resistance

texts:
So in Sedra and Smith, it is stated that the common mode input resistance of a differential amplifier is

from the diagram(s)

So it is stated in the book they have used the diagram on the right (equivalent common-mode half circuit) to prove 2Ricm. I've tried to prove this, and I've gotten about half of the equation, with the other half being a function of re (which is not in their answer). Would anybody be able to help me prove this and show the steps involved?


texts: Small-signal operation of the BJT differential pair

texts:
This is a solved example from the textbook, but I I don't understand how VBE1 and VBE2 were obtained. like why VBE1=VBE+Vid/2 ? I know about the voltage difference but why is it positive here and negative for VBE2 ?

Thanks


texts:
I have been tasked with designing a low power sensor system and the customer has decided location would be a great option. I have done GPS before but only with complete modules (Ant. + IC). To keep costs down I was looking at basic GPS Receiver modules such as the SE4150L-R by Skyworks Solutions and adding a chip or ceramic antenna.

My concern is the external SAW filter and antenna matching network. I'm assuming for the antenna line and network there the board should be 50 Ohm controlled. The biggest problem is I lack a network analyzer to check the board. I'm concerned that with a cheep fab, over time if the FR4 changes or with component tolerances that even if it works now, will the 1000th one work?

Does anyone have any experience using GPS RX modules and can input how it worked out for them? Or any suggestions such as stay far away from this RF black magic?

Please don't think I'm ignorant, I have done basic RF work in the past, but this GHz stuff at-least from what I hear can be a different animal.


texts: Current loop transmission using 3 - wires

texts: Is it possible to transmit 4-20mA signal using 3 wires without external power supply (using the loop power supply)?


texts: In a non-magnet, excited-coil generator, what percentage of the generator's total output is used to excite the coil?

texts: I am building a DC permanent-magnet generator with the magnets in the rotor.  The stator coils are my unique winding.  The overall efficiency of the generator is measured with a digital torque meter on the input shaft, and checking electrical output on the other, for an efficiency rating of around 95%.  To be able to compare this to off-the-shelf generators, I need to know how the efficiency rating for an excited-coil generator is derived.  I was told their ratings were only on the coil and not the entire unit.  Does anyone have this answer?


texts: Capacitor as filter, physics behind choice

texts:
I am tapping into the output voltages (signal wire) of various sensors on a vehicle, and I would like to use decoupling capacitors to filter out noise.

As others have stated, a rule of thumb is to use a 0.1uf and 10uf capacitors.

My question is related to how the 2 capacitors work together. Based on what I put together, the capacitors have a very high impedance at certain frequencies (or ranges) and therefore block them. I found a 10uf cap and a 0.33uf cap datasheets  with plots of frequency vs impedance (had difficulty finding a 0.1uf plot.)

I think the best way to phrase my question is this;

What happens if I use the following 2 capacitors in parallel (10uf and 0.33uf) for noise filtering a DC analog signal with an approximate noise frequency of:

10Hz
0.001MHz
0.8MHz (corresponds to min impedance of 0.33uf cap)
6MHz (corresponds to min impedance of 10uf cap)
5) 100MHz

EDIT: Bad question, i need a low pass filter and not decoupling capacitors. At-least now i know about Anti-Resonance in case i need it in the future.


texts: Do manufacturers try make their components as close to ideal ones as possible?

texts:
I was wondering what developments are done on electrical components today.

Do manufacturers try to make the electrical components they sell as close to the ideal model as possible? So for example, is the goal for their fixed resistors to behave according to Ohm's law for the widest range of voltage values and frequencies? Or are there benefits to non-linear behavior that differs from the ideal model in some use cases?


texts: Isn't conventional current supposed to go from high potential to low potential ? If yes, then why this rule is not respected in opamp using AC?

texts:
First, thank you for reading my post. I'm a beginner in electronics. I learned that conventional current goes from high potential to low potential. It has always worked for me in DC and even AC. But recently, i did see this rule being violated in AC, which i think is  impossible...right ? To give you an insight, i have to tell you that i'm working with opamps. Here is how i see current direction in a non-inverting opamp configuration:

In part A, the output is amplified by a positive gain but because the input is negative, the output becomes even more negative. So, at that moment, the lowest potential in the circuit is the ouput, then we have the inverting input of the opamp that is at same potential as the input, and finally the ground being at 0 volts is the highest potential. So conventional current would flow from ground to the output of the opamp(vice versa for part B). You can see why on the following graph :

So i tried it on Ltspice:

no problem it works. Current going through R1 gets positive and negative [-5mA:5mA] (so goes in the both directions periodically, so this is AC) :

When i add an offset as such:

Output is always greater than the input, current is then only positive [0:5mA]( so it's DC), so it works:

But when i try to add two capacitors in parallel with the two resistors (in the feedback) :

I still have the output always greater than the input, but this time, the current passing through the capacitors path is alternating between positive and negative :

Although, i have to note that because i did apply a DC offset at the input of the opamp, i have to provide it a path at the output for the DC current to pass through (the resistors path is doing that, just by looking at I_R1 we see that the current is always positive, so that's DC current).
I also understand that capacitors block any DC current so if something has to "pass through", it has to be alternative current. But still, think about it, i always have a greater electric potential at the output than the inverting input of the opamp, so current should flow from output to the inverting input of the opamp and then to the ground. So, it should be a DC current passing through the resistors only. But then it would mean that there is no voltage drop across the capacitors (since no current supposedly pass through the capacitors) which is impossible because we all know that the voltage drop across the capacitors are the same than the respective resistors because they are in parallel..
So.. Has the rule "Current goes from high potential to low potential" been violated ?
PS: Sorry for the long post and thank you for your precious time !
Edit : Here is the sum of the current I_R1 and I_Cact1


texts: Trying to build a single tone guitar tuner. Will my circuit work?

texts:
I am pretty much an amateur in electronics and this is for a university project. I'm designing a single tone guitar tuner. So let me list out my stages,
1) input(i've set it to 196Hz(G note)
2) passive low pass filter to remove noise(im trying to simulate a real life condition)
3) common emitter amplifier to amplify my input
4) a) low pass filter to allow frequencies lower than my desired freq to pass through
   b) bandpass filter to allow my desired frequencies to pass through
   c) high pass filter to allow frequencies higher than my desired  frequency to pass through
Note: I'm only using first order filters due to a lack of components. Would this be an issue since there will be a slower transition from pass band to stop band?
5) comparator stage-(if for example I play a freq lower than what I want(196Hz), input voltage will be allowed through the low pass filter and therefore produce an input voltage(non-inverting input of the comparator) and output a voltage Vp(5V). And since the input is a sine wave, the output will be a pulse. I'm assuming since the frequency is very low, it will be fast enough to light up the LED without seeing the effects of flashing.

I haven't figured out the values to set for each component yet which is why I don't have any graphs to show yet. But I need to know whether my general concept would work or not. Note that there is also a limit to the number of components that I'm allowed to use and I am also only allowed to use a single value for the voltage source(excluding the input). I will post a screenshot of the schematics and also the requirement limits for my project. I forgot to mention that I am also exceeding one capacitor right now and I'm not sure how to remove that.

This is my first time posting over here, so I hope I'm following the right format. Any help would be much appreciated. Thanks!


texts: High open-circuit voltage in isolated push-pull SMPS?

texts:
I'm developing an isolated push-pull SMPS. I am attempting to transfer power through a custom center-tapped (on both primary and secondary side) transformer, stepping down from 20 V to 4 V. I am trying to cap the voltage on the secondary side at 4 V, and have been trying to do so by using turns ratio alone (5:1).

What I'm noticing, however, is my open-circuit voltage ends up being higher than what it should be given the turns ratio (for example, even after modifying turns ratio to 10:1, I would often see steady-state voltages in excess of 7 V when I'd expect ~2 V).

As I start adding resistive load, secondary voltage starts to pull down to the turns ratio, so it seems to have some dependence on current flow or lack thereof on the secondary side. What's going on here, and how do I fix it?

My best guess is maybe this is related to stray inter-winding capacitances and/or secondary leakage inductance but a) that's just a guess, and b) I don't know what to do about either in this case.

I have some sensitive devices on the secondary side that cannot tolerate more than the 4 V I'm trying to limit to, even at low- to no-current. I also cannot employ a linear regulator or zener diode on the secondary side to cap things at 4 V (maybe to eat brief voltage spikes, but not as a continuous regulator) - the short reason why is I'm fairly intolerant of losses, especially dissipative losses on the secondary side.

Update: attached a basic schematic of the architecture. I'm not, nor can I, use feedback in this application.

image source: CET Technology - Push Pull Switching Transformer Design

Specific parts are:
Controller: UCC38083
FETs: IRFZ2N4PBF
Transformer:
Diodes: 15SQ045
Output Inductor: 1 uH


texts: Connecting CMOS sensor to (far away) PCB: understanding cable length

texts:
The problem is a bit complex due to the number of unknown parameters and my inexperience. I need a way to determine how far I can put the PCB from the sensor without problems in the transmission of data.

Situation: I have a CMOS sensor and a PCB. The PCB will control the CMOS sensor and it will provide clock, configuration (using I2C), bias (3.3V/3.5V) and will readout the sensor (LVDS outputs, matching of 100 Ohm required on the PCB).

My main concern right now are the LVDS signals. They are clocked at 175 MHz (but we might be able to clock them slower, in the 20-40 MHz range).

The problem: the receiving PCB might be located as far as 70 cm. I am trying to understand if the sensor can, in fact, drive such long cables without problems.

Notice: the type of cable carrying the signals and power has not been decided yet. My guess is that we will use shielded twisted pairs, but I cannot be 100% sure right now.

Since I am not an expert in transmission lines, I tried to study the problem a bit. This is what I came up with, so far:

1) The parameters to consider for this problem are:

the frequency of the signal
the fact that it is a differential line
the fact that it is a point-to-point connection
the noise margin (which, I assume, is the same thing as the jitter...?)
the type of cable

2) Wikipedia, under transmission line, states:

  A common rule of thumb is that the cable or wire should be treated as
  a transmission line if the length  is greater than 1/10 of the
  wavelength

Just to make a simple example using 3 frequencies, this would mean:

f=20 MHz, Wavelength = 14.98 m, Cable 70 cm --> no issue
f=40 MHz, Wavelength = 7.49 m, Cable 70 cm --> could be an issue
f=175 MHz, Wavelength = 1.71 m, Cable 70 cm --> definitely an issue (this could be an issue even if the length were to be reduced down to 10 cm ??)

Is there something that I am not considering and that I should know, about the system?

Could you point me in the right direction to be able to obtain a reasonable answer to the problem?

NB1: I don't think that it would be possible to make a test, since the drivers are embedded in the sensor and I don't have them available on another IC.

EDIT1: Corrected mistake in the wavelength numbers.

EDIT2: In case someone stumbles on this question.

I found the following TI document: http://www.ti.com/lit/ug/snla187/snla187.pdf

On page 10 the money-plot shows that, in fact, at this speed and cable length, transmission is not problematic. This has been confirmed by talking to some local experts.

Regarding the cable type: is using shielded twisted pairs, there should be absolutely no problem. If using a flat cable, it would be good practice to put the 2 differential lines close together and isolated with ground cables around.


texts:
I have a chip that takes LVDS inputs.  It has a very large number of inputs and I'd like to set most of them to zero (or one) while prototyping.  They can't be left open/floating.

What is a good way to send a fixed LVDS logic value to a bunch of pin pairs?  (probably using passives, or a driver that can drive multiple differential pins at the same time)

The chip uses LVDS1.8, the datasheet looks like this:

Parameter                                         | Min | Typ | Max  | Unit
Input Common-Mode Voltage Range, VCOM             | 825 |     | 1575 | mV |
Logic High Differential Input Threshold, VIH_DTH  | 175 |     | 400  | mV |
Logic Low Differential Input Threshold, VIL_DTH   |−175 |     |−400  | mV |
Receiver Differential Input Impedance, RIN        |  80 |     | 120  | Ω  |
Input Capacitance                                 |     | 1.2 |      | pF |
LVDS Input Rate                                   |1250 |     |      |MSPS|
LVDS Minimum Data Valid Period                    |     |     |  344 | ps |

Can I just use two adjustable supplies set to 1200mV-200mV and 1200mV+200mV, and connect all the P pins together to the high voltage and the N pins to the low voltage?  What current would I expect per pin pair?


texts: 555 servo controller "modulation input"?

texts: Exactly as the question says. On the TI 555 Rev. C data sheet, what is the modulation input for the PWM circuit? Also, can I round the resistor and cap. to 10k and .022uf, respectively?


texts: PWM Dimming results in input ripple due to excessive inrush current

texts:
I use a constant current SEPIC boost regulator ([TI LM3410X) to run a 8.5V 400mA OLED panel from a single Cell Lithium polymer battery.  I have noticed that the input voltage ripple is too much (~1V peak) when using a digital PWM signal on the DIM pin of the regulator that in-effect gates the regulator's 1.6 MHZ OSC on and off.  NO issues what so ever when the OLED is at its brightest (i.e. DIM pin is HI, or always on).  The design is validated with TI's Workbench tools.

I have input low ESR MLCC caps and played with the value (up to 80 uF) and the regulator's output cap but not much improvement in input voltage ripple when the PWM signal does a low to high transition.  Layout is clean and tight with a solid GND plane.

To me this seems to be a fundamental issue with digital PWM dimming methods where the inrush requirements can be large every time the PWM signal makes a rising edge and enables the regulator's OSC, isn't it?

What are the remedies besides playing with input inrush storage cap and output cap of the regulator?


texts: Voltage reference sampled by ADC (12 bit) gives value that is off by more points than other measurements

texts:
I am using the TI REF3020 voltage reference (2048mV) in combination with a microcontroller in order to have a reference for voltage measurements.

The microcontroller is powered by 5V (5.00V), the MCUs ADC Reference is set to 5.00V too. Due to the fact that I don't want to rely on the VDD rails being referentially stable, I wanted to add a precision voltage reference.

In my test setups, I can easily measure the VDD (ADC reference) voltage and calculate the voltage to ground of an ADC input pin. For testing purposes, I used an external power supply as an input for an ADC pin. After measuring the voltage at the pin with an oscilloscope and a DMM, the MCU measured, without any further calibration, the actual correct voltage down to the LSB of the ADC. (I am using a 12-bit ADC) This experiment was successfully carried out with multiple voltages between 0V and 5V.

I further used the aforementioned REF3020 voltage reference in the same setup as an input for an ADC. Both oscilloscope and DMM confirmed precisely 2.048V. Measuring the same voltage with the MCU via an ADC, the value was off by 15 points.
Instead of a bit-value of 1677, the MCU measured 1663:$$U=\frac{1663}{4095}\cdot5V\approx2.0305V$$

The value measured by the MCU does not oscillate nor drift over time and the (to be honest, relatively narrow window of) temperature I tested. The (averaged) value constantly stays at 1663. Without averaging, the value ranges from a minimum of about 1660 to 1666. The influence of temperature should be negligible though, because the other experiment was conducted at the same temperature (room temperature).

For this application I am using an average of 128 samples in a time window of about 4ms. I even tried to make the sample and compare times longer. Did not help either.

The voltage reference is even a high-current one. It can safely supply up to 25mA according to the datasheet. This should by far be enough to be sampled by a single ADC channel. There are no other loads connected to the voltage reference.

I could easily calibrate the offset error, but this would in essence defeat the whole purpose of the voltage reference in this application.

What else could be the cause for this deviation that manifests only when measuring the voltage reference's output voltage?


texts: Altium designiing a component with two models but not the same number of pads

texts:
I'm designing a quartz component.
I would like to use it with differents packages like those ones :
First Type at RS-Online
and
Second Type at Farnell

One of them has 2 pads, the other has the same 2 pads and 2 ground pads.
I designed a schematic with 3 pads among them a power pad which is connected
to GND and invisible.

This works pretty well for the 4 pads package but for the 2 pads package,
when I compile, I get an error "Could not find port 'GND' on model 'QUARTZ_32x15' for pin 'GND'".

Obviously, that's right because there's not any ground pin on the 2 pads package.

So, is there a way to acheive this with something like saying that a pin may
be optionnal or something like this? Or should I build one schematic
for each package?


texts: What relay for high power circuit, low power controller?

texts:
I am currently working on an LED powered flood light that can be controlled via an arduino. The problem I am facing is selecting the proper relay. I'm a programmer by profession and dabble in electronics as a hobby, so there's always the chance that I am overlooking something obvious, which might be the case here.

What I have is an led driver (110-220AC - 288v, 900mA DC). I figure there are two ways I can go about controlling this circuit with an arduino. I can either place a relay between the LED bank and the DC 288v side, or I can place a relay before the driver/powersupply and switch AC. However every time I find a relay I believe will work, one of the specs is off. Either it won't have a high enough current rating, or the max voltage will be too low. The closest one I have found is this guy here and I have a feeling I'm way off. It's only rated at 500mA which won't work as I'll be pushing 900mA, but another thing that caught my eye is that it says "maximum switched power: 10W". The circuit this relay would be responsible or controlling would be upwards of 200 - 230 watts, so I'm guessing this is a deal breaker as well?

What type of relay does one use to control a high wattage circuit with a low voltage micro-controller (in this case an arduino)?


texts: Determine when Beaglebone has shut down (we we know when it's safe to cut the power)

texts:
As I understand, like most Linux systems, it's not recommended to simply pull the power from Beaglebone. Instead we should shut it down, either by pressing the power button or running a Linux command. Next we need to wait for a bit before disconnecting the power, this gives it time to shut down cleanly, so preventing corruption of the filesystem.

My question is, how do we know when it has finished shutting down, so we know when it's safe to disconnect the power? I understand that the USR0 LED blinking indicates Linux kernel activity, when that stops blinking is it safe to pull the power?

Ideally I'd like to be able to determine that it's shut down by monitoring the state of a pin. Is there any pin on the Beaglebone that will go high or low when the system has completed shutdown? If not, is there configuration I could do to set a pin to behave like this.

I'm trying to create a circuit, external to the Beaglebone that can pull the BB's power pin low to initiate shutdown, then, once it detects that shutdown is complete, it will disconnect power to the Beaglebone.

I'm using a Pocket Beagle, but am interested in any insight on solving this for any member of the Beaglebone family, I can likely adapt a solution for the Pocket Beagle.

Thanks!


texts: The problem when i proved \$3S_Y=S_\Delta\$ by using \$S=I^2 Z\$ in three phase circuit

texts:
There is the proof about \$3S_Y=S_\Delta\$ in lots of books

I have other way to prove the \$3S_Y=S_\Delta\$,however,there is a problem in my proof,but i don't know where am i wrong

As we can see the proof as above,we can know that proof is using the \$S=\frac{V^2}{Z}\$ to prove \$3S_Y=S_\Delta\$

However,as we know \$S=\frac{V^2}{Z}=I^2 Z\$,that is ,we can use \$S=I^2 Z\$ to prove \$3S_Y=S_\Delta\$  ,too!

Here is my proof by using \$S=I^2 Z\$

Now i have \$S_Y=3S_\Delta\$ ,but the answer should be  \$3S_Y=S_\Delta\$,where am i wrong by using this method(\$S=I^2 Z\$)?


texts: How to use Thevenin's theorem in a circuit with more than one source?


texts: Arduino oscilloscope voltage divider design

texts:
I'm building an oscilloscope with arduino, but I have some questions about how to design the input voltage dividers without ground.
The problem is the oscilloscope only needs one input to measure voltage, but as far as I know voltage is a comparison. So how can the oscilloscope measures voltage without comparison?

In my arduino design I made a couple of voltage dividers to reduce voltage between 0-5V, but voltage dividers won't work without current.
So do I have to let the current flow in the voltage divider or is there any other way to do it?


texts:
I am reviewing about differential pair and this comes up a bit confusing. Could anyone explain the part "equal impedances to a fixed potential" here?
What does an impedance to a fixed potential mean?

"A differential signal is taken between two nodes that have equal and
opposite signals with respect to a “common mode” voltage and also
equal impedances to a fixed potential (usually ground)."


texts: Why a sinusodial signal expressed by a cosine function instead of a sin function?

texts:
In the signals and systems course one of the first things that we see is a sinusodial signal wave. And they say its expressed like  \$A\cdot\cos(\omega t + \phi)\$. But why we use a cosine function when we work on a sinusodial signal? why its not \$A\cdot\sin(\omega t + \phi)\$?

for example: http://users.abo.fi/htoivone/courses/sigbe/sp_sinusoidal.pdf

or watch the first minute of this video: https://ocw.mit.edu/resources/res-6-007-signals-and-systems-spring-2011/video-lectures/lecture-2-signals-and-systems-part-i/


texts:
I'm working on a project to control power sideview mirrors in a car, with features like TildDown, that tilts some of the mirror down helping to park. The circuit is pretty simple, but I'm having some difficulty to turn the power mirror motors with my microcontroller.

It needs to be a Half H-Bridge kind of circuit for powering the motors because each motor pin needs three states: VCC (+12V), GND and high impedance (opened). In that case, I'm having two outputs of the microcontroller for each motor pin, one to toggle between the High and the Low Mosfet and the other to act as an enable for the Half H-Bridge, so when it is in '0' none of the Mosfets gets triggered and the Motor won't turn on doesn't metter the voltage of its other pin.

So I need a driver, that accepts a 5V input and an around 12V output, to connect my microcontroller to the Half H-Bridge, with the following truth table:

I have seen some Half H-bridge Driver ICs, like the IR2104, but it seems like they are indicated for PWM application, which isn't the case. I'd like to know if there is a driver similar to the one I'm looking for or if there is any other solution for the problem. I know it may seem confusing why it can't be a simple mosfet activating the motor with VCC and GND, it is because the motor of the power mirror have a common wire and I need to control each one individually, so I need the phase pin of the motor that I don't want to move to be high impedance while the phase pin of the other motor is in GND for example (which is exactly what the power mirrors switch does in the car circuit for controlling each mirror individually).

Thanks in advance and sorry for the bad english!

UPDATE

Due to all the tips received, I think I finally have a working circuit. As you can see in the schematic picture, the output has the three stages: VCC, when the input thats connected to Q3 (which will be an output from the microcontroller) is in +5V; GND, when the input connected to Q1's gate (also an output from the microontroller) gets high or when optocoupler out put gets high (controlled directly by the power mirror switch, allowing the mirror pin to be GND in manual adjustments); and the most important, if none of these signals get high the motor pin floats and it won't conduct. I've also added the bipolar Q4, that completely turn off the Mosfet Q1 when the high side signal is on, doesn't metter the value of the other signals, avoiding both Mosfets being activated at the same time, causing a short circuit in the +12V supply.

I've tested the circuit in a protoboard and it worked perfectly, it also drains almost any current from the digital signals (around 10mA, which is good for Atmega328p outputs). I'm planning to use smd components in the final project (SOT23 package): for the bipolar I'm using BC817, and for the mosfets I'm using SI2319DDS and PMV55ENEAR, channel p and n respectively. I looked at the Mosfet's datasheets and they seem to be appropriate due to its low RDSon and high ID current. I'm just concern about the evetual eletromagnetic noise in the car that can trigger the Mosfets unwanted because of the low VGS threshold.

If someone know some issue I may have because of the circuit desing or because of this components in the automotive enviroment, please, let me know. Thanks for all the help!


texts: Most efficient way of hooking lower voltage component up to higher voltage supply

texts: I want to hook up a 22.2 V motor up to a 28 V supply. Is there a more efficient way of doing this other than using a resistor and dissipating the extra energy in heat?


texts:
I am trying to output some ADC readings from a potentiometer over USART using the PIC32MX220F032B. I have the hardware all setup and working and i've set up a new project using MPLAB harmony and have the PIC picking up values from a potentiometer using the ADC module. I've set up the USART module too and I am able to output single bytes at a time using Harmony's DRV USART driver ByteWrite function however I have been struggling for hours to try convert the integer ADC readings into an ASCII representation that I can send to Putty, my terminal program. The problem is such that the harmony driver function DRV_USART0_WriteByte(argument); takes a uint8_t as argument.

I tried writing the following functions to convert each decimal to a uint8_t and transmit using the driver write function:

void intToByte(int input){
    int j    = 0;
    int size = numPlaces(input);

    while(j<size){
        appData.buffer = input % 10;  // remainder of division with 10 gets the last digit
        input /= 10;                  // dividing by ten chops off the last digit.
        DRV_USART0_WriteByte(appData.buffer);
        j++;
    }
}

int numPlaces (int n) {
    if (n == 0) return 1;
    return floor (log10l(abs(n)))+ 1;
}

unfortunately I'm just getting different non sensical ASCII characters in my serial terminal program.

I was wondering if there are any PIC32 experts who have worked with Harmony who might be able to tell me how they approach printing integers using DRV_USART0_WriteByte().


texts:
I used a 4040 counter to count the pulses from an encoder. I then connected two counter output signals to an AND gate, and after that one way is go to reset 4040 counter. The issue is that when I connect the gates in this way, there is no logic-high output signal from the 2 pins of the counter. If I disconnect them like the image below, I can read the output signal again from a multimeter, and other pins always have a signal.

I measured the AND gate and NAND gate; there are no short circuits. Why there is no output signal when connect these gate?


texts: Why does a closed circuit with a pull-up resistor output "0"?

texts: I have a switch setup with a pull-up resistor. With the switch open I get a "1" or HIGH output and with the switch closed I get a "0" or LOW output. I understand why I am getting the "1" with it open (because it is connected to 5v) but I don't understand why I get the "0" when it's closed. Aren't 5v's still passing through the switch?


texts:
I have been playing alot with FPGAs (or so I thought). I have always been dealing with different evaluation boards etc. which is very handy; you plug in the USB cable, use the development tool and the ”upload bitstream” but how do I use a single FPGA-chip and implement it on a PCB.

I know there are different FPGAs out there; some become permanent once you configured them, others loose their architecture when you cut the power, and some keep the structure even when power is off.

So lets say I want to make a control unit for a display. It is working on the evaluation board with all its IOs. So how do I go from here to actually buy a single fpga chip, put it on a pcb or similar. How do I program the chip when there is no nice toolkit or USB-port waiting for me.


texts: Powering a 6V motor from a 5V USB battery pack

texts:
I'm trying to run a 6V/1A motor from a 5V/2.2A USB battery pack (i.e. a phone-charger battery bank).

I'm using a Pololu boost converter to make 6A (>80% efficiency), but the motor never starts, it just makes a stuttering 'glitch' noise.

I've tried putting big smoothing capacitors over the voltage lines in case inrush voltage drops were causing problems.

Any other ideas: circuits, protection diodes, etc?
Thanks!

EDIT:
Hi everyone, thanks for all your input.  1) I don't have a spec sheet - it's about the size of a D-cell battery and has a sticker saying Made in Germany, 6V/1A on it. 2) Trying to add it to an existing bit of kit which runs off a USB battery pack (the motor doesn't start even with this other kit removed), 3) Tried a few other USB batteries, some work, some don't - quality/brand name doesn't matter , 4) I'll give a floating battery/supercap a go and report back.


texts: Altium: Two adjacent Prepreg layers in stack manager

texts:
Is there a way to add two adjacent prepreg layers in the Altium Layer Stack Manager? When you add a layer it adds copper as well, and when you remove the copper it removes the dielectric. I am attempting to mimic a suggested layer stack from Advanced Circuits, which requires two prepreg layers immediately adjacent to one another. Here is the document that calls out that requirement.

I currently have a single prepreg layer in my stackup that has a thickness of the two sheets together (i.e. one sheet is 4.7 mil and one is 3.5 mil, so Altium has a prepreg layer that is 8.2 mil thick). I would like to be able to show both layers individually in the live Layer Stack Table.


texts: Is it cheating if I use an SRAM chip as a register file?

texts:
I'm currently building my very own processor using discrete logic (74LSxx series and that) using my very own instruction set architecture. I am starting to rack up a bit of a bill because all the chips I need. For any of you that have seen people build homebrew CPUs like this, no one that I have read about has used an SRAM chip as their register file

Would it be considered cheating if I used an SRAM chip as opposed to a TON of '374 flip flop chips for the registers? This is supposed to be a processor made from discrete chips


texts: What happens with the voltage and amperage when we have multiple batteries in either series or parallel?

texts:
Let's assume that I have 4 pieces of 9v batteries and some simple load like an LED. If it helps, you can assume there is no load at all.

Question 1 - What voltage and amperage can I expect on the output when I have a simple series circuit?

    plus   minus   plus   minus   plus   minus   plus   minus
+---(9v-battery)---(9v-battery)---(9v-battery)---(9v-battery)---+
|                                                               |
+----------------------(load)---------------(V?)-----(Amp?)-----+

Question 2 - What voltage and amperage can I expect on the output when I have a parallel circuit?

         plus   minus
+--------(9v-battery)--------+
|                            |
|        plus   minus        |
+--------(9v-battery)--------+
|                            |
|        plus   minus        |
+--------(9v-battery)--------+
|                            |
|        plus   minus        |
+--------(9v-battery)--------+
|                            |
|                            |
+---(load)---(V?)---(Amp?)---+

I am quite inexperienced in this area and even though I know the difference between series and parallel circuits, I don't know what to expect when I have multiple battery sources. I believe that in one of these cases I should expect the batteries to last longer and in the other case I should expect the voltage (and therefore perhaps the amperage as well) to increase.

Could you please explain to me what happens with the voltage, the amperage and the overall battery life in each case? Thank you!

UPDATE:

I found out that my Google search regarding this topic has been slightly incorrect and that's why I didn't get the answers I was looking for. I updated my Google search with better terms and I found these articles which were very helpful:

Connecting Batteries in Series or Parallel

Battery Bank Tutorial - Series and Parallel

Thank you all for your answers and comments on this issue! I promise the next time to do better research before posting questions here.


texts: how can I hack a usb charger to work with ALL phones and specifications

texts:
perhaps I am asking for too much. Please do tell.

So I have a few usb chargers laying around. I realised that in these chargers I can charge iPhones and I can charge all devices that do not follow the "usb power delivery specification" (roughtly all usb1.1 and some usb2 devices).

What I can NOT charge is my android phone. Looking into why I ended up in this article.

So apparently Apple "did it again". I mean they gave the finger to yet another specification and did their own thing. Their thing is that they provide 2V and 2.8V in the data pins (D- and D+ respectively) of their usb chargers. If these voltages are not present the charger is not considered an apple product and apple products will fail to charge...

What is more the apple usb power delivery standard seems to conflict (according to the article) with the usb power delivery standard, which requires that a very small resistor (0-200ohms) must be placed between the D- and D+ data pins of the usb charger.

What is EVEN worse: some of the usb chargers I have never stated that they are targeted for apple only products! (I have already formally complained to them).

The question is, I see on ebay and elsewhere so "truly universal USB chargers that claim to charge both apple products and other products". What have they done in order to make their products universal?

Is it possible to hack my usb chargers to make them universal as well??

Thank you in advance for your help.


texts: Can a finite state machine represent every possible discrete deterministic system?

texts:
Consider the two following definitions:
Discrete Deterministic System: a system where inputs and outputs can have only a finite number of values, and is deterministic;
Finite State Machine:  an abstract machine that can be in exactly one of a finite number of states at any given time.

My understanding is that the states in a discrete deterministic system will be a combination of the actual inputs (and possibly previous ones, if it is a system with memory), and therefore the number of states should be finite.

Provided that complexity is not a problem, is it be possible to build a finite state machine that models every possible discrete deterministic system?

If not, can you provide an example of a discrete deterministic system that cannot be represented as a finite state machine?


texts: Is it required to program microcontroller with parallel port for the first time

texts:
In my company i have been told that when we are using the microontroller for the first time(factory sealed),it is required to program boot vector and other few parameters using the universal programmer(parallel port) to make it compatible for In system programming(ISP).

But as per user manual i understood that only when we are writing a custom bootloader for ISP at a different location other than the default ISP address then only we need to program that address to boot vector with parallel port device.

Can any one tell is it required to do that.

I am using NXP P89LPC954 Microcontroller(80CS1 based)


texts:
I am trying to control LEDs brightness using PWM on the Atmega32. I have one LED connected to each of the 4 PWM pins (OC0, OC1A, OC1B, and OC2). Using the code below, all of the LEDs are functioning as expected except the LED connected to OC1A which is remaining dark. Why is this the case? Thank you for your assistance.

#define  F_CPU 100000UL
#include <avr/io.h>
#include <util/delay.h>
#include <stdlib.h>
#include <avr/interrupt.h>

void InitPWM()
{

   TCCR0  |= (1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00);
   TCCR1A |= (1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00);
   TCCR1B |= (1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00);
   TCCR2  |= (1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00);

}

int main(void)
{

    //Configure the ADC
    ADCSRA |= 1<<ADPS2;         //Enable a prescaler
    ADMUX |= 1<<ADLAR;          //8-bit or 10-bit results
    ADMUX |= 1<<REFS0;
    ADCSRA |= 1<<ADIE;          //Enable interrupts function in ADC
    ADCSRA |= 1<<ADEN;          //Turn on the ADC feature
    sei();                      //Enable global interrupts
    ADCSRA |= 1<<ADSC;          //Start the first conversion

    DDRB = 0xFF;                // initialize port B
    DDRD = 0xFF;                // initialize port D

    InitPWM();                  //initialize PWM mode

    while(1)
    {
        OCR0 = 100;
        OCR1A = 100;
        OCR1B = 100;
        OCR2 = 100;

        _delay_ms(500);

        OCR0 = 255;
        OCR1A =255;
        OCR1B = 255;
        OCR2 = 255;

        _delay_ms(500);
    }

}

ISR(ADC_vect) // interrupt routine and display the results
{
char adcResult[4];
itoa(ADCH, adcResult, 10);

ADCSRA |= 1<<ADSC; //Start the next conversion
}


texts: Help Understanding an Autonomous rectifier

texts:
Could anyone tell me how does the circuit below work ?
It's a autonomous rectifier. Taking the signal between the two output resistors gives a full-wave rectification, and taking it at the output of the second operationnal amplificator gives an half-wave rectification.

V_POS =  5V
V_NEG = -5V


texts: Controlling NiMH charging with power MOSFET: MOSFET before or after the linear regulator?

texts:
I am starting a project where I want to make a simple, Arduino-controlled NiMH battery charger. I imagine several iterations, but the first one will be really simple. It will charge at a constant current of around 0.1C (where C is the battery capacity) and will monitor the voltage and charging current. For the constant current, I will be using a 7805 regulator in constant-current mode (i.e. with PIN 2+3 connected with a resistor and the battery itself connected to PIN 3 and GND), figure 4 here:

https://www.sparkfun.com/datasheets/Components/LM7805.pdf

For the voltage measurement, I want to charge the battery in cycles of 1 seconds, where after each second I stop the charge for some milliseconds to measure the voltage. The question is how to stop the charge. My thoughts are to use a power MOSFET (n-channel, enhancement mode). I have the following and it appears it should to the job.

http://www.vishay.com/docs/91291/91291.pdf

The gate of the MOSFET will be controlled by the Arduino. The question is then: Should the MOSFET come "before" the 7805 regulator i.e. so that the regulator would get switched on-off also during the cycle? Or should I put the MOSFET after the regulator, so it is only the power to the battery that gets cycled? Or doesn't it really matter?

Can the 7805 get "worn out" from being cycled so many times as would happen in this application (if the MOSFET is before the 7805)? It would be cycled once every second.


texts:
The explanation (from https://en.wikipedia.org/wiki/Diode_logic) states that

  R is connected to +12 volts to provide the forward bias current for the diodes and current for output drive. If all inputs A AND B AND C are a positive voltage (+6 volts here),
  current flowing through R will pull the output positive till the
  diodes clamp the output to +6 volts, the logical 1 output level. If
  any input switches to 0 volts (logical 0 level), current flowing
  through the diode will pull the output voltage down to 0 volts. The
  other diodes would be reverse biased and conduct no current.

Why the explanation says that R is connected to 12 V? Is the 12V obligatory given "1" is 6V? What are the Kirchhoff equations for this... well it is not a circuit. Is this a kind of star topology connection? What is the mathematical nature/description of this? What exactly does clamp mean - does this mean diodes connected in parallel with cathodes to input, anodes to output will sink all the voltage until it is equal to minimum of their input?


texts:
I am using the mbed platform and to be specific, NUCLEO L073RZ. To log data, I am using SDFileSystem.cpp that is officially supported by mbed (you can find the link here).

Now using an SD card in an industrial setting is not really good, but I need to use the same library so that I will not have to change my code a lot. What are the criteria that I need to look into for EEPROM to make sure that a particular model resembles an SD card as close as possible?


texts: LED strip lights not working properly on DC power

texts:
I have a set of LED strip lights that I am attempting to control with an Arduino. When I power the first few LEDs from my Arduino 5V out pin (or 3.3V out pin for that matter) it works exactly as I would expect, I can set the colour and switch on and off.

However, I'm clearly going to need an external power supply to handle the dozens of LEDs on the strip, so I've got a 5V, 3A DC switching power supply plugged into an AC outlet. I would expect this to work equally well in comparison to the Arduino V out pin, but when I switch to the power supply my lights begin to behave erratically. Random LEDs all along the strip will flash intermittently, and the specific LEDs I'm turning on with the Arduino will flash different colours than I've set them to.

To highlight the issue I've uploaded a video to YouTube: https://youtu.be/6k9c2WWS2_4
In it you can see the lights working as expected when connected to the Aruduino, with the ground connected to the power supply's ground. As soon as I switch the VCC to the power supply things go off the rails.

I'm sure there's some fundamental difference in the nature of the Arduino pin and the power supply, but an hour of Googling hasn't cleared things up for me.


texts: 24V AC-AC Power Supply Outputs ~80V Unloaded

texts:
I have a AC-AC power supply with a secondary coil rated as 24V, 1500mA and 36VAC. Primary is 230V, suited for use in the UK.

I measured the output of this power supply with an oscilloscope, and it was showing a sine wave that with peak-to-peak voltage of around 80V.

This seems really high to me, but I have little experience with AC-AC power supplies, and not sure if this is normal. I know, for instance, that an unregulated DC power supply will output higher voltage than stated when unloaded. This might be the case here, but for the output to be so much larger seems unusual.

Is what I am seeing normal behaviour, or is the power supply (which ~5 years old) faulty and should be replaced?


texts: What is the low frequency limit for ferrite cores in audio applications?

texts:
I've searched high and low through the ferrite magnetics catalogs and this list for an answer and can't find data on ferrite core permeability below 10kHz. My application is for audio use and I need to know how the permeability of the core drops off with falling frequency.

Ideally the permeability will drop rapidly at 300Hz, with some flexibility in the frequency. I imagine core losses will be small in this region since a lower permeability results in lower hysteresis losses. Also I suspect the core air gap will not play much of a role.

I know I came across this information many years ago but am having a problem finding it again.


texts:
I'm a newbie to circuit design, so I think I'm either really lost or over thinking this (most likely the former).  I need a circuit that will act like a current limiting power supply, which I can design in a specific voltage (20mV) and current limit (100mA) across multiple independent outputs.  Each of my outputs will likely be shorted or see very low resistance.

So far, I've looked ICs that can provide a constant current source, but none are in the current range I need.  I've looked at voltage regulators, but I'm not sure how I could limit the current from them.

The most promising thing I've seen so far is using a two transistor current limiter, like this:

Source: Wikipedia

Is is likely to work?  If I have multiple circuits like this (connected to the same VCC and GND), would it still work as intended?  Is there a much better way to approach this problem?


texts: What stops an assembly program from crashing the operating system?

texts:
First of all, I am a beginner, so if this question sounds silly, please point out the incorrect assumptions.

From what I understand, the job of an operating system is to manage hardware and the software that runs on the OS. Also, from what I understand, assembly programs allow one to control hardware almost directly. In an assembly program, one can read and write data into registers, and read and write data into RAM.

Given this freedom to mess with registers and RAM, would it not be possible for assembly programs to affect the operating system? Suppose an OS is using register A to store crucial information, and suppose I run an assembled program on that OS. If the program successfully writes junk into register A, the OS will surely be affected.

Questions:

Is it possible to mess with register A in the manner described above?
If not, what stops assembly programs from modifying the registers used by the OS?


texts: What is the power plug in the photo called?

texts: Is the plug shown in the photo, which looks like IEC 320 but with angular tips, standard? If so what is it called?


texts: NMOS FET selection for reverse polarity protection

texts:
I am working on a reverse polarity protection circuit, similar to that in Figure 2 of SLVA139: Reverse Current/Battery Protection Circuits. Here is my circuit:

My case is slightly more complex due to the possible input voltage ranging from 5-40V. Most MOSFETs seem to have a maximum gate-source voltage VGS of 20V, so I need the Zener clamp on the gate (or a very large/expensive FET). The maximum input current will be about 6A.

What I'm wondering is, what FET characteristics actually matter in this configuration? I know that I definitely want a drain-source breakdown voltage BVDSS high enough to handle the full input voltage in the reverse polarity condition. I'm also pretty sure I want to minimize RDS(on) as to not introduce any impedance in the ground circuit. Fairchild AN-9010: MOSFET Basics has this to say about operation in the Ohmic region:

  "If the drain-to-source voltage is zero, the drain current also becomes zero regardless of gate–to-source voltage. This region is at the left side of the VGS– VGS(th)= VDS boundary line (VGS – VGS(th) > VDS > 0). Even if the drain current is very large, in this region the power dissipation is maintained by minimizing VDS(on)."

Does this configuration fall under the VDS = 0 classification? That seems like a somewhat dangerous assumption to make in a noisy environment (this will be operating in the vicinity of various types of motors), as any voltage offsets between input supply ground and local ground could cause current to flow. Even with that possibility, I'm not sure I need to spec for my maximum load current on the drain current ID. It would then follow that I don't need to dissipate very much power either. I suppose I could mitigate the problem by Zener clamping VGS closer to VGS(th) to reduce drain current/voltage?

Am I on the right track with this, or am I missing some critical detail that's going to make a tiny MOSFET blow up in my face?


texts: Noise in DC causing unwanted LC resonance

texts:
I have a circuit like this:

The part on the left generates AC signal. The part on the right detects whether AC is running through the branch when S1 is closed. I use a resonating LC circuit which is tuned to the frequency generated on the left. This induces AC which is then amplified by the op amp and read by the scope.

There are some limitations to what I can do, hence such a complicated detection of a switch. Don't try to improve that, everything works fine and I'm getting what I need. But only when the left and right parts are on a different battery! When I connect them together like you see here, I'm getting a constant AC sine signal of about 20mV even when S1 is not closed. This is about 80% of the signal I'd ideally receive so it dramatically decreases my resolution. When I connect my scope to the + and - in red section though, I don't see any ripples or fluctuations (or perhaps they are too small, my scope has only 20mV sensitivity).

The problem IMHO is that a small AC is somehow spreading through the circuit and making the detector coil resonate when it shouldn't. When I split the generator and detector parts and put them on a separate battery, everything works fine, hence I assume this is not happening due to some wireless transmission.

When I remove the C2 cap, the coil stop resonating and the parasitic signal disappears (along with what I want to see, of course). When I remove the coil itself, the signal disappears too. That's why I'm assuming this is caused by an unwanted resonation.

Do you have any ideas how to get rid of this? I really can't have it on two batteries, it must be just one. (I tried putting caps – large and small – across the power source, across the generator branch, and to various other places of the circuit to smooth the DC, no luck.)


texts: Feedback Circuit schematic to Control Theory block diagram?

texts:
I'm studying analog electronics circuit with feedback.

I see that, during analysis, a useful abstraction over the schematic is the block diagram in control theory style, but I stuggle in deriving it from the schematic.

Also, I found a lot of textbooks describing the problem either from electronics point of view or from control theory's one.

Does anyone have a good recommendation for material which attempts to fill the gap and derive the block diagram starting from the circuit?


texts: Design of a discrete BJT current buffer for low-current op amp

texts:
I built and simulated this BJT current buffer for an opamp based on examples I found in various places online:

Link to simulation of above schematic

It simulates fine, but I am pretty sure it will not work as drawn in practice. For one thing, any actual opamp cannot swing instantaneously through the 1.4V crossover region without some form of distortion. I'm sure there are other things as well.

What alterations would need to be done to make this a functional circuit in practice?

EDIT: Goal is to drive a speaker with AC signals (20Hz-20kHz). Total power output of 1/4W. OpAmp in question is an NE5532. I don't have LM386s on hand and they are not unity-gain stable anyways. Yes there are monolithic solutions, but this is partly a design exercise and partly a challenge to make do with parts I have on hand.

EDIT: If I diode-bias the bases like this: will I get suitable audio performance? It doesn't need to be exactly hi-fi quality, just not noticeably distorted.


texts:
Hello I'm searching table with thermistors types and alfa (temperature coefficient). I need alfa for this formula :

Mt = 1 - alfa/100*(Tmax - 20)

I have some old calculations where for MMT-9 type thermistor alfa = 2,4. This is what table I'm searching thermistor types with alfa


texts: Read Switch Status without interfering with LED

texts:
I'm a software guy trying to get my head around how to measure the status of a switch connected to a LED as shown below through a digital input of a MCU.

My first try was many variations of circuit 1 below - seems every iteration I've tried causes the LED to dimly light even when SW1 is open.  I've eliminated R3 and this issue still exists.  I believe R3 and the MCU input provides a path to ground causing the LED to dimly light.

I then stumbled upon circuit 2 below which seems to work well.  I can read the status of SW1 and the LED works correctly.   Unfortunately I don't know why it works and therefore don't feel comfortable with it.

Can anyone suggest methods to read the status of SW1 with a MCU without interfering with the LED?  Also why does circuit 2 appear to work?

Thanks!

simulate this circuit – Schematic created using CircuitLab


texts:
I am just starting to learn the basics of gates via the first chapter of "The Elements of computing Systems". The first project is to implement a bunch of the basic (and, not, or, etc) gates using Nand gates as the base.

I am managing to get them eventually, but honestly I am doing it through intuition and trial and error. Is this pretty much how you have do it at a entry level, or are there some basic boolean logic (manipulations?) I could learn that would help my understanding of building things up from Nand gates?


texts: CMOS on breadboard - Which P & N type MOSFETs to get started?

texts:
I would like to implement my own CMOS logic on a breadboard.

I have already designed a simple PCB with basic logical functionality but now I'm stuck on the choice of N & P Type transistors (MOSFET, not BJT).

I need the PMOS & NMOS to have the same K (1/2 * µ * Cox * (W/L)) in order to be more comfortable while calculating propagation times & other stuff.
Or at least very similar.

I'm completely lost. Lot of theory but when it comes to real life I don't know which component may fit my needs.

Thanks in advance.

it may be helpful to tell you that I know:

how complementary metal-oxide-semiconductor logic works, since
I'm studying it at University (Computer Engineering).
this logic is used to implement complex circuits such as
microprocessors & co.
how to design NAND & NOR ports, and even Inverters (therefore
AND & OR ports)
It may be very difficult to reproduce some kind of CMOS logic on a breadboard due to lack of dedicated components which are usually very small on microprocessors (Have we reached 10nm :D ? )


texts: Ethernet cable react with anti-theft RFID gate

texts:
Yesterday I was leaving a shop, I had an ethernet cable in my backpack, and it reacted with the anti-theft gate, causing a false alarm.
I was just wondering why.. I had also other cables (hdmi, power cord) but after some trials we found out that was the ethernet one. Thank you


texts: Why are thermal limitations preventing progress in CPU development?

texts:
After reading this excellent question, it seems that thermal issues are currently one of the largest limiting factors in CPU design.  What specifically is preventing forward progress with heat removal?  Shouldn’t it be relatively simple to build better cooling mechanisms?
Why is it so hard to build cooler CPUs to begin with?


texts:
I need help understanding what these ratings mean. This is a general purpose relay.  I'm confused.  The Turn on/Off voltages are these voltages that need to be provided to the relay to turn the relay on and off?  Is the Coil voltage the voltage that I can safely switch on this relay? Is the Contact Rating Current the current that this relay can handle?

Coil Current    4.5mA
Coil Voltage    48VDC

Turn On Voltage (Max)   33.6 VDC
Turn Off Voltage (Min)  2.4 VDC

Contact Rating (Current)    6A
Switching Voltage   400VAC - Max


texts: What is the best approach when writing functions for embedded software in order to get better performance?

texts:
I have seen some of the libraries for microcontrollers and and their functions do one thing at a time. For example, something like this:

void setCLK()
{
    // Code to set the clock
}

void setConfig()
{
    // Code to set the config
}

void setSomethingElse()
{
   // 1 line code to write something to a register.
}

Then come other functions on top of it that uses this 1 line code containing a function to serve other purposes. For example:

void initModule()
{
   setCLK();
   setConfig();
   setSomethingElse();
}

I am not sure, but I believe this way it would be creating more call to jumps and creating overhead of stacking the return addresses every time time a function is called or exited. And that would make the program work slow, right?

I have searched and everywhere they say that the thumb rule of programming is that a function should perform only one task.

So if I write directly an InitModule function module that sets the clock, adds some desired configuration and does something else without calling functions. Is it a bad approach when writing embedded software?

EDIT 2:

It seems like lot of people have understood this question as if I am trying to optimize a program. No, I have no intention to do. I am letting the compiler do it, because it is going to be always (I hope not though!) better than me.
All the blames on me for choosing an example that represents some initialization code. The question has no intention of regarding function calls made for the initialization purpose. My question is Does breaking a certain task into small functions of multi-line (so in-line is out of question) running inside a infinite loop has any advantage over writing long function without any nested function?

Please consider readability defined in the answer of @Jonk.


texts: Garbled serial output from breadboard ATmega328 via FTDI breakout

texts:
I have an ATmega328P-PU on a breadboard,

and I am trying to get serial communications working through one of these bad boys:

The 328P is loaded with a modified blink sketch that just does a Serial.print() at the end of each iteration.

int led = 13;
int count = 0;

void setup() {
  pinMode(led, OUTPUT); // initialize the digital pin as an output.
  Serial.begin(9600);
}

void loop()
{
  count++;
  for (int i = 0; i < 2; i++)
  {
    digitalWrite(led, HIGH);
    delay(150);
    digitalWrite(led, LOW);
    delay(150);
  }
  delay(350);

  Serial.print("abcdefghijklmnopqrstuvwxyz");
}

The good news is that I am getting something, but the bad news is that it's all garbled.

Here is an example from Linux command line of the stuff I am getting.  I also see similar garbled output through Arduino's serial monitor and  minicom  as well:

$ (stty 9600 cs8 -parenb -cstopb;od -a )<  /dev/ttyUSB0
0000000 ack ack   `   f   ` ack   x   f ack   x   ~ ack  rs ack  rs can
0000020  rs  rs  rs   `  rs   f  rs   x  rs   ~  rs nul   f ack   x   f
0000040   x ack   ~   f ack   ~   ~ ack   f ack   ~   ~ ack ack   `   f
0000060   ` ack   x   f ack   x   ~ ack  rs ack  rs can  rs  rs  rs   `
0000100  rs   f  rs   x  rs   ~  rs nul   f ack   x   f   x ack   ~   f
0000120 ack   ~   ~ ack   f ack   ~   ~ ack ack   `   f   ` ack   x   f
0000140 ack   x   ~ ack  rs ack  rs can  rs  rs  rs   `  rs   f  rs   x
0000160  rs   ~  rs nul   f ack   x   f   x ack   ~   f ack   ~   ~ ack
0000200   f ack   ~   ~ ack ack   `   f   ` ack   x   f ack   x   ~ ack
0000220  rs ack  rs can  rs  rs  rs   `  rs   f  rs   x  rs   ~  rs nul
0000240   f ack   x   f   x ack   ~   f ack   ~   ~ ack   f ack   ~   ~
0000260 ack ack   `   f   ` ack   x   f ack   x   ~ ack  rs ack  rs can
0000300  rs  rs  rs   `  rs   f  rs   x  rs   ~  rs nul   f ack   x   f
0000320   x ack   ~   f ack   ~   ~ ack   f ack   ~   ~ ack ack   `   f
0000340   ` ack   x   f ack   x   ~ ack  rs ack  rs can  rs  rs  rs   `
0000360  rs   f  rs   x  rs   ~  rs nul   f ack   x   f   x ack   ~   f

I have used using Nick Gammon's Atmega_Board_Programmer sketch to successfully write the bootloader, notably trying a couple of different fuse configurations (with and without the divide-by-8 bit), but the result is always the same: garbled junk.  Well actually, when dividing by 8 the blink was super S  L  O  W  and obviously not right.

Would appreciate any feedback or ideas on avenues to explore.  What settings to tweek?  Is the circuit reasonable?

EDIT / UPDATE

Based on MarkU's suggestion, I successfully ran my modified blink sketch on an Arduino Uno.  By doing that I also verified that the FT232RL breakout board works as expected.  I also noticed that on the Uno the blink sequence seemed to be faster than the same sketch running on my breadboard.   Hmmm...

So set up the breadboard again, getting garbled output.  Then, thinking of the slower blink as compared with running on the Uno, I changed the baud rate on the Linux side 9600 -> 4800.  Hey!  It's not garbled anymore!

The sketch thinks it is sending at 9600, so it looks like I am off by a factor of 2 somewhere.  Is my crystal 4 MHz instead of 8?  I didn't notice any fuse or other settings that would change timing by a factor of 2.

Here's what I think the problem is:  I'm compiling with the target board set to "Arduino Uno," which I believe this uses a constant F_CPU = 16000000UL.  Then I upload to my breadboard which is running an 8 Mhz oscillator, half the expected value.


texts: Weird waveform when using potentiometer as volumecontrol

texts:
I am making a remote volume control for my TV, as my amplifier only as a physical button. My idea is to control a digital potentiometer with an microcontroller. I have build the circuit shown on the follwing figure:

simulate this circuit – Schematic created using CircuitLab

The potentiometer shown is a  MCP42100, controlled with the microcontroller. As it is for stereo, two of the circuits is used.

When the volume is full, the signal is as it needs to be, when feeding it a sine signal.

However, when i use the potentiometer for attenuation the signal, i get a signal like this:

I do not understand why i get something like this, as it is just passive components and a voltage follower.

The parts: C1, R1 and R2 was added, because i had a signal like this:

This is clearly some kind of clipping, so i added some biasing, which works.
Even through it works, i do not understand why, or even why it is needed as the only component the biasing is connected to is the potentiometer.

I suspect that this is coursed for the same reason as the other problem.

I start to belive that the potentiometer is at fault, but i dont know how.
This is the datasheet i am using for the potentiometer:
http://ww1.microchip.com/downloads/en/DeviceDoc/11195c.pdf

Can anyone tell me what i might fail to see?


texts:
In my PCB, I am bringing voltage source through the bottom-layer and connected to the supply pin of op-amp on top-layer using via (Drill diameter - 0.3mm) as shown in the figure below.

I have doubt that what if the opamp need more current than rated for via. I don't know about the rated current of via either. Is it good practice to do this? and is the via filled with conducting material or hollow just like a through-hole pad?


texts:
I consider myself only a novice when it comes to electronics... I can dissect most consumer electronics and figure out how they work; however I am having issues getting over the learning curve when it comes to designing things.

My scenario is simple: I am using pulse width modulation to control a 12V/2.5A motor from a transistor.  The transistor will turn the motor on and off as well as adjust speed based on the pulse.  I need it to be able to be controlled from my microcontroller(thus, 10ma on the base.)

For the life of me though, I can not find out how to select a transistor.  There are so many different variations.... none of which allow 2.5A to be controlled by 10ma.  How do professionals go about designing circuits and picking parts?

Thank you for your time.