texts: LTspice peak detector analysis: Time step too small

texts:
I made a peak detector with a test file in LTspice.
Here is the diagram:

When running the test file, I ran into this an error message:

Time step too small; time = 0.011, timestep = 1.26068e-017: trouble with node "x1:n001"

Node n001 is the output node of the amplifier in the peak detector. I think the solution is to give some parameter to specify the diode but I don't know what those parameters should be.
Code for the peak detector:
    Version 4
    SHEET 1 880 680
    WIRE 16 112 -48 112
    WIRE 176 128 112 128
    WIRE 16 144 -48 144
    WIRE 176 160 176 128
    WIRE -48 256 -48 144
    WIRE 80 256 -48 256
    WIRE 176 256 176 224
    WIRE 176 256 80 256
    WIRE 272 256 176 256
    WIRE 176 272 176 256
    WIRE 80 288 80 256
    WIRE 80 304 80 288
    WIRE 32 368 -48 368
    WIRE 176 384 176 336
    WIRE 176 384 80 384
    WIRE 176 400 176 384
    FLAG 176 400 0
    FLAG -48 112 In_Peak_Detect
    IOPIN -48 112 In
    FLAG 272 256 Out_Peak_Detect
    IOPIN 272 256 Out
    FLAG -48 368 Ctrl_Peak_Detect
    IOPIN -48 368 In
    SYMBOL Ideal_OP_Amp 80 128 R0
    SYMATTR InstName X1
    SYMBOL diode 160 160 R0
    SYMATTR InstName D1
    SYMBOL cap 160 272 R0
    SYMATTR InstName C1
    SYMATTR Value 10
    SYMBOL nmos 32 288 R0
    SYMATTR InstName M1
    SYMATTR Value NMOSx
    TEXT 208 80 Left 2 !.model NMOSx nmos kp=40 L=100U W=100U Vt0=0.15 lambda=0.01

Code for the test file:
     Version 4
    SHEET 1 880 680
    WIRE 112 80 -112 80
    WIRE 352 128 272 128
    WIRE 352 144 352 128
    WIRE -192 160 -192 80
    WIRE -128 160 -192 160
    WIRE 112 160 -128 160
    WIRE -128 224 -128 160
    WIRE 352 224 -128 224
    WIRE -128 240 -128 224
    FLAG -128 240 0
    SYMBOL Peak_Detector 192 128 R0
    SYMATTR InstName X1
    SYMBOL voltage -96 80 R90
    WINDOW 0 -32 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V1
    SYMATTR Value PWL(0 1 10ms 1 10.01ms 1.4 20ms 1.4 20.01ms 0.5 30ms 0.5)
    SYMBOL res 336 128 R0
    SYMATTR InstName R1
    SYMATTR Value 1


texts: Is equivalent resistance always lower if we add a resistor to a passive electronic circuit?

texts:
How to prove that equivalent resistance of any passive network is always lower (or equal) if we add a resistor between arbitrary two nodes?

Note that this is not necessarily a parallel circuit, 2 nodes that we connect with a resistor are not the same 2 nodes between we want to measure equivalent resistance but completely arbitrary 2 nodes in passive network.

So imagine a circuit with 4 access points: A, B, C and D. We want to measure equivalent resistance between A and B. How can you prove that Rab will be less if we add a resistor between C and D?

I tried to search the web but didn't have any success.

To clarify, I am interested in equivalent DC resistance in an arbitrary network made of resistors only. How can we prove that the resistance Rab is not higher if we connect nodes C and D with any resistor?

tl;dr: 2 port network. Prove that connecting a load will reduce input resistance. In terms of z-parameters we need a prof that \$ Z_{12} \cdot Z_{21} > 0 \$.


texts: Safe to use both AC and DC with 4 channel relay?

texts:
I'm using a Sonoff 4-channel relay and I'd like to use one relay to switch 120v AC and another relay to switch 5v DC.

Is this safe to do?


texts:
I have always been confused between the difference between AC base resistance and AC emitter resistance which is usually denoted by r_e'. I've got the diagram as below:
As we can see there is another resistance they are considering denoted by r_b', in floyd's book its written that they ignore this r_b' due to negligible value, my question is: is it correct to assume r_b' as the ac base resistance? If no, please explain what exactly it is.


texts:
Im making a USB adaptor  for a Kinect sensor [to use on my computer].

here the schematic of what I did,

Now, the question,

I have soldered all cables with their color match, but There are 2 other "cables", the ones that go around shielding, and that are connected to the metal part of the actual connection,
Shall I solder this 2 wires?, the golden and silver on picture

Also, i have another question,
the cable now will meassure like 6 meters, is this ok? or is it to long?

thanks!


texts: Tap signal from TDA2822L, convert to line and instrument level

texts:
Essentially, I want to connect a really cheap musical toy with no outputs (other than a speaker) to line or instrument level equipment (for the full details, please refer to my previous question). The amplifier chip is a TDA2822L from Unisonic Technologies, driving a single 2.5W 8 Ohm speaker in the following arrangement (only connections for pins 1, 3 and 4 shown):

(this follows the "bridge" configuration described in the datasheet, with the exception of reversing the order of the resistor and capacitor)
The IC runs on a 7.5 VDC supply current, provided by five AA batteries. Using fresh batteries (providing around 8 volts unloaded), setting the volume at maximum, I measured around 1 VAC RMS across the speaker terminals. I expect this to be a somewhat inaccurate reading, as the device is not capable of producing sustained tones, so I had to use a backing rhythm for measurement. Furthermore, I found that the multimeter I used (an older version of the VC820-1) has a fairly slow sampling rate, so it might have missed some peaks. With a reasonably safety margin, I think it's safe to say that the output remains below 1.5 VAC RMS.
I want to tap this signal and send it to a line level output, as well as an instrument level output (only one at a time, selected by a switch). I have a fairly solid idea of how this circuit should be assembled, but I am uncertain on a few points.

Based on transistor's answer to my previous question, I figure for the line level output, I could just have a 10 Ohm pot between the output pins, like so (resistor+cap omitted for clarity):

I calculate that having 10 Ohms across the terminals as opposed to 8 would result in a roughly -2 dB signal reduction (compared to the original configuration) with the pot cranked up to the maximum. Is this calculation correct?

If the above calculation is correct, is a -2 dB reduction (from 1.0–1.5 VAC RMS) enough to avoid damaging line level inputs? If not, what potentiometer should I use?

For the instrument level output, I'm planning to add a series resistor before the pot:

For these resistor values, I come up with a -17.8 dB signal reduction. Is this calculation correct?

(assuming that the solution in 1. is acceptable for line level) What signal reduction from line level is necessary to avoid damaging instrument level equipment?

If the above simplified schematics above are acceptable, I will submit a final circuit design for feedback.


texts: 12V DC DMX LED Controller needs to be reduced to 5V

texts:
I need a bit of help for a lighting project I am undertaking.  I have a couple of 12 volt DMX LED controllers driving various zones in a bathroom with LED strip.

I want to replace the controlbox for the LEDs in the bath and drive it via my DMX system.  The output of the RGB bath controller is 5 volt per channel.

How can I reduce the output voltage from a 12 volt DMX RGB controller to be 5 volts?

Note the output voltage will need to vary based on the change of input voltage as the controller works through the various the various RGB colours.

Thanks for any input in advance,

Olly.


texts: What is IP and NK transformation (seen on earphones)?

texts:
By the side of my earphones, there's a switch that flips between two initials, IP and NK.

This Quora question suggests that this is the IP / NK transformation, which somehow makes the earphone universal.

What exactly is this and what is it for?

NB: I bought the earphones from China, and the manual is of very little use.


texts: How To Make A motor timer with Solar Panel

texts: I need to figure out how to make a 763RLN, 667RN Nutone Fan Motor rotate twice a day.  The motor is powered via a  TOOGOO(R) 1.5W 12V Mini Solar Panel. The idea is that we have a EXP1250 12V 5Ah Home Alarm Battery supply that will build up charge over the day by the solar panel and then reach a certain amount of power for the motor to run for 30 seconds on a low turning speed. What I need to know is how to possibly build or buy a timer that would allow my group to do this. Thanks.


texts: How do the access transistors in an SRAM cell work?

texts:
For example, in the picture above, how do M5 and M6 really work? how can they be turned on by simply asserting WL? wouldn't the transistors turn on or off based on the gate-source voltage?

I don't understand how, for example, it would be possible to turn on M6 when there is a 1 stored in Q. In that case asserting WL would only bring the gate-source voltage to 0, how can that be enough to turn it on?

Since I'm not satisfied with the only answer, especially since it seems to contradict itself regarding the pre-charging, I'm expanding it a little bit:

The usual explanation of the operation of the SRAM cell relies on both access transistors being turned on. Here (page 17) you can find an example. So I don't understand how the access transistors could be both turned on if the source was on the side of the bit lines (because you are bringing BOTH bit lines to HIGH during a read operation), or even if the source was on the side of the inverters (because then only one access transistor would be turned on during a write operation, the same that would be turned on during a read operation (because now the only thing that matters to turn on the access transistors is Q and -Q: remember that source is on the side of the inverters)). If both reading and writing turned on the same transistors provided that the contents of the cell are the same, then what's the difference between reading and writing? I don't think it's just the sense amplifier. I would like for someone to clear these doubts.


texts:
I'm pretty new in electronic stuffs and I'm still not sure what I'm doing, so my questions might seems retarded. I recently got an Arduino and I'm trying to build a mini-car with it, but I would like to connect 2-way motor. I read a lot information and figured out that I need H-Bridge and my schema must look something like this:

I'm not sure exactly about the usage of transistors. I thought all of these transistor could be PN2222. Am I right? The output of Arduino pins is 5V, would I need some kind of resistor between transistors and Arduino, also since this is gonna be 2-way motor, do I need a 1-direction diode, parallel to the motor? Is this schema gonna work?


texts:
I have written this code in system verilog to generate fifty 12-bit random numbers and write them to a file.

How can I generate the random numbers in octal instead of decimal?

Also, how can I make the numbers display on different lines? Currently, my numbers are being displayed one after the other.

module stimulus_gen();
  class stim_gen;
    rand bit [11:0] addr;
  endclass

  integer file;
  stim_gen obj;

  initial begin
    file = $fopen("input.txt", "w");
    while (!$feof(file))
    begin
     for (int i=0; i<50; i++)
     begin
       obj = new();
       assert(obj.randomize())
       else $fatal(0, "stim_gen::randomize failed");
       //transmit(obj);
       $fwrite(file, obj);
     end
   end
   $fclose(file);
 end
endmodule


texts:
I bought a contraption from aliexpress which included a stepper motor, and I can't figure out how to control it. The documentation is very poor (and chinese) so this is a puzzle question, maybe some of you will have an idea.
The motor has 6 pins, which are shown in this image from the docs (where it is connected to some unknown and ungoogable STM32 board):

The pins, top to bottom in the picture, and right to left in the table google translate to the following:

wire color
english
STM32 pin

violet
Motor line +
3.3V

black
Encoder GND
GND

blue
Encoder B
B7

green
Encoder A
B6

orange
Encoder 5V
5V

white
Motor line -
GND

My guess was that the Motor line + and Motor line - are for the power, and the remaining four are for the control. I connected Motor line + and Motor line - to a 3V source and the motor spins continuosly.
I then tried to connect Encoder GND, 5V, B, A to a microcontroller ground, voltage, and two GPIO pins and change the B & A values to 0 or 1. Nothing happens, the motor still spins continously to the same direction.
I hope that this "encoder A & B" is some kind of standard interface that some of you will know. Otherwise, I would appreciate hints on how to further interrogate the device.


texts: Why do my speakers make a noise when my cell phone gets a call?

texts: It's a very common sound but I've never thought to question why it happens.


texts: wheel encoder to find direction of wheel

texts:
I am doing an 8th semester project but I need to use an IR transmitter and receiver to find the wheel direction of car. I would like 8051 assembly level code to find wheel direction. I am using two IR transmitters and receivers to find direction. I am mounting these two IR modules to get following combination of output.

clockwise direction
LH-HH-HL-LH

Anti clockwise  direction
LH-HL-HH-LH


texts: How to set up a PLC for hobby home automation project?

texts: I want to use PLC to do security, temperature and light controls. I took case in PLC, but I don't have real world experience to set up a PLC system. Since I do not want to spend too much (less than USD$400 for PLC and HMI),  would anyone please suggest me what I have to buy and how much would they cost? I read a site , it says the AB mircologix is around $100 and the software is free. Would it be good for me my usage? Thanks


texts: Transmitting electricity to a specific customer in a smart grid

texts:
A concept of smart grid assumes "bidirectional electricity and information flow" and "prosumers" who should be able to sell generated electricity over the grid to customers. However I do not understand when a Seller fed a certain amount of electricity into the grid, using the grid as a transmission port to "send" electricity to buyer, how the Energy Distribution Company knows that injected amount goes to a specific Buyer (allowing him to receive that electricity if he paid for it)?
Your explanation would be much appreciated.


texts: Hi I'm wondering if there's any SMD IC chip to stabilize a 12v input to a stabilized output? I need something like that to regulate power on PCB. Thank you.


texts:
I want to use this circuit to generate a triangle wave from 100mv to 10v and an inverted wave from -100mv to -10v on triangle_inv. For my split rail supply, i'm using the VG1 circuit from this page virtual ground circuit

It works correctly generating the positive wave, however the wave on triangle_inv is centered on 0v. It's inverted like it's supposed to be, but where's the offset coming from?


texts: Derivative and Integral Controllers' Form

texts:
A derivative controller \$C_{d} = s-z_{d}\$ adds a zero to a system, placed at \$s=z_{d}\$. I know that a derivative controller is not used alone but for the same of the argument let's say it is.

In every source I have found an integral controller is defined to be of the form \$C_{i} = 1/p_{i}\$ and adds a pole at the origin of a system.

Why an integral controller always adds a pole at the origin and isn't of the form \$C_{i} = 1/(s-p_{i})\$ so it can place a pole anywhere?


texts: Send data from FIFO memory module to USB

texts:
I have a FIFO module running at 24MHz, producing 1 byte per clock. Then it produces 24MB/s. I need to send this data to PC through USB or Ethernet.

How can I achieve this?
Doesn't exist some USB controller or something?
Searching in the web I read about I2C but it seems very slow for my purposes.

This is what I'd like. However I'm able to reduce the amount of data to 6MB/s if no solution exists for the previous requirement.


texts:
I'm trying to implement function call after having timeroverflow or comparison of counter registers.

Chip: SAM4E

tc_init(TC0, 2, TC_CMR_TCCLKS_TIMER_CLOCK3);
tc_write_rc(TC0, 2, 750000);
tc_enable_interrupt(TC0,2,TC_IER_COVFS | TC_IER_CPCS);

NVIC_DisableIRQ(TC2_IRQn);
NVIC_ClearPendingIRQ(TC2_IRQn);
NVIC_SetPriority(TC2_IRQn, 0);
NVIC_EnableIRQ(TC2_IRQn);

tc_start(TC0,2);

I tried many codes that didn't work. I had to switch to TC0 so I could see the timer value actually changing:

  (TC0->TC_CHANNEL[2].TC_CV)

void TC2_Handler(void)
{
    ii++;
}

unfortunately this code doesn't work. (it has a bug that goes to infinite loop).

i can see timer value changing with this code but there is no interrupt handler working:

 sysclk_enable_peripheral_clock(ID_TC2);

tc_init(TC0, 2, TC_CMR_TCCLKS_TIMER_CLOCK3);
tc_write_rc(TC0, 2, 75000);
tc_enable_interrupt(TC0,2, TC_IER_COVFS  );

NVIC_DisableIRQ(TC2_IRQn);
NVIC_ClearPendingIRQ(TC2_IRQn);
NVIC_SetPriority(TC2_IRQn, 0);
NVIC_EnableIRQ(TC2_IRQn);

tc_start(TC0,2);

why is this not correct code?
why 'TC_IER_COVFS' doesn't trigger TC2_handler(). and it does not work also. (although i can see timer started)...
why 'TC_IER_CPCS' trigger fault ( i guess it goes to dummy_handler!).
what would be the correct way to fix this


texts: Shortenest focus distance of ov2640 camera modules with fixed focus

texts:
Is it possible to decrease focus distance to 3-4 centimeters on fixed-focus ov2640 camera modules which sell with chineese ESP-32 CAM or M5Stack ESP32 CAM?

Actually they setted up to infinity focus out of the box.


texts: What does a simple passive circuit to simulate an impedance mismatch look like?

texts:
I am trying to learn some of the basics of circuit design. One thing I am curious to make a filter/schematic of is what happens when a voltage source hits an impedance mismatch.

eg. A high impedance audio signal (like a passive electric guitar output around 7,000 to 15,000 Ohms) hitting a low impedance input (like a mixing desk at 2,000 to 5,000 Ohms).

What would a circuit like that look like so I can simulate it to see how the mismatch affects the output or frequency spectrum?

Also, if it is purely an impedance mismatch will the frequency response be flat across (ie. just a gain response)? Does there need to be capacitance/inductance involved in the simulation for there to be a low pass effect to it? How might that typically present?

Thanks.


texts: Electricity consumption of unscrewed light bulb

texts: I've got 4 light bulbs connected to one switch but I don't need this much light in my room. Plus I'm a bit afraid for my electricity consumption. Would unscrewing 3 of the 4 light bulbs lower it?


texts:
I am looking for some microcontroler with external bus for program memory, and witch is supported by GCC.

I read this Atmel ATSam3U datasheet (I have no experience with this familly, yet) and there is note about external bus. Since ATSam3U is hardvard processor, I suppose this bus is for data memory and not for program memory. Am I right?


texts: Not getting correct values in I2C interfacing in Atmega

texts:
I'm very new to the concept of I2C and I've been having some problems interfacing I2C between 2 Atmega32(s).

I have one Atmega32 as a Master to which an LCD screen is connected
and another I2C as a slave to which a LM35 has been connected and
both of these Atmega have been connected with the SDA and SCL lines.
So, although I am getting data on the LCD screen attached to the
master, I'm not getting the right values. Like the temperature is 28
Centigrade here but the LCD that is connected to the master keeps
repeating 65280 for some reason. Can someone tell me where I'm going
wrong? Code for both the master and slave devices have been posted
below.

The Master code:

int main(void)
{
    unsigned int xx=0x00;
    unsigned char yy;
    DDRA=0xff;
    I2C_init(); //I2C initialization
    lcd_init(); //LCD initialization
    while(1)
    {
        for (int i=0;i<4;i++) //Getting unsigned int data from slave, so
        {                     //broke data into 4 parts and receiving
            if (i==0)         //one byte at a time.
            {
                I2C_start(0x01);  //I2C start along with the address of the slave
                yy=I2C_read_ack(); //Read slave data along with an acknowledgment
                xx |= (yy << 8);
                I2C_stop(); //I2C stop function.
            }
            else if (i>0)
            {
                I2C_start(0x01+1); //don't know any particular reason
                yy=I2C_read_ack(); //behind this, but if i don't do 0x01+1
                xx |= (yy << 8);   //then the master ends up reading the
                I2C_stop();        //address as a data packet.
            }
        }
     lcd_num(xx);   //lcd function to display unsigned int data.
    }
}

The Slave code:

The slave code is just repeating one function again and again so I'm not posting the whole code, just the snippets in between.

int main(void)
{
    xx=adc_read(0); //reading from ADC0 of the Atmega.
    toTransfer = (5.0 * xx * 100.0) / 1024; //calibrating the temperature

    if (byte == 1) //send packet 1
    {
        toSend = toTransfer & mask; //sending the first 8 bits of data.
        toTransfer = toTransfer >> 8;//right shift so that the next function will take the 8-16 bits of data.
        TWI_match_write_slave(); //I2C function to verify address
        TWI_write_slave(toSend); //I2C function to write data on to master
        byte = 2;
    }

    /*Repeating this till byte 4*/

    else if (byte == 4) //send packet 4
    {
        toSend = toTransfer & mask;
        toTransfer = toTransfer >> 8;
        TWI_match_write_slave();
        TWI_write_slave(toSend);
        byte = 1;
        //initialization for next turn
        mask = 0xFF;
        toSend = 0;
    }
}

update: I've tried this with no luck:

unsigned int xx;   //I just wrote it here so that you don't have to refer the code again-
unsigned char yy;  //-not present in the main loop.
I2C_start(0x01);   //yy is receiving data one byte at a time from the slave
yy = I2C_read_ack();
xx = (xx|yy);
xx<<8;
I2C_stop();

Similarly for the else statement in the code posted by me originally.

Whatever value I send, the LCD on the receiving end is printing 255.


texts: Custom built 16x32 (40) LED Matrix controlled by Arduino

texts:
I am planning to build a clock / thermometer / info display. I have ordered 10 pieces of 8x8 LED matrixes from ebay (http://www.ebay.co.uk/itm/331064583297).
As this is not a pre-built one I have got to design some sort of circuit which will be able to do the trick.

The commercial ones work by segments, each 8x8 is one segment and you has to shift the code though each segment to get to the last one. (I would rather go this way as this requires more components.)
My idea is to make it one big Matrix, not 8 smaller one. A TLC5940 or two 74hc595 would be able to control the lines and i would be able to controll this way the colls as well. (2 TLC5940 or 4 74hc595). (Or 5 74hc595-s and make it 16x40)

So I think I have got this part figured (maybe not share your ideas), but how am I going to display text on these pixels? How am I going to produce the "image" (the array), which should be shifted out? (Not to mention running text, animations, etc..) I am not quite sure how this is going to work.

Oh and the Arduino can be any type, I prefer the MEGA2560 so we don't have to worry about the program size. And I will be able to hook up my RTC, Ethernet Module, Temp sensors, buttons, etc...

Every bit of info is a plus on this. The displays will arrive in 3-4 weeks so it would be nice to have this figured by the time they arrive.


texts: Is it possible to mod a class 2 bluetooth device to work as a class 1 device?

texts:
I have two Microcontrollers which communicate over a bluetooth link (serial link, like RN-42). So far so good. Unfortunately the device is listed as a class 2 device and I noticed that the distance is indeed very limited.

Acoordingly I was wondering if it is somehow possible to mod the chip to act as a class 1 device. Is it enough to connect the chip to a better antenna? or do I need active amplification. In case I need active amplification I would appreciate if someone could point me to some tutorial, which help me getting started.

Many thanks.


texts: Calculating Phase angle from instantaneous voltage

texts:
For background info I am an EE/CE that is 10 years out of school and has since worked writing firmware and dealt mostly with digital communications and signals, so now I am having to reach back to my (very) atrophied analog knowledge.
I am working with a 4 channel ADC, and I am trying to get a rough estimate of the input skew between channels when a 'simultaneous' capture is performed.
So I got the device with all 4 channels hooked up to a single sine wave from my function generator, performed the capture, and am now trying to analyze the data.
I know the max amplitude of the sine wave, as well as the frequency. I remember calculating instantaneous voltage for known phase angles, but I can't seem to figure out how the get phase angle from voltage (I am aware that there will be two possible angles for a given voltage).
my overall game plan is to determine the angle of each reading, then using the known frequency get skew time by \$sk = (Ch2\angle - Ch1\angle) * (360 \div hz) \$
so I guess the short question is, how a can I get phase angle for a point on a known sine wave,
or the long question is; is there a better way to go about what I am doing?


texts:
I'm using the SN74HC595 to drive 36 LEDs (industrial, with internal current limiting), except the LEDs (which aren't substitutable) are common-anode, so I'm using 36 MOSFETs to handle that, like so:

simulate this circuit – Schematic created using CircuitLab

The problem becomes how to get those 36 -12V supplies, without increased load on one LED reducing the power available for the others. Any ideas?


texts: Mutual inductive coupling and proximity effects

texts: I am struggling a bit to differentiate between proximity effect and mutual inductive coupling. Proximity effect: if a conductor is carrying an alternative current the nearby conductors will witness an increase in their resistance (proximity effect resistance) because of the modification in their current distribution. Whereas the mutual inductive coupling generates an induced emf. Isn't the impact the same, making thus proximity effect = mutual inductive coupling?


texts: Effect of magnetic field on energy gap of semiconductors like diode,transistors

texts:
I am doing my project on energy gap of semiconductors. For that i have an doubt that what will happen to the energy gap of diode if it is exposed to magnetic field intensity?
Is it possible to place diode circuit in the magnetic field?
If yes what is the relationship between enrgy gap and magnetic field. How can it calculated?


texts: What is a beginner-friendly microcontroller and why?

texts:
I can do basic electronics.  I want to experiment with microcontrollers but the world is awash in a myriad of choices.  This is paralyzing.
What are beginner-friendly choices and why?  Bonus love for information about extra equipment needed (like a chip programmer), dev kits, or DIP-friendly packaging.
This is mostly about learning. If I were going to do a project, it would be to configure switches and other sensors in the chicken coops to monitor door status and temperature etc, and then send a status report back to a receiving station at the house via a laser (?).  Something like that.
EDIT - I am a programmer by trade, though I have never done any embedded programming. I am experienced in assembler coding as well as c coding. Doing a thing on an event or when a pin goes high doesn't sound challenging. I could be showing my ignorance :-D


texts:
I'm building something that I want to control from mcus, and while I'm fine with the MCU part, I'm in the dark about motors and want to avoid buying too many of the wrong ones while I figure it out. The requirements:

the motor will turn a wooden plank, not sure about the size yet, but probably on the order of a couple of feet wide, maybe up to four feet long, half inch thick. Imagine it like a miniature desk that can rotate to tip on it's side I guess. Stuff will be rolled on and off it.
need to be able to accurately position the plank in terms of time and degree position (for the rolling stuff)
it ought to be able to turn 90 degrees in as little as about 0.25 to 0.5sec, though if this is a pipe dream I could live with slower, say 1 to 2 seconds
sometimes things will be on this plank, or hitting the plank (balls and getting bounced or rolled off it). I don't know enough to know if this complicates things by adding variable torque requirements or something

I'm guessing this is not a cheap device, so if anyone has pointers on what I need for such a task, I'd love to hear them. Both in terms of type and model. thanks!


texts: Piezo speaker driver not giving full differential voltage - why?

texts:
I am trying to drive a piezo speaker at 20kHz with maximum voltage swing from a 10V source. Previously I had used a square wave plus its inverse to give the equivalent of 20V across the speaker but I knew this could be improved. My research revealed autotransformer and LC resonant circuit options and I also came across TI's DRV8662 as well as the LT3469 from Linear.

After considering the choices I tried an autotransformer which didn't work (I guess the frequency I needed was too high for the sample autotransformer I had) so I settled on the tuned LC approach.

Fig.1 is the LTSpice circuit that I breadboarded and it works pretty well. C5 represents the piezo speaker and L1 is the resonant inductor. With preferred component values I get resonance at about 23kHz. The single-ended waveform on my scope across the speaker is 38Vpp which correlates pretty well with the simulated one in fig.2 (OUT_A blue trace). In the simulation I show a 2nd output across C2 (OUT_B red trace), to show the two out of phase waveforms of equal magnitude.

The goal was to connect the two complementary outputs across C5 ( omitting C2) and getting 2x the voltage swing. One difference to note between simulation and breadboard is that I use a TC4428 dual high-speed MOSFET driver with inputs from one 555 rather than the outputs from the two 555 timers as in the simulation - the second 555 in the simulation configured as an inverter was purely to get a quick LTSpice model running with a square wave source plus its inverse.  The TC4428 has complementary outputs plus good drive capability for capacitive loads.

Fig.3 shows what I intended to be the final differential drive setup and fig.4 shows the LTSpice waveforms. The green trace is what I was hoping to get. It all looks good but in practise I do not get the full differential waveform across the speaker and the question is why. Instead of approx. 80Vpp I am getting only 35Vpp. Each output measured separately shows they are down to about 16Vpp instead of the previous 38Vpp. My assumption at the outset was that I need the same value inductor for each of the outputs to get resonance since they are driven independently , but perhaps this assumption is wrong. The simulation seems to suggest that this assumption is indeed correct. I also included ESR in C5 as well as series resistance in L1 and L2 in the simulations. Replacing the speaker with a 100n cap on the breadboard produces the same results.

It seems as though the TC4428 is running out of puff (highly unlikely - the total power drain is approx 300mA) and the power supply is not going into current limit. So I have run out of ideas.

Questions:

What could be causing the loss of amplitude in the individual signals and hence in the differential?
Are there additional considerations that I've missed when driving the load differentially?
Is my assumption about the inductor values incorrect?
Is the duty cycle of the driving waveform critical to the outcome?

I have researched similar questions on this forum eg. Differential Driver Maximum Output Voltage Swing but none that I could find address this situation. Any insight would be most welcome.


texts: Logic level mosfet to switch on 3.7v battery

texts:
Can anyone recommend a logic level mosfet(2v-5v gate) that can switch on/off a 3.7v lipo battery. Battery load will be 2-3 ampere on 3.7v-4.2v. I tried something like FQP30N06L but will only work on Drain Source Voltage of 5v and above.

I've been reading some mosfet datasheet but im not sure how to look for my requirements. All of the datasheet just mention the maximum Vds(drain source voltage). How do you know from the datasheet the current it can support from a particular Vds?

Will appreciate any input. Thank you!


texts: Confusion about power source/supply on the STM32F103C8T6 Blue Pill

texts:
I am attempting to program and STM32F103C8T6 Blue Pill board using an ST-LINK V2 debugger, i have the 4 pins connected to SWDIO, SWCLK, 3.3V and GND, and then connected into the 4 pin header on the board itself. I am using the Arduino IDE to program it, and I can run the "Blink" program to flash PC13, but i modified the code to the following to try and flash an external LED:
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(PC13, OUTPUT);
  pinMode(PA7, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(PC13, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(PA7, HIGH);
  delay(1000);                       // wait for a second
  digitalWrite(PC13, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(PA7, LOW);
  delay(1000);                       // wait for a second
}

However this doesn't flash the LED in PA7 at all. Further, i would assume that plugging an LED into the 3.3V/5V and Ground on the blue pill would power it up, however it doesn't light up at all.
Am I doing something wrong is my board possibly broken? It doesnt seem to be outputting at all, other than the onboard LED.


texts: Separate voltage and current from regulated DC power supply

texts:
I am currently doing a MPPT(Maximum Power Point Tracking) using Arduino UNO.
So far I have pretty much almost finished the coding. When I was about to test my program using a regulated DC power supply, it suddenly occurred to me that I had done things wrongly. How was my circuit going to detect/read the voltage and current values?

Regarding this, I do not know how I can let my Arduino circuit detect the current and voltage values separately on each analog input. I would be using the current and voltage value (pv_I and pv_Vnew) to multiply them together to obtain the power value.

My problem is that I need help with the hardware, getting the voltage and current values into the ADC I hope someone can help me with this problem.

If it helps, this below is a part of my code where i do the multiplying and stuff.

float pv_I; //input current
float pv_Vnew; //input voltage

void reading(void)
{
  pv_I = analogRead(A0);     //This is the area that is in question
  pv_Vnew = analogRead(A1);  //This is the area that is in question

  reading_value[0] = pv_I;
  reading_value[1] = pv_Vnew;

  Serial.print("Current, Voltage: "); //Start of string

  for(int i = 0 ; i < 2 ; i++)
  {
    Serial.print(reading_value[i]);
    Serial.print(", "); // Seperate each value with ',' to identify them seperately
  }

  Serial.println(" END"); // End of string
  delay(500);

}

void PowerCalculation(void)
{
  tempPower = pv_I * pv_Vnew;
  pv_NewP = tempPower;

  Serial.print("Calculated Power: ");
  Serial.println(pv_NewP);
}


texts: Convolution of positive and negative functions?

texts:
I am trying to do convolution for the function below

The correct solution is as follows:

I tried solving the problem, below is my attempt:

Can you please advise me where is my mistake?


texts: What value to use for Byte Count field in PCI Express (PCIe) IO read completion?

texts:
In PCI Express (PCIe) a completion packet is to be generated for both memory read and IO read.
A Byte Count field is part of the completion packet, and for a memory read (MRd) in the simple case, this field simply indicates the number of returned bytes.
However, for IO read (IORd) the "PCI Express Base Specification Revision 2.1" specifies in section "2.2.9. Completion Rules" that "... For all other types of Completions, the Byte Count field must be 4.".  So, even through IO read request can be of size 1, 2 or 4 byte, the spec. says that the completion packet Byte Count field should be 4.
When doing simulation on an Altera/Intel FPGA, I have some indication that this special casing of the Byte Count field value for IO read is not correct, through it is difficult to determine if it is a simulation only problem.
Is the spec. right about this special casing of Byte Count field value for IO read?


texts: On new phones, how are two batteries at half capacity able to charge faster than one at full capacity?

texts:
Lately, there seems to be a trend in cell phones where they have 2 separate batteries, and this is claimed to increase changing speed. See "Oppo suggests that because the two batteries can be charged at once, charging can go faster than if the device only used one unit." And "With this new setup, both batteries can charge at more than 30W simultaneously while staying cool even when using the phone,"
As I understand it, lithium batteries have charge rate typically defined in C, where C is the capacity. For ex. a 4Ah battery with a 2C charge rate can charge at 8A. This leads to the idea that the battery charge time is 1/C hrs (ignoring the constant voltage segment at the end).
With this understanding, splitting the battery into 2 cells shouldn't increase charge speed at all. Is there some electrochemistry explanation I'm missing for why smaller capacity cells have higher charge rates?


texts:
I need to convert 220 V AC to 12 V DC in my circuit that can provide minimum 100 mA at 12 V DC.  It should always be on 24 hours a day and 7 days a week. I don't want to use a transformer because my current should be small. I want to use this to power a microcontroller.

Can I use this circuit? What is the output current of this circuit?


texts: Recording IR data directly from Remote Control

texts:
I am trying to record the IR codes from my projector's remote. Nothing seems to be working and I need some help.

I want to be able to directly record the IR signals that my remote is putting out when a button is pressed.

My thinking is that I just need to solder some wires to "tap" the IR LED and feed those wires into the GPIO on the Pi.

I do not have an IR receiver sensor, and don't really want to order one. At this point I want to get this idea to work as a proof of concept.

Currently I have the folliwing: Raspberry Pi 3b+ (buster) Optoma HX180X projector Projector Remote Control (random remote control model number is CN1082)

I have LIRC installed on my Pi. I used the following forum post to install it. It seems like the only legit way to install it. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=235256

I soldered a wire to the + and - of the IR LED. I plugged the + wire into PIN18 GPIO of my PI. I plugged the - wire into the ground of my PI (I tried using a shard ground, no ground, floating ground... nothing seems to work).

There are three issues I am running into:

Some times the IR LED is "ON" 100% of the time. When everything is plugged in to the PI I can see the LED is 100% lit (using my cell phone camera). When I unplug the GPIO or the Ground it shuts off. Not sure if this is due to the GPIO outputting a voltage for some reason I have it set to input, or an issue with the LED diode voltage being exceeded, or the ground not being correct so it is... I have no clue!
Sometimes I can get it to not be "ON" 100% of the time, and then I can run mode2 in LIRC, but it just spams SPACE 2 PAUSE 2 SPACE 3 PAUSE 3 SPACE 2.... fills up the console instantly.
I can't even use -f with irreecord to get the non-gapped signals.

I've tried pullup and pull down resistors, neither did anything.

Does anyone have any advice on how to make this work. I have been trying everything and feel that I am missing something super obvious.


texts: PIC32 Assign Port Bit to Variable (in C)

texts:
The pins i connect some LEDs to might change during the development (and routing) so I would like to assign the Port bits to a variable (so if the LED has to be connected to another port I only have to change port assigned to the variable and instead of updating each call in the code).

I would like to do some kind of the following in C:

#define myvariable = PORTB.RB11;
#define myvariable2 = PORTB.RB12;

main(){
    if(...)  myvariable = 1;     // B11 is HIGH
    else myvariable = 0;         // B11 is LOW
    if(...)  myvariable2 = 1;
    else myvariable2 = 0;
}

Does anyone know how to do this?

I'd be happy if you could post the two lines of code. (assignment and usage)

Thanks!


texts:
The following is a diagram from a DAC datasheet. It's an output stage for a high end audio DAC which has differential outputs.

What would be the best way to implement this when only a single supply voltage is available (say 9v) rather than a dual supply?

Thanks
B


texts: How to split isolated an audio trigger signal for processing by an ADC

texts:
I have a problem trying to split a drum trigger signal so that I can process it via an ATXMEGA64A3 microcontroller. The goal is to have the signal going from the trigger to both the existing sound module and also to my microcontroller for other processing.

The issue I am running into is that I need to isolate the orignal signal so that my microcontroller circuit doesn't affect the original signal going into the sound module.

How can I isolate my side of the signal process so that the original analog signal isn't affected by noise from my own circuit.

Attached is the schematic of the board I'm using to connect the trigger input, "thru" it out and a RJ45 connector that goes to the main microcontroller board. Please note that this RJ45 connector is receiving digital signal to control a bunch of ws2812b LED and this introduce noise in my analog signal (not sure how). On my side of the processing, I can live with a bit of noise, but this is the reason why I want to know how I can isolate the signal going to the sound module.

VCC is 5v provided by the mainboard through the network cable. GND is also provided by the main board through the network cable (using a ground plane on the main board PCB).
WSLED input is the signal going to the ws2812b LEDS.

In case it might be of any help, here is the PCB design:

When looking with the oscilloscope, between J1's pins, I see a bunch of noise probably due to my digital signals going on. I guess removing this noise is out of the scope of this question as it deals with mixed signals on the same board. I mainly want to protect J2 from receiving it.

Edit:
Another important problem in this circuit is that if I measure the trigger output directly from a 1/4 cable, I get about +5v peak of signal. As soon as I connect my board, I get 500mv peak signal. Even with no LED, or RJ45 connected. Where is this signal loss occuring? I tried removing the capacitor in case it was filtering the signal, same loss of signal. I really don't get it. Can there be some inductance generated by the PCB which would kinda "absorb" the peaks of my AC signal?


texts:
I want to design my first wireless device.
I want to use an RF module called RC-S2LP-868.
My problem is that I don't know how to connect an SMD antenna (ANT-868-HESM) to that. There is a small SMA connector on the module, I think this will cause some unwanted reflections if I don't use it, right? I want to solder the antenna pin and route a 50ohm micro strip line from there to the antenna.
What should to I do?


texts: Custom Eagle Part has isolation built-in?

texts:
I've just created the footprint for a QFN-56 8mmX8mm to be used with the TLC5958.

It seems like there is some sort of isolation built in to the center pad and I cannot figure it out.  In the image below, you can see that I have six vias that are to be all connected to the GND layer on the bottom.  The vias are placed here just to show the issue and won't be in those spots in the finished board.

As you can see the vias show a signal connection, but for some reason the outer polygon pour doesn't connect with the GND below the IC.

Here are the properties of the thermal pad, from what I see, there isn't anything that would cause it to just isolate itself from everything else.

What property or anything could be causing this?


texts:
I have found out the output voltage to be 9V.

To find power, we need \$I_CV_{CE}\$

We can find \$I_E\$ from the output circuit.

\$ I_E=\frac{6}{24k}+\frac{9}{10} \$

But can we find \$I_C\$? Or do we have to approximate \$I_C\$ approximately equal to \$I_E\$?

Will increase of \$ V_{in}\$ by 20% anyway impact the transistor currents?


texts: This may be simply a logic.ly issue. I'm trying to simulate a JK flip-flop in logic.ly/demo using two AND gates and 2 NOR gates, but the simulation does not work when both inputs are high and the clock is high (i.e. Q and Not Q does not toggle). I've set an initial state, so the S and R are working fine working, but once the J and K are high and the clock is H, the circuit goes haywire? Is it a logic.ly issue (level of complexity not quite there)?


texts: Cascode Amplifier vs Cascode Amplifier with CMOS current source

texts:
So I studied the gain cascode amplifier as follows,

I understand that the gain for this circuit is approximately -(gmro)^2

Now, here is a different circuit using the cascode amplifier but instead of a standard current source, we use a PMOS current mirror.

Now, I am told that the gain for this circuit is just gmro, no square. Why is that? I mean clearly all we did was replace a standard current source with a PMOS current mirror? Shouldn't the gain for this circuit also be -(gmro)^2?


texts: Commanding numerous motors with one H-Bridge

texts:
Is it possible to command more than one motor with an H-bridge like this:

Would this work in real life if I replace switches with transistors and command them?


texts: What is the feedback network of this negative feedback amplifier?

texts:
I'm working through this handout Feedback In Amplifiers and learning how to visualize simple transistor circuits and their negative feedback.  I'm perplexed by the example given for current-shunt feedback.  The example circuit simply includes the symbol \$\beta\$ in a box, labelled as the "feedback network."  Below is the schematic in question (last page of PDF).

With where the feedback network is connected, it looks sort of like it might be the portion of \$R_E\$ that was not bypassed by \$C_E\$.  But this doesn't seem right because \$R_E\$ usually provides feedback in series, right?  And it wouldn't be connected as it appears before \$R_1||R_2\$ either.
What components exist within this "black box" of feedback?  And, if no one knows, is anyone able to point me towards a single-BJT example of current-shunt feedback?


texts:
I’m working on a project that involves a STM32 MCU (on the STM32303C-EVAL board to be exact) that has to respond to an external interrupt. I want the reaction to the external interrupt to be as fast as possible. I have modified a standard peripheral library example from the ST web page and the current program simply toggles a LED at each successive rising edge on PE6:

#include "stm32f30x.h"
#include "stm32303c_eval.h"

EXTI_InitTypeDef   EXTI_InitStructure;
GPIO_InitTypeDef   GPIO_InitStructure;
NVIC_InitTypeDef   NVIC_InitStructure;

static void EXTI9_5_Config(void);

int main(void)
{

  /* Initialize LEDs mounted on STM32303C-EVAL board */
  STM_EVAL_LEDInit(LED1);

  /* Configure PE6 in interrupt mode */
  EXTI9_5_Config();

  /* Infinite loop */
  while (1)
  {
  }
}

// Configure PE6 and PD5 in interrupt mode
static void EXTI9_5_Config(void)
{
  /* Enable clocks */
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOD | RCC_AHBPeriph_GPIOE, ENABLE);
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);

  /* Configure input */
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
  GPIO_Init(GPIOD, &GPIO_InitStructure);

  /* Connect EXTI6 Line to PE6 pin */
  SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOE, EXTI_PinSource6);

  /* Configure Button EXTI line */
  EXTI_InitStructure.EXTI_Line = EXTI_Line6;
  EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
  EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
  EXTI_InitStructure.EXTI_LineCmd = ENABLE;
  EXTI_Init(&EXTI_InitStructure);

  /* Enable and set interrupt to the highest priority */
  NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn;
  NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00;
  NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x00;
  NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
  NVIC_Init(&NVIC_InitStructure);
}

The interrupt handler looks like this:

void EXTI9_5_IRQHandler(void)
{
  if((EXTI_GetITStatus(EXTI_Line6) != RESET))
  {
    /* Toggle LD1 */
    STM_EVAL_LEDToggle(LED1);

    /* Clear the EXTI line 6 pending bit */
    EXTI_ClearITPendingBit(EXTI_Line6);
  }
}

In this particular case, the interrupts are created by an external programmable function generator running at 100 Hz. After examining the MCU response on an oscilloscope, I was rather surprised that it takes nearly 1.32 us for the MCU to begin processing the interrupt:

With the MCU running at 72 MHz (I’ve checked the SYSCLK output on the MCO pin beforehand) this amounts to nearly 89 clock cycles. Shouldn’t the MCU response to the interrupt be much faster?

P.S. The code was compiled with IAR Embedded Workbench and optimized for highest speed.


texts: What is the correct name for this chip? And how to read it?

texts: I seen this type of chip on credit cards and various other electronics like printers. What is it called in the electronics field? Is there a specific protocol on how to read and write to it? Is there a reader/writer machine? Software?


texts: How to stop erroneous signals on startup of an RF circuit

texts:
I have a really janky setup where I'm using an ESP and some transistors to "push" the buttons on an RF remote control, used for controlling electrical outlets. The circuit works perfectly during normal operation, it's very simple, but when the power gets reset the remote control might send out random button presses, which I think is caused by the ESP itself and the way it starts up. What I'm wondering if there's anything I can add to delay the remote control board getting power, or something to buffer the signals from the ESP so short pulses get ignored while longer ones go through fine? I'm not familiar enough with that kind of circuit yet to know where to start. Here's a schematic of my circuit right now.

simulate this circuit – Schematic created using CircuitLab

That's the basic workings. There's a 3.3v regulator to drop the 5v input and the remote control is powered from the same 3.3v as the ESP, but that wasn't necessary for the schematic. The nodes that go to the remote control pins are soldered onto the button pad on the circuit board.


texts: Binary Counter and an Oscillator for frequency generation

texts:
I'm interested in creating low frequencies using a high-frequency oscillator. For example - using a 12Mhz oscillator to create 1Khz, 2Khz waves.

I've been said that using a Binary adder(oops) counter it could be accomplished.

Anyone could please help me to understand how this can be done? Also, I should use a low-pass filter for Sine(ish) waves. How does this come into place?

The target is to create about 5 distinct frequencies and "stream" them out of the circuit. The circuit should be very cheap - so no mC could be used.

Many thanks for the help :)


texts: I'm looking for the right audio amplifier, but am lost in a maze as an unexperienced starter

texts:
Firstly thanks for helping out!
The problem I am facing is that I have to power 24 audio exciters (2W max, 8 Ohm) from a microcontroller which is currently 5V but might be switched to 3.3V later on. Currently we use one pin to send a blockwave signal (think of 300Hz) to 24 different digital potentiometer channels (0-10kOhm, I2c controlled, this to set the power of every audio exciter seperately) after which each signal should go through an audio amplifier that is powered externally, finally the signal arives at the audio exciters.
My question here is; what amplifier, or kind of amplifier, do I need? Preferably it should be able to be put on a PCB in the near future so an ic is the best choice. Do i know all info to pick out a good amplifier, and what should I be looking for?
I have tried looking around, however there are so many specs and possibilities that I just get lost every single time. Any advice would be highly appreciated, remarks on the design are also welcome!


texts: I need to connect a sensor that uses a RS485 transmission to RS232 or something I can read through the com ports on my data logger. I can't use usb ports or virtual com ports due to the program I am required to use not accepting data through usb in any form. Is there a way to convert the RS485 to something I can input through the DB9 connection available on the computer? I am pretty new to data transmission in general.


texts:
I am experiencing something very weird with the footprint manager. When I allocate and validate the footprint change of some component, the footpring manager ECO , I validate and execute and everything goes fine.

However later when I try to update the PCB the ECO tell me footprint is not found as if the footprin manager operation I made previously was useless.

When I edit manually each component one by one in the schematic it works properly. I have only this problem with the footpring manager, I don't understand why it doesn't work

Why the foot print manager is not taken in consideration ?


texts: Measuring battery voltage in PV scenario with MPPT charge controller with inverter

texts:
So I'm doing a PV project with wifi enabled statistics.

I'd like to see the watts coming in and out and the battery charge level, estimated battery charge and discharge time.

I'm designing PCB to have everything neat, and to not have to connect any wires.

Parts:

I chose ACS hall effect sensors instead of shunts.
ACS712 5A/20A modules (or going to 758/770 for PV) and ACS758 or ACS770 50A depending on which I will be able to get my hands on. I don't believe that 2 pins of SOT8 package can carry 30A through them.
MPPT charge controller with built in inverter for PV applications. It has AC backup when battery voltage goes below 30% threshold.

The datasheet of the PV controller states the charging voltage for battery is 13.8V±0.5V. So I'm unsure if it will gradually bump the voltage up to charge the battery or just flat line it.

Here is the problem with the battery charge monitor. I'm not sure how to detect the voltage of the battery itself when it's getting charged. If the inverter charges the battery at constant 13.8V there is no "standard" voltage divider way, if I understand correctly.

Also for the watts out calculation I need to know:

AC power coming out

watts in:

AC power coming in
PV power coming in

and for the battery charge time

current battery voltage level (without load and without charging)
watts coming into the battery
watts coming out of the battery


texts: Is it safe, or even possible, to draw more power from a USB port than it was designed to provide

texts:
One of the products being shown a CES is a dongle intended to let you charge a tablet from a laptop USB port that normally wouldn't work because it didn't provide enough power.

The CNET writeup implies that it's actually boosting the power output from the port beyond the normally available amount.  This seems improbable to me because the ports should have current protection to protect themselves from shorts.  Also, if it was possible to bypass the current limit externally, I'd've expected at least some tablet vendors to have included the ability to do so directly in their cables.

One possibility that occurs to me is that the dongle is just spoofing responses to the tablet when it queries the laptop about the maximum power it can deliver while only providing a trickle charge that the tablet would otherwise reject as too slow to bother with.


texts: My washing machine is equipped with a capacitive start button. A "button" is marked with paint on the plastic front and on the backside of the panel there is a spring extruding from the control PCB, pressing against the inside of the plastic panel. I would like to trigger this using an Arduino. While searching for answers I've been trying to use a metal foil, grounded through a relay to trigger the button, but inconsistent results. Could I connect directly to the spring, in any configuration, to trigger this button in a simple way?


texts: Cause for failure after short circuit Step-Down Converter Input

texts:
I'm currently evaluating the Semtech TS30042 step-down converter. My input voltage is 24V, output voltage is 5V. I followed datasheet recommendation in my layout in most aspects. The problem is, as soon as I short circuit the 2 clamp input ports (see second image below) the converter gets destroyed instantly! It seems there is some internal short circuit after that in the TS30042 because the voltage of my power supply drops to some mV and the current is on maximum. Short circuiting the 2 clamp ports, causes a short arc (as expected!).

My first self etched prototype board is this:

After testing everything I ordered a professional board. Both with full ground plane btw.

The only difference between these two is a slightly different layout and some different components. Especially the diode changed, previous was PMEG40T20ERX (now NRVTSA4100T3G), and the inductor was some Würth type, new one is 1267AY-4R7N=P3. Output capacitancy is 2x22µF (previously was 2x22µF+10µF). I replaced several components several times to be sure that it was not caused by a failed component.

I tried the same thing on my prototype board, but as often as I short circuited the input the same never happened. 4 converters are already destroyed. What could be the reason for that failure on my board and why doesn't it happen on my prototype board? Did I made any layout or circuit mistake?

FYI: The other 2 PAM2316 converters are not connected

Edit: Inserting a Schottky Diode from Vout to Vin as suggested also doesn't solve the problem.


texts:
I've wrote a program to run the UART on a custom board, using the the atmega328p only with the internal oscillator, here is my code :
#define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>
#define BAUD 9600
#define MYUBRR    F_CPU/16/BAUD-1

void init_uart(unsigned short uValue  ){
    // setting the baud rate
    UBRR0H =(unsigned char)  ( uValue>> 8);  // 0x00
    UBRR0L =(unsigned char) uValue;  // 0x0C
    // enabling TX & RX
    UCSR0B = (1<<RXEN0)|(1<<TXEN0);
    UCSR0A = (1<<UDRE0);
    UCSR0C =  (1 << UCSZ01) | (1 << UCSZ00);    // Set frame: 8data, 1 stop

}
int main (){
    init_uart(MYUBRR);
    DDRD |= (1<< PD7);
    for(;;){
        PORTD ^= (1<< PD7);
        UDR0 = 'k';
        //_delay_ms(500);
    }
    return 0;
}

I've set the register values based on the examplein the datasheet page 241.
the problem that I have is, that I'm not receiving the word correctly, here's what I get :

So any idea what I'm missing here ?
thanks in advance !


texts: External SDRAM with Blackfin and FreeRTOS

texts:
I have a custom board with Blackfin DSP and External SDRAM 64 MB and FreeRTOS.
Reading from SDRAM using task with priority 6. In a test I read about 20000 words. Each word is twice consecutively, some the of words read do not match between the first read and second read. The two reads are done immediately one after the other.
If I repeat the same test using the highest priority, I do not get any errors.
If do the same test without FreeRTOS, I do not get any errors.
For normal operations I need to keep reading the SDRAM at low priority.
Any suggestions how to solve this issue ?d
Where I need to look to find the cause of this issue ?
Thanks.


texts: Arduino HC SR04 distance sensor still works even if not connected to gnd

texts:
I'm fairly new to electronics & arduino.

When experimenting with the arduino wemos & the distance sensor HC SR04 I noticed that connecting the GND isn't necessary. It looks like the gnd is channeled through the Trig digital output instead. I conclude this as I measured 2 mA on trig where the 2mA is otherwise measured on the ground. If GND is connected Trig remains 0mA.

As 2mA is lower than the max of 10mA it will not hurt the Arduino wemos but will it hurt the distance sensor? I'd prefer not to use the GND as not using the GND automatically turns off the distance sensor when it's not used(saving half the power in deep sleep). So no need to use a PNP transistor setup then (I can't use the digital output as VCC as the arduino wemos only supplies 3V on it's digital outputs)

I'm not sure if it has any influence but the TRIG output is on a 10k Pull-up pin.


texts: Power amplifier schematic details identification

texts:
I have that power amplifier schematic.

Why it's written that it's class A? I think that only voltage gain stage is class A and output is class AB or it's not so?
Why the collector of Q8 is at ground? What that ground actually do and does the Q8-Q9 stage is a darlington stage or not?
How much voltage must be between C-E of Q10 rubber diode to avoid output distortion?


texts:
I tried to understand what is going on when one jump starts a car with a dead battery and reading through a lot of explanations, one question remained:
You start by connecting the the + poles with the first (red) cable. After that, you take the second (black) cable and connect it to the - pole of the charged battery.
For safety reasons, you apparently should not connect it to the - pole of the dead battery though, but rather to some bare metal away from the battery. Here is where I am confused. While it is explained everywhere why we do not want to connect it to the battery directly and I think I understood the issue here (risk of explosion), I could not find an explanation for the following:
How does connecting the cable to some arbitrary piece of bare metal charge up the battery? Does that mean the negative pole of the battery is connected to all of the metal in the car, and thus the current flows through the whole car body during the process?
Maybe I also have a fundamental physical misunderstanding here, I hope someone can enlighten me.


texts:
After reading the excellent article on bare metal by David Welch (https://github.com/dwelch67/raspberrypi/tree/master/baremetal), a friend and I are trying to implement a simple GPIO toggle. It's built on David Welch's blinker01 (https://github.com/dwelch67/raspberrypi/tree/master/blinker01). I simply updated the peripheral registers to correspond to GPIO 3 on the raspberry pi. I found these addresses by looking through the BCM2835 data sheet (https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf). Chapter 6 lists all the locations of the GPIO pin settings.

We load the code onto an SD card and then power up. The program works: we get a 2.5MHz square wave on the scope.

** Why is it so slow? **

The processor has a clock speed of 1 Ghz. The operation we implemented loops 10 lines of assembly (i.e. does 10 lines of assembly then branches back to the first line of those 10). I'm new to bare metal/processors and I understand that a given line of assembly can take several clock cycles. Assuming each line takes 10 clock cycles, I would still expect a 100ns period for the output, which would be 10MHz. I feel that is a conservative lower bound on the output frequency, since some assembly lines only take a single cycle.

Furthermore, I found this article:
http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/

This person managed to get a 22MHz output on a raspberry pi 1 using a similar approach but using linux' mmap. The code that they used as a base is located as the first example on this page:
http://elinux.org/RPi_GPIO_Code_Samples

** Edit: I originally thought that the 22MHz was achieved on a raspberry pi 2, but that is incorrect. They state that they achieved this output rate on a pi 1 which has the BCM 2835 chip in it **

Note: Although this debatably belongs on StackOverflow, I felt that it's a "harder" problem in that it has to do with the circuitry in the processor and the peripherals.

Edit: Assembly code is here:
Disassembly of section .text:

00008000 `<_start`>:

    8000:   e3a0d902    mov sp, #32768  ; 0x8000
    8004:   eb000005    bl  8020 <notmain>

00008008 `<hang`>:

    8008:   eafffffe    b   8008 <hang>

0000800c `<PUT32`>:

    800c:   e5801000    str r1, [r0]
    8010:   e12fff1e    bx  lr

00008014 `<GET32`>:

    8014:   e5900000    ldr r0, [r0]
    8018:   e12fff1e    bx  lr

0000801c `<dummy`>:

    801c:   e12fff1e    bx  lr

00008020 `<notmain`>:

    8020:   e92d4010    push    {r4, lr}
    8024:   e59f002c    ldr r0, [pc, #44]   ; 8058 <notmain+0x38>
    8028:   ebfffff9    bl  8014 <GET32>
    802c:   e3c01c0e    bic r1, r0, #3584   ; 0xe00
    8030:   e3811c02    orr r1, r1, #512    ; 0x200
    8034:   e59f001c    ldr r0, [pc, #28]   ; 8058 <notmain+0x38>
    8038:   ebfffff3    bl  800c <PUT32>
    803c:   e3a01008    mov r1, #8
    8040:   e59f0014    ldr r0, [pc, #20]   ; 805c <notmain+0x3c>
    8044:   ebfffff0    bl  800c <PUT32>
    8048:   e3a01008    mov r1, #8
    804c:   e59f000c    ldr r0, [pc, #12]   ; 8060 <notmain+0x40>
    8050:   ebffffed    bl  800c <PUT32>
    8054:   eafffff8    b   803c <notmain+0x1c>
    8058:   20200000    eorcs   r0, r0, r0
    805c:   2020001c    eorcs   r0, r0, ip, lsl r0
    8060:   20200028    eorcs   r0, r0, r8, lsr #32

`


texts: Why is the center tap of the transformer connected to the positive terminal of the 12V DC battery?

texts:
Schematic of the DC to AC inverter circuit:

Why is the center tap of the transformer connected to the positive terminal of the 12VDC battery?


texts:
I am trying to amplify a simple 120mVPP  sine wave (4K Hz) to a 5VPP signal being made by an AD9850 being controlled by a raspberry pi. We started off using a 741 but realized after asking you guys that 741's are garbage and attributed the output being clipped at ~2.8VPP to it being a 741 (We had the supply at +-15V). We then moved on to try using some more recommended OPAMPS such as a TL072CP and a OPA2227P and ran into the same exact "clipping" issue all being run at their recommended max voltage supply +-15 (We were able to get ~3VPP with these but no where near what we expect to see out of the OPAMP). At this point I am assuming it may not even be a clipping issue (despite it looking like clipping). I was wondering if anyone had any insight into what may be causing what looks like clipping at 12 volts lower than the rail on multiple different opamps?

We want to run the amplifier off of 5V or 10V preferably which should be fine if the OPAMP is rail to rail but if this is not possible with an OPAMP realistically then we read that using an instrumentation amplifier may be a better path too if anyone has any input on that?

simulate this circuit – Schematic created using CircuitLab


texts: S-Parameters, Smith Chart, and Reflection Coefficients

texts:
Please help guide my ignorance on this topic.

From what I understand, S-parameters are reflection coefficients generalized to N-port systems (via an S matrix), but for a 1-port system, these converge to the same thing?

In addition, how does this all relate to the smith chart? How does one get the reflection coefficient out of the chart and how fundamentally does that relate to the normalized load impedance you're plotting on there?


texts: a Power Supply with Short Circuit Protection that Automatically turn Off when Shorted and automatic resumes its function if not shorted without using any switches. thus anyone know how to build this? or do you have any idea how to build it?


texts: A question about AC Ground and Shielding

texts:
I see this question on EE but reading those I am not sure they answer what I am asking here.

This is the problem. I am designing an audio device that is powered by an external 15VDC adapter. This external adapter wall plug have two pins. No ground connection to the AC outlet. The output of this adapter has two wires, positive and negative.

Internally, my device is receiving this 15VDC and creating a virtual ground, that is 7.5V, 0V and -7.5V.

This is an audio device and it has an amplifier, so I will have shield cables all over the place, from the volume potentiometer to the PCB, from the input/output connections to the PCB and so one.

Like I said, this device has no ground wire connected to the AC power outlet but I need the metal case to act as a RF shield, to prevent hum.

How should I proceed in terms of wiring? I mean, I have all these cable shields. Should I connect all the cable shields to the metal case? Should the metal case be connected to the internal 0V?


texts:
I wanted to make a cheap and simple high voltage protection circuit which can turn off my appliance for 10 sec when high voltage hits. Generally DIAC works on 30volts. I have dozens of these DIAC I wanted to join them in series so that when ever 400volt hits (followed by relay) my application can be saved from high voltage.
Can anyone tell me how to increase breakover voltage ( VBO ) of a DIAC? Can i join it in series in order to achieve this.


texts: Inconsistent voltage on buck converter (TPS54240)

texts:
I'm currently facing a weird issue. For one of my project I had to design a buck converter circuit in order to step down the voltage of three LiIon batteries to 3.3V so I can power a microcontroller.
I'm using the TPS54240 chip. The datasheet can be found here.
A typical application schematic is shown on page 31. Since said circuit outputs 3.3V I was able to more or less copy it. My schematic looks as follows:

After ordering a PCB prototype the buck converter didn't really work, unfortunately.
When I applied ~7.4V (2 LiIon batteries) to VCC the output showed ~3.3V as I was expecting. However once I connect a load, in my case the microcontroller, the voltage dropped to ~3.26V. Why is this happening? I thought a buck converter utilizes a feedback loop in order to maintain a constant voltage. The TPS54240 chip itself is rated for up to 2.5A in this case and my microcontroller isn't even pulling 100mA.
Even more confusing was the scenario when I connected ~11.1V (3 LiIon batteries) to VCC. In that case I measured ~2.6V at the output, which again dropped significantly to ~2.4V just when I connected a LED that drawed maybe 20mA. My microcontroller wasn't able to power on on such a low voltage making the circuit more or less useless.
Since I don't have a ton of experience with designing a circuit (this was my first project) I don't know how to troubleshoot this problem.
I would appreciate any kind of help. Thanks!
Edit: This is the PCB layout of the circuit.
Edit 2: Here is a possibly fixed PCB layout.


texts:
I'm a student who is trying to build a wah pedal for a guitar. I came across this diagram for how to wire the circuit (from this site) :

Within the diagram, I am not sure what the following symbol means:

This variant of the symbol also appears in the diagram and I am not sure what to make of it either:

I'd much appreciate if anyone could explain these symbols to me as the only place I have been able to find these online was on this very circuit diagram and no context is provided as to their meaning.


texts: How does speaker's power output affect sonar's detection limit and it's resolution?

texts: I am planning to make a sonar application using smart-phone speaker and microphone, and it is given that speaker's power output is 3 watts and sound frequency is 20 kHz. I wanted to understand how will the quality of detected signal decrease with increased distance and at what distance limit the received signal would be too weak for the readings. I made some research and my assumption according to it is that reliable maximum range would be between 10-25 meters, yet I am unsure. But it is still unclear for me how the range is being calculated and how does it relate to the properties(size and shape mainly) of the objects that are going to be detected. And I wanted to know if knowledge of power output and frequency is sufficient to answer the above question? I would appreciate if you can bring some clarification to the topic or maybe if you can share some reference material for better understanding. Thank you very much.


texts: Power amp current source reserve requirements

texts: If I use current sources in power amplifier need I make it current value 5 or more times greater than the next stage may consume? For example if I drive 6 amp current though load I may found that 6/(betta_MJL3281A * betta_2N6473) = 6/(75 * 15) = 5ma. Need I set Q5 emitter resistor (0,65 * 2/25ma) to drive 25ma current (with reserve) or I may drive without reserve, i.e. 5ma?


texts: Resistor values for getting a gain of 10.86 in instrumentation amplifier

texts:
I am just stuck with a problem. Here using an instrumentation circuit (see image below). I want to know the exact value of resistors for a gain of 10.86. I have calculated and found some values (25K and 5.1K), but I am not sure whether they are right or not.

EDIT (Circuit change prompted by a comment: gain resistor is now split)


texts: Search terms for serial number IC or memory dump without initialization?

texts:
I have an existing product which I'm tasked to add an electronically read serial number to. There are specialized ICs for the purpose but they all require some initialization or handshaking before the serial number is sent out, but all I have access to is a (fairly slow) clock and an enable signal from power-on-reset circuity or user pressing a manual reset button. I can't ask the end user to press the button in many kHz rate and "Morse code key" an SPI sequence or emulate an I2C master. Also the circuit would reset each time. Downstream is much simpler though, there I can decode whatever protocol is needed or parse out the serial number from whatever structure. I basically don't have any mean of an incoming RX, just outgoing TX and I just need it to bootstrap itself.
I'm an analog guy out of my element here and I need help with some search term for how to proceed.
I'm sure and MCU would do this for me, but it would require software environment, programming in mass production, revision control and what not. If everything else fails, this is my backup solution.
What search terms should I be using? Silicon serial number (seems related to Maxim and all 1-Wire)? Unique serial number IC (Microchip I2C EEPROMS turns up here)? Is there some weird memory type which once programmed will just dump it's contents once started, or can be configured to do so?
EDIT: The product does not contain an MCU today.


texts: What happens with Source and Drain when I use PWM on the Gate of a MOSFET?

texts: I see some people using PWM to control the Gate of MOSFETs, what happens in the MOSFET when you use PWM on the Gate ? If I use Arduino to PWM the Gate of the MOSFET, will it control the voltage between the Drain and Source or it will only turn on/off very fast ?


texts: LTSpice - voltage goes through the roof in LC circuit

texts:
I am trying to simulate an oscillator in LTSpice.
So I tried to make a simple LC circuit.
Since a voltage source would not make the circuit oscillate,
I did not use a voltage source and made the capacitor start with 6 volts.
But for some reason the voltage just explodes and goes to almost 200kV.
I have no explanation for this phenomenon.
Maybe someone can help me with this.
https://imgur.com/a/xqQeaaG


texts: The easiest way to transmit data with clock using an MCU

texts:
Assume you have an MCU running at 80Mhz (Currently working with TI M4)
This MCU has 128kB of memory allocating some data.

What would be the proper way to transmit this data in its raw form (bits only, no start bits, no end bits, no handshake, no acks, no gaps, no protocol) over one of the MCUs pins and a clock on another pin.

I need to reach 20Mhz, minimum 15Mhz. I was thinking of using an FPGA but an MCU would be much easier (and cost effective).

SPI can work at 1/4 the MCU speed so, technically, it is possible to run SPI on Tiva in 20Mhz. but I do not need the SPI protocol...


texts: inverted PCB plug approach (to connect two single sided boards with jumpers)

texts:
Currently, I'm only capable of producing satisfactory single-sided PCB's. I wouldn't dare to do double-sided, and I'm not at the stage to hire someone to do double-sided PCB's especially when I don't know if the circuit in the end will function or not.

Anyways, My design requires me to make two circuit boards. One large one with all the IC's and such on it, and one small board that stands out which flashes numbers from a numerical display.

The large board will have standard male headers sticking out on it which is easy to assemble and solder.

The small board will have female headers, but because I'm doing single-sided boards, and the component side of both boards face the user, doing a thru-hole version of the female header is not possible as there is no pads on the component side.

What I have thought of is creating the following:

It accepts a 10-pin female header. 8 of the 10 pins will be bent to fit the SMD pads shown and the outer two pins will be through hole for easier and more accurate installation.

The red is the restrict layer, the yellow will be the bottom track connections, the little circles are holes, and the grey box is the outline. The grid here is 1.27mm

I will be bending the middle 8 leads at a right angle as shown here:

But then again for stability, I might bend some leads the other way as well, but eight of them will be bent at 90 degrees.

I am new to SMD and this is the only semi-smd component I will be using in my project. In order to increase the odds of successful auto-routing, I have some questions with regards to this part:

Are the smd pads shown in my part optimal size both in length and width?
Am I ridiculous with using all of the restrict layers?
Should I modify my design a bit for increased chance of auto-routability?

I know an easy way out is to eliminate this idea all together, stick with regular header holes and run wires from board to board, but I want to try a more professional approach.

Please advise.

update

I forgot to mention that the headers themselves are not the only things used to hold the board in position. I will also use stand-off posts with screws that both connect electricity. Most screws and posts will be connected to common ground and one will be connected to VCC.


texts: creating a switch using arduino's digital outputs

texts:
I'm trying to charge a simple servo that only has + and - pins. Usually I would connect it's - pin to the ground and + pin to the digital output from Arduino. This works, but the servo turns weakly and can be stopped by hand. If i connect the servo directly to the battery or to 3.3 pin from the Arduino it turns strongly and i cannot stop it.

I tried an op-amp amplifier and a PMOS transistor in order to let the servo get power from 3.3V or the battery, but didn't work out.

Anyone has already did something similar and can share with me his/her design?

----- edit:
this is the servo i'm talking about.
https://solarbotics.com/product/gm20/

----- update:
Now that I have worked on more projects, I think this kind of task should be done through an H Bridge as explained here: http://www.instructables.com/id/H-Bridge-on-a-Breadboard/
I tried it (obviously for another project) and it worked like a charm!


texts:
What \$R_{on}\$ do I use to calculate the delay for an inverter gate? In my class we came  up with two definitions of \$R_{on}\$, one for saturation and one for triode. Is there a certain mode I should assume for the transistor or do I need to calculate it by hand? I wasn't given a V_in though so I don't know how I'd be able to calculate the mode by hand. Am I missing something really obvious?

Drawing of the inverter:


texts: Decoupling capacitors on opposite side of board when using PCB mount EMI shield

texts:
When using a PCB mount EMI shield, can you put decoupling capacitors on the back side of the board?

Well of course you can put them there, but will it make the shield essentially useless?  Or will the effect of placing the capacitors on the back be unnoticeable?

An answer that could quote dB/uV results from an actual measurement on any design where decoupling capacitors were placed opposite the shield (for a power supply, CPU, or anything else) would be great.

For context, I am putting the shield around four switching power supplies.
1)  +15V to +5V/250mA which is LT8606IMSE running at roughly 500KHz.
2)  +15V to +3.3V/250mA which is LT8606IMSE running at roughly 500KHz.
3)  +15V to -15V/50mA which is ADP2360ACPZ-R7 running at variable frequency up to 450KHz.
4)  +15V to 7.5V out 500mA which is LT8611EUDD running at about 900kHz.

There are several capacitors 0603, 0805, 1206 size that I would like to place on the bottom to make the design more compact.

Since my EMI shield is surface mount I could try and put a footprint for one on both sides as a fall back plan (although I am not sure how well that would work out in the reflow ovens).


texts: Is it possible to power an Arduino Uno with a Raspberry Pi?

texts:
I have an Arduino Uno and a Raspberry Pi that I'm using to control some LEDs in a computer case. Power is coming from a Molex connector from the computer's PSU. I want to place the Arduino and the Pi at the top of the case, but the power supply is at the bottom. In order to try and reduce the length of wire runs, I'd like to power one of the devices from the other.

When I supplied 12V to the Arduino through the Vin pin and tried to supply 5V to the Raspberry Pi via the 5V pin, I ended up frying the Arduino (too many amps?). I was wondering if I could do the inverse: supply 5V to the Arduino through the GPIO 5V pin, then provide 5V to the Arduino through the other GPIO 5V pin. According to the diagram here:

http://www.megaleecher.net/Raspberry_Pi_GPIO_Pinout_Helper

there are two 5V pins and five ground pins that I can use. I'd like to prevent against frying something else though. Will my idea work, or is this a foolhardy idea?


texts: I recently posted a question asking for information on the Russian divider IC KR512PS10 (as transliterated from Cyrillic), but nobody appeared to know anything about the device. I have now measured some of these ICs and have produced a brief datasheet to summarise what I have discovered. Where would be the best location to place this document (always assuming anybody is interested in this weird thing)? Does a generic datasheet repository exist?


texts:
I've built a circuit on a breadboard using a 10K potentiometer, a 220 ohm resistor and a LED. They are connected in series. Using Ohm's law, you find that:

Total resistance \$R = 10000 + 220 = 10220\Omega\$

Battery: 9V.

\$I = \frac{V}{R} = \frac{9}{10220} \approx 0.88mA\$

Isn't that current too tiny for a LED? But even tough, it lights up at this resistance. Can anyone explain?


texts: Wiring design for USB voltage and current tester

texts:
With reference to this article USB Voltage and Current Tester, it shows a diagram as follows:

May I know if it is the same as the following circuit diagram:

This is because according to the article, they only use the black and red cable.

There is no mention of how should I do with the green and white cable.

If the circuit diagram is wrong, I would appreciate if someone can enlighten me the correct circuit diagram.

Thank you.


texts: Simple enough question. Why not use a 741 op-amp in a target circuit or anyone's target circuit? What are the reasons not to use it? What might be the reasons to still choose this part?


texts: How to measure max current of a power supply

texts: I have a 220V to 12V adapter. According to the adapter label, the max current can reach 1.5A. But I want to measure the max current it can reach without depending on the information written on the adapter. How can I do it?


texts: How to know that I am grounded with an anti-static wrist strap?

texts:
The resistance of my Belkin anti-static wrist strap shows 0.983, but how do I know that I am grounded by attaching it to computer power supply alone? See the picture below.

How do I know if that resistance is absorbed by the grounded contact? Must I touch a metal plate below the strap with one lead and power supply with another lead?

UPDATE: I wanted to know if there is a contact between wrist strap and power cable's grounded contact through power supply. Since wrist strap works, i wanted also to know that grounding it to power supply and then connecting to power outlet will work as well so i touched wrist strap's metal plate with one lead and grounding contact of power cable with another lead and saw same resistance as mentioned above. This means that everything works.


texts: Flux density in a transformer after switch off

texts:
Consider a transformer primary driven by sinusoidal mains.

In my circuit I have an NTC thermistor in series with the primary which I short out after a few cycles to limit the inrush current at start-up.

This transformer is a very large torriod in my case 1800VA rated.

Now modelling this transformer as ideal (no losses) with a magnetising inductance \$L_m\$ in parallel with the primary we can work out the flux swing in the core.

$$v = N \cdot Ae \dfrac{\text{d}B}{\text{d}t} \Rightarrow \Delta B = \dfrac{1}{N \cdot Ae} \int_{- \frac{T}{2}} ^{\frac{T}{2}} V_{rms} \cdot \sqrt{2} \cdot \sin(2 \pi \cdot f \cdot t) \text{ d}t $$

$$\Delta B = \dfrac{V_{rms} \cdot \sqrt{2}}{N \cdot Ae \cdot \pi \cdot f}$$

Now because the transformer was allowed to saturate during start-up with current limited by the thermistor \$B_{max} \approx \dfrac{\Delta B}{2}\$ and \$B_{min} \approx - \dfrac{\Delta B}{2}\$.

Now we consider the transformer to have been running for several hours and we have a single negative half cycle drop-out (to 0V).  Just prior to the drop-out flux density \$B\$ was at it maximum value ,and because the voltage has remained constant zero over the missing half cycle, has not changed. The next positive half cycle causes \$B\$ to increase and the transformer may saturate again.  In my experience most commercial  transformers do saturate.

Now let's change the scenario: Again we start the transformer but instead of having a half cycle drop-out we just turn it of precisely at the end of a positive half cycle. The flux density is at a maximum value. Does this stay the case forever as this simplified   version of the maths suggests or is there a mechanism to reduce the flux density over time?

If so what is it and how would you estimate the flux density at some later time \$t\$?


texts: Extracting the Most Energy From a Capacitor

texts:
I have a 5V super capacitor which I'm trying to extract the most energy from in the most efficient way possible.  This capacitor is tied to the input of some regulator (which is the question of this post) that is regulating a (say) 2.5V output rail @ ~1mA.  Something along these lines.

simulate this circuit – Schematic created using CircuitLab

I've looked into parts from common Semiconductor companies (Linear, TI, etc.), and it seems that I can go down two paths with this mystery regulator:

Use a buck-boost regulator (such as LTC3530).
First boost the voltage to a voltage slightly higher than 2.5V (such as LTC3400-1) then buck the voltage down to 2.5V (e.g. LTC3406A).  When the input capacitor voltage is greater than 2.5V, the boost regulator is bypassed and only the buck is active.  Conversely, when the input cap voltage is less than 2.5V, the boost is active, outputs a voltage greater than 2.5V (say 3.3V), and the buck then steps the voltage down to 2.5V.

(Note: the parts selected above are for illustrative purposes only).

Option 1 would give me an effective input voltage range of (5V-1.8V) = 3.2V, while Option 2 would give a wider range of (5V-0.8V) = 4.2V.  If I have a 1F input cap, these ranges correspond to 10.88J and 12.18J of useable energy respectively.

It would initially seem that Option 2 is the preferred method, but adding two power stages (boost, then buck) instead of using a single combined stage (buck-boost regulator) adds more losses, which is where the gain in useable energy from Option 2 becomes a wash.

I've tried crunching the numbers using the efficiency plots provided in the datasheets (for said parts and other parts from other manufacturer), but there are a lot of variables that affect these values, which can drastically change which Option is more beneficial.  There are also other factors to consider such as losses in the inductor and capacitors, which I am unwisely neglecting.

Does Option 1 extract more energy from the input capacitor than Option 2?  Or, how can I make Option 2 more energy efficient such that is outperforms Option 1?


texts: How to read output across a 2-wire DC magnetic or hall effect sensor? Also my requirement of switching frequency is 1000 Hz, but most of the sensors out there have a maximum switching frequency of 5000 hertz. Will this affect accuracy when I measure low frequencies?


texts: Finding success probability for wireless channels

texts:
This seems a very dummy question, but I cannot figure out how the following equation has been solved by authors:

$$P_{secure} = \text{Pr}\{\epsilon cP_sd_{su_i}^{-n}|h_{su_i}|^2> cP_sd_{se_i}^{-n}|h_{se_i}|^2\}$$

(The details of the parameters are present in the image attached below)

I want to learn the method and hope the community here does not mind my naiveness! The final solution is:

$$P_{secure} = \frac{\epsilon d_{se_i}^n}{d_{su_i}^n+\epsilon d_{se_i}^n}$$


texts:
simulate this circuit – Schematic created using CircuitLab

In this circuit, I am asked to calculate Thevenin Voltage Vth between A and B.

This is the first time I am asked to calculate Vth between two distant point and I am not sure how to proceed.


texts:
This question relates to my previous question.

I am interested in deriving an analytical relationship  for the oscillation frequency of this oscillator.

As the first step, I have initiated the frequency domain simulations and results are as follows. In order to see the effect of the oscillation frequency, I sweep the value of C2 from 0.5pF to 6pF (oscillation sustains within this range).

The AC model is: (Mosfet capacitances are extracted from the datasheet)

The phase and magnitudes of voltages at secondary inductor and Gate voltage are as follows. I have marked resonances close to the oscillation frequency.
simulations is done for different secondary capacitor values 0.5pF,and 5PF.
In both the cases three resonances can be seen (say f1, f2, and f3)

When C2=5pF (oscillation frequency in time domain simulation is 8.3MHz)

When C2=0.5pF (oscillation frequency in time domain simulation is 25.1MHz)

From these results, it can be seen that the resonances in AC simulation and the oscillation frequencies are significantly different, particularly for high frequencies.

My questions are:

Am I moving in the right directions with the simulated AC model?
What could be the reasons for the disparities between AC model and time domain simulations?
I understand that mosfet capacitances can be varying with frequency and voltages. In addition, certain capacitances may not effective throughout the oscillation period (when the switch is fully on). How can I model the mosfet capacitances in this circuit?
As I am biasing the transistor just enough to start the oscilation (Vt0=4.486V and V(bias)=4.26V), can we still assume mosfet provides a 180 degrees phase shift? How can I incorporate this in the AC simulation.

An Update

I found a similar analysis for a slightly different oscillator in "class-e mosfet tuned power oscillator design procedure". In the analysis, they have measured mosfet capasitances at the frequency of interest and phase shift introduced by the mosfet was known (phase shit was 196 degrees in their study). If I can approximate these parameters ((i.e., Cgs, Cgd, Cds, and phase shift introduced by the MOSFET) at each oscillation frequency, I should be able derive an analytical (rather a semi-analytical) form of solution.

Is there a simulation based method that I can approximate MOSFET capacitances and phase shift introduced by the amplifier stage?

Update 2

Trying to express the loop gain expression

First, I tried to simplify the coupled network for the fundamental frequency component as follows.

Where reflected impedance are calculated as (Mij represents the mutual inductance between ith and jth inductor)

Now my goal is to write loop gain equations to obtain the oscillation condions
But I am not sure how should I differentiate the amplifier and feedback network


texts:
Newbie question here. I am putting together a remote switching box for power circuits aboard a yacht. The design is for a central Raspberry pi to send orders to a few boxes, each controlling a number of circuits distributed through the vessel. Each box will contain an Arduino communicating with the RPi using XBee.

Each circuit will have a typical draw of a couple A with a max of 15 A. Typical switching frequency will be very low with some circuits staying almost always on and others almost always off.

My question is for the actual switching, should I choose relays or MOSFETs? My question is specifically around power conservation which is a primary concern on a sailing vessel. Given the high heat output of the MOSFET, am I correct in assuming these are wasteful components? More so than a relay?


texts: Ceramic pressure measurement - capacitive or piezoelectrical?

texts:
Context: I'm writing about an old industrial training facility used for a petrochemical process.
In this training facility, there is a 3-phase separator. On that separator is a pressure measurement. My teacher, having limited knowledge of the facility in question, told me that the sensor was "ceramic".
I searched for ceramic pressure measurement sensors and found two principles. At least, I think they are two different principles, however I suspect they may be the same principle but explained differently.
My current (mis)understanding:

The capacitive principle: A ceramic membrane is exposed to the process pressure. This process pressure will cause it to bend, which will increase its capacitance (probably due to an increase of proximity to an electrical contact?). The higher the pressure, the thicker the membrane needs to be, lest it break. Due to the increasing thickness requirements, this measurement principle only gets less and less accurate as the pressures get higher.
The piezoelectrical principle: A ceramic membrane is exposed to the process pressure. This pressure causes it generate a small but measurable voltage, due to its molecular structure. The voltage's magnitude is translated into a measure of the pressure's magnitude.

Now, I suspect that these two principles may actually be talking about the same principle, though perhaps focusing on different aspects of the principle. The reason for my suspicion is that I don't know a lot about electricity, and it seems unlikely to me that people would be using ceramic materials for pressure measurement for a while without noticing that the material had a piezoelectrical property that could make it usable for presumably better pressure measurement.
Now, my teacher said that it is most likely the capacitive principle being used in the facility in question, but he said the piezoelectrical principle is most common nowadays (the facility is quite old). So, it seems like my teacher thinks the principles are in fact distinct, but I'm unsure. Any thoughts?


texts: control systems - how to obtain the transfer function from this block diagram?

texts:
I am trying to find the transfer function for this basic block diagram

According to the book I am reading I should be able to derive the transfer function (given in the image above) from the block diagram, but I think I am doing it totally incorrectly... This is what I tried:

Could anybody correct me?


texts:
Hello and thanks beforehand. I have this document in altium that has some weird issue with some vias. As you can see in this photo, some vias are like greyed out on the grey part, and they are not affected by the clearance rules between the vias and the polygon pours. However, i cannot think what is the problem with those vias since the properties between those vias and the correct ones (line the one on the bottom left corner) are exactly the same. By replacing those vias with a copy of a normal one everything goes back to normal but there are a lot of them and i would rather know what causes this. DRC does not throw any errors which is what bugs me the most. It only happens in one layer for each via, so if one via is greyed out in one layer it won't be for the rest of the layers.

This are the properties of a normal via

And this are the properties of a greyed out via.


texts: I however do not see any wrong with my approach. But I am not getting the correct answer. Is there anything to do with grounding? Or am I missing something else?


texts: Need help designing power distribution system

texts:
I need help designing the power distribution system for a rocket test stand. I am new to power electronics so I am confused about how to go about it.

I have to supply power to 8 solenoid valves that require 24V and 4A to actuate. I am planning to use two 14.8 V Li-Po batteries to supply power to each of the valves. So I need to be able to step down 29.6 V to 24 V.

Where I am confused is should I have 8 separate step-down converters that will convert 29.6-24 V and 4A of current , or should I have a single step down converter that converts 29.6-24V but supplies 32A of current that will be split into eight 4A current to each valve when connected in parallel.

I have little experience with this, so any help is appreciated!

Link to Solenoid: https://clarkcooper.com/hpv/EH70.html#HiPresstabs=2
Link to battery: https://hobbyking.com/en_us/turnigy-high-capacity-battery-20000mah-4s-12c-drone-lipo-pack-xt90.html