texts: STM32F4 : Floating point instructions too slow

texts:
I'm working on an audio application on the Nucleo F411RE and I've noticed that my processing was too slow, making the application skip some samples.

Looking at my disassembly I figured given the number of instructions and the 100 MHz CPU clock (that I've set in STM32CubeMx), it should be a lot faster.

I checked SYSCLK value and it is 100Mhz as expected. To be 100% sure I put 1000 "nop" in my main loop and measured 10 µs, which does correspond to a 100 MHz clock.

I measured exactly the time taken by my processing and it takes 14.5 µs ie 1450 clock cycles. I think it's way too much, considering that the processing is pretty simple :

for(i=0; i<12; i++)
{
    el1.mode[i].phase += el1.osc[i].phaseInc;  // 16 µs
    if(el1.osc[i].phase >= 1.0) // 20 µs (for the whole "if"
        el1.osc[i].phase -= 1.0;
    el1.osc[i].value = sine[ (int16_t)(el1.osc[i].phase * RES) ]; // 96 µs
    el1.val += el1.osc[i].value * el1.osc[i].amp; // 28 µs
} // that's a total of 1.63 µs for the whole loop

where phase and phaseInc are single precision floats, and value is an int16_t, sine[] is a look up table containing 1024 int16_t.

It shouldn't be more than like 500 cycles, right? I looked at the disassembly, it does use the floating point instructions...
For example, the last line disassembly is :
    vfma.f32 => 3 cycles
    vcvt.s32.f32 => 1 cycle
    vstr => 2 cycles
    ldrh.w => 2 cycles

(cycles timing according to this ) So that's a total of 8 instruction for that line, which is the "biggest".
I don't really get why it's so slow... Maybe because I'm using structures or something?

If anybody has an idea, I'd be glad to hear it.

EDIT : I just measured the time line by line, you can see it in the code above. It seems like the most time consumming line is the look up table line, which would mean that it's memory access time that is critical? how could I improve that?

EDIT2: disassembly, as requested by BruceAbott (sorry it's a bit messy, probably because of the way it was optimized by the compiler):

membrane1.mode[i].phase += membrane1.mode[i].phaseInc;
0800192e:   vldr s14, [r5, #12]
08001932:   vldr s15, [r5, #8]
08001936:   vadd.f32 s15, s15, s14
0800193a:   adds r5, #24
179 if(membrane1.mode[i].phase >= 1.0)
0800193c:   vcmpe.f32 s15, s16
08001940:   vmrs APSR_nzcv, fpscr
180 membrane1.mode[i].phase -= 1.0;
08001944:   itt ge
08001946:   vmovge.f32 s14, #112    ; 0x70
0800194a:   vsubge.f32 s15, s15, s14
0800194e:   vstr s15, [r5, #-16]
182 membrane1.mode[i].value = sine[(int16_t)(membrane1.mode[i].phase * RES)];
08001952:   ldr.w r0, [r5, #-16]
08001956:   bl 0x80004bc <__extendsfdf2>
0800195a:   ldr r3, [pc, #112]      ; (0x80019cc <main+428>)
0800195c:   movs r2, #0
0800195e:   bl 0x8000564 <__muldf3>
08001962:   bl 0x8000988 <__fixdfsi>
08001966:   ldr r3, [pc, #104]      ; (0x80019d0 <main+432>)
184 membrane1.val += membrane1.mode[i].value * membrane1.mode[i].amp;
08001968:   vldr s13, [r5, #-4]
182 membrane1.mode[i].value = sine[(int16_t)(membrane1.mode[i].phase * RES)];
0800196c:   sxth r0, r0
0800196e:   ldrh.w r3, [r3, r0, lsl #1]
08001972:   strh.w r3, [r5, #-8]
184 membrane1.val += membrane1.mode[i].value * membrane1.mode[i].amp;
08001976:   sxth r3, r3
08001978:   vmov s15, r3
0800197c:   sxth r3, r4
0800197e:   vcvt.f32.s32 s14, s15
08001982:   vmov s15, r3
08001986:   vcvt.f32.s32 s15, s15
174 for(i=0; i<12; i++) // VADD.F32 : 1 cycle
0800198a:   cmp r5, r6
184 membrane1.val += membrane1.mode[i].value * membrane1.mode[i].amp;
0800198c:   vfma.f32 s15, s14, s13
08001990:   vcvt.s32.f32 s15, s15
08001994:   vstr s15, [sp, #4]
08001998:   ldrh.w r4, [sp, #4]
0800199c:   bne.n 0x800192e <main+270>


texts:
I am working for a few months on dumping the content of a certain NAND Flash. This is the first time that I am doing this so I needed some time to get a good idea of how this works.

The NAND Flash that I am working with is this one:
https://datasheetspdf.com/pdf-file/1226904/GigaDevice/GD5F1GQ4UCYIG/1

Unfortunately I can't desolder the Flash so it's still attached to the board. I set a connection to all 8 pins of the Flash and I keep the chip at reset so that it doesn't interfere when I power up the NAND Flash.

I use a Bus Pirate v4 to communicate with it and the connection between the BP and the Flash looks like this one here:
https://www.flashrom.org/Bus_Pirate

My idea was to communicate with the Bus Pirate via SPI with my NAND Flash, since the datasheet provides the commands for a page read. The problem is when I try to read the same page I get every time a different output.

In the datasheet is written at page 5: " The device will automatically read first page of first block to cache after power
on, then host can directly read data from cache for easy boot. Also the data is promised correctly by internal ECC."

So I tried to use the following command in BPs SPI Mode right after the power up: [0x03 0x00 0x00 0x00 r:2048]

If I understand it correctly the 0x03 command should be read from Cache (which should contain the first page at this point). When I reset the board and try it again I get a different result and most of the output are zero bytes which looks kind of wrong to me. Does anyone have an idea why this is not working or if I do something wrong?


texts:
I think the steps will be

STEP-1:

\$V_x - V_{BE} = I_B\times R_E\$

STEP-2:

\$I_B = I_{ra} - I_{rb}\$

STEP-3:

\$V_x = V_{in}\times R_B/(R_B+R_A)\$

Please tell me i am correct or not??


texts:
I'm currently learning about mealy machines and I'm slightly confused.

If I am at state 00 and transition to state 01 indicated by the arrow. On the weighting on the arrow, the top refers to an input and the bottom refers to outputs.

What is the ordering of inputs, state transition and outputs?
Do I receive the input first, output then transition to another state?
Or do I receive inputs first, transition to another state then output?


texts: Why do Electrical cables use the NY* naming convention?

texts:
I did some research on cables and found that most cable types are named like so: NYY/NYA/NYM. The weird part of this naming system is that its meaning does not match up with the abbreviations. For example:
N = Copper core
Y = PVC insulation
Y = PVC insulation
Are the letters some kind of product code? If so, is there a documentation where I can find out more about this? Sorry if i'm unclear, i'm not an electrical guy.


texts: Direction of current flow in Nodal Analysis

texts:
The question is to determine the voltage \$v_1\$,\$v_2\$,\$v_3\$. The directions of various currents flow in the diagram above were given by the solution. By applying KCL at the supernode,
\$2=v_1+2(v_1-v_3)+8(v_2-v_3)+4v_2\$
But in my attempt, the direction of current flow I assumed between node \$v_2\$ and \$v_3\$ is opposite to the direction given in the diagram above, and the equation I got is different:
\$2=v_1+2(v_1-v_3)+8(v_3-v_2)+4v_2\$
Which lead to a wrong answer, different as compared to the solution given. Could someone please explain why is it so?


texts: Calculation of Power Dissipation of Memory ICs and Microcontrollers

texts:
Can someone tell me how to calculate the power dissipation of digital ICs like Nand Flash, QSPI NOR Flash and Microcontrollers?

For Microcontrollers, we can get the power dissipation for GPIO like, Vdd (Voltage domain) * Id (drive current).

But what to do in case of the SPI interface from Micro to NOR Flash IC and other memory ICs like NAND Flash and eMMC


texts:
I want to know what is the name or family name of the laptops' battery connectors? I want to replace a broken connector but don't know what to search for on digikey/mouser.
Image of connector below:

In specific I'm looking for the part number of the pavilion G6 battery connector. I found some connectors on aliexpress. No info or datasheet provided. It's like they're selling a bag of nuts:
http://www.aliexpress.com/item/Shelf-Taiwanese-laptop-battery-connector-9PIN/32482336723.html?spm=2114.01010208.3.2.6hTyPA&ws_ab_test=searchweb201556_7,searchweb201602_2_10057_10056_10055_10049_10059_10058_10017_10060_10061_10062_10063_412_10064,searchweb201603_2&btsid=a67c4079-f99d-47c9-a4c8-f5d6a4697e71

Any help/tip/thought is appreciated


texts: Is there any way to reduce THD for low pass filter?

texts:
I got low pass Sallen-Key filter for 8 kHz corner frequency but I still got too high THD for 8 kHz frequency and 10V output amplitude. THD I would like to achieve is less than 0,2% but now I got more than 1,5%. Is there any way to achieve it with my circuit or should I change OP-AMP or filter architecuture? I can't understand why 24 kHz harmonic is so big.

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(OUT)
 DC COMPONENT =   6.574066E-04

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED
NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 1     8.000E+03    1.032E+01    1.000E+00   -9.735E+01    0.000E+00
 2     1.600E+04    7.105E-03    6.886E-04    1.269E+02    3.216E+02
 3     2.400E+04    1.606E-01    1.557E-02   -7.253E+01    2.195E+02
 4     3.200E+04    2.824E-03    2.737E-04   -9.972E+01    2.897E+02
 5     4.000E+04    3.967E-02    3.845E-03    5.538E+01    5.421E+02
 6     4.800E+04    1.146E-03    1.111E-04    1.742E+01    6.015E+02
 7     5.600E+04    1.165E-02    1.129E-03    1.609E+02    8.423E+02
 8     6.400E+04    5.094E-04    4.937E-05    1.123E+02    8.910E+02
 9     7.200E+04    4.498E-03    4.359E-04   -1.104E+02    7.657E+02
10     8.000E+04    2.797E-04    2.711E-05   -1.601E+02    8.134E+02

 TOTAL HARMONIC DISTORTION =   1.609872E+00 PERCENT


texts: Current Transformer Transformation Ratio Variation

texts:
Lately I have been working on Energy Analyzers for Generators. I have a slight problem working with CTs.

I ran an experiment with 5 CTs rated at 2.4VA(60/5) of same manufacture with burden resistor of 0.07ohm and subject them to load 5A-50A with step size of 5A.

I found that the curve(R vs I) remains somewhat flat from 27A and onwards while it starts to climb below 27A. Also the ratio does not remain 12 for all CTs even in flat region.

I am using CS5463 from Cirrus Logic for Energy Measurement. It allows max 250mV peak signal for current and voltage measurement. The IC reads correct Current Values up till 21A with maximum error of 1.7% while the error increased to 2% below 21A. Is this behaviour of CT normal?

I repeated the same process on next day to check repeatablity but the error increased to 5% at 26A.

If same manufacture CTs have different transformation ratios and can have drift in their characteristics over a day, how can I get around this problem?


texts: Node Voltage Analysis (diamond like circuit)

texts:
Consider this circuit:

If we do node voltage analysis at Node A (assuming all currents go out we get)

$$ \frac{V-10}{2R} + \frac{V}{2R} + \frac{V}{2R} + i_1 =0$$

$$ \frac{3V}{2R} - \frac{10}{2R} = -i_1$$

$$ \frac{-1}{2R} (3V-10) = i_1 $$

Now this is where my problem is, I am having trouble expressing i_1 in terms of voltage difference because there is no resistor! I think I might have to use a supernode but I am not quite sure.


texts: What is a proper way to send information from an HC-05 (Bluetooth module) to a phone?

texts: I have 12 simple touch sensors and each of them produces an analog output. I want to send that information to a phone (or some other device). To do that I would need to use the HC-05 Bluetooth module. I don't want to use an Arduino. I looked up some  alternatives and I can program an ATtiny85 chip (using the Arduino) to somehow function with the HC-05 and from there send the information to the phone. I don't know if that's the right way to do it. Also, I have 12 analog states that I want to send and only 6 ATtiny85 pins. The project is small so I don't want to use any big components or chips.


texts:
I am hard time to understand below spice statement. I am using HSPICE

.measure AC cap_acc find par('-1* II(VGA) /(vac*hertz*2*3.14)') AT=100000hertz

Can anyone help with what II means ?

Thank you.


texts: Step voltage down via voltage divider, then grab original voltage output

texts: I have a pressure sensor that takes 5v and outputs a voltage based on pressure, however the input that I read cannot exceed 1.8V due to limitations of the board that I am using. Thus I was wondering how I could lower the output yet still read the correct value from the sensor... The transfer function of the sensor is: Vout = Vs*(0.0012858*P+0.04) ± Error


texts: I have this motor from drill that is powered from AC. Is possible to use the motor with DC current?


texts: Unable to read file greater than 2K in FatFS

texts:
I am reading a file from the SPI Flash with FATFS file system, on STM32F103 platform running FreeRTOS. I can successfully read File of size less the 2048, but if read a file file of size greater than 2048, (As i am reading in chunks of 128 bytes) it only reads up to 2048 bytes and f_read returns 'FR_INT_ERR' error when File pointer move to location above 2048 bytes.

Below in my code for Read write test. f_size is show the correct file size. But when I read, it gives error, If I focefully run the loop till end of file for reading data it always returns the last chunk before 2048 bytes again and again.

FRESULT xRes;
FIL xFile;
const char cWBuffer[] = "Hello FAT World! 0123456789abcdef";
char cRBuffer[128]

xRes = f_mount(0, &s_xVolume);
printf("\r\n mount result %d successful!",xRes);

#ifdef FAT_MAKEFS_TEST
    // this delay is to prevent the FAT corruption after a systenm reset.
    Delay_us( 200 );

    printf("\r\n MAKE FS Test");
    printf("\r\n format the ext FLASH");
    printf("\r\n please wait...");
    xRes = f_mkfs(0, SFD_FORMAT, 4096 *10 );
    printf("\r\n Format result : %d ",xRes);
    assert(xRes == FR_OK);
#endif

#ifdef FAT_WRITE_TEST
    Delay_us( 1000 );

    printf("\r\n WRITE Test");
    printf("\r\n open file: W+CA");
    xRes = f_open(&xFile, filename, FA_WRITE|FA_CREATE_ALWAYS);
    printf("\r\n Open result : %d ",xRes);
    assert(xRes == FR_OK);

    printf("\r\n write file");
    for(i=0;i<1024;i++)
    {
        xRes = f_write(&xFile, cWBuffer, strlen(cWBuffer), &n);
        //printf("\r\n Write result : %d, bytes = %d ",xRes,n);
        assert(xRes == FR_OK);
        //assert(n == strlen(cWBuffer));
    }

    printf("\r\n close file");
    xRes = f_close(&xFile);
    assert(xRes == FR_OK);

#endif

#ifdef FAT_READ_TEST
    Delay_us( 100 );

    printf("\r\n READ Test");
    printf("\r\n open file: R+OE");
    xRes = f_open(&xFile, filename, FA_READ|FA_OPEN_EXISTING);
    printf("\r\n Open result : %d ",xRes);
    assert(xRes == FR_OK);

    fs = f_size(&xFile);

    printf("\r\n read file size = %d",fs);
    i=0;
    fs = f_size(&xFile);
    while(i<fs)
    {
        xRes = f_read(&xFile, cRBuffer, sizeof(cRBuffer), &m);
        printf("\r\n Read result : %d, bytes read = %d, i =%d ",xRes,m,tread);
        tread += m;
        assert(xRes == FR_OK);
        //assert(m == strlen(cWBuffer));
    }
    printf("\r\n Total bytes read = %d",tread);
    printf("\r\n close file");
    printf("\r\n file content:");
    printf("%s :\n",cRBuffer);
    xRes = f_close(&xFile);
    assert(xRes == FR_OK);
#endif
printf("\r\n test success!!!");


texts: What is the purpose of the resistor \$R_L\$ in active peak detector circuit?

texts: I initially thought \$R_L\$ was the load resistor, but then my textbook suggests to use a voltage follower to drive small load resistor. However it uses the voltage follower without removing \$R_L\$. Is there any use of \$R_L\$ ?  Why can't I connect the capacitor directly to the voltage follower?


texts: Ladder filter without termination resistor?

texts:
I want to drive an ADC with an OpAmp (LT1819). The op-amp is in non-inverting configuration driving the ADC pseudo-differentially.

The filter between opamp and ADC should be ("the specs"):

passive
-3dB at 100 MHz, 3rd order Butterworth or Bessel (or steeper)
not load the Opamp too much (RL >1k)
keep component values reasonable for 0402 (pF, nH)
not introduce excessive noise (e.g., due to high series source resistance)

The classical 3rd order ladder filter (as found in literature and created by filter tables or programs like Elsie (http://www.tonnesoftware.com/elsie.html)) looks like:

simulate this circuit – Schematic created using CircuitLab

This is a classical ladder filter described in literature - but it contains the termination resistor.

The first sad thing is that this filter attenuates my signal by 6dB (so I have to increase by apamp gain by a factor of 2).

Second, the signal gets distorted (clipped). It seems the LT1819 can't drive such small resistive loads.

Now I am thinking about the following options:

I could increase the resistor values. But in order to get the linearity to an acceptable level, the load resistance must be >>1k, maybe 10k. That means that the source resistance also needs to be that high and then I'm killed by noise. Besides, L and C values become unreasonable.
If I just take an ordinary RC I only get a simple 1st order rolloff.
The datasheet of the ADA4937 (Fig 67) suggests a solution:

However, using the indicated values (R=33, C1=20p, L=56n, C2=60p), the bandwidth I get is 85.77 MHz (not 125 MHz!). When I normalize the coefficients, they are [2.07 , 2.07 , 0.0326 ] but for a 3rd order Butterworth they should be [ 2 2 1]. Besides I do not know how this filter relates to the ladder filter described above (with resistive termination).


texts: How best to lower LED garden light intensity

texts: We have a house with an outdoor staircase lit by warm white LED strip lights. However, the lights are "too bright" and we want to lower the intensity of the LED lights. On another loop of the garden lights, the same LED strip lights are lower in intensity because there are more LED lights on the same loop. So, I was wondering what resistor (or other device) would be the smartest to use? A dimmer normally works with 110 V but that is not possible here to use. It has to be something on the low voltage loop so therefore I was thinking adding a resistor or similar to that specific loop. The loop it is currently on is a 5 V loop with 8 LED lights pulling 6 W each (=48 W). Anyone with experience/suggestions?


texts:
I have been tasked by my current employer to look into the costs of self certifying. With past companies I have worked for, all of the tests were at a 3rd party lab. The closest thing I have seen to self certifying is when I worked at a company that had a makeshift anechoic chamber layered with copper tape. This was more to get a sense of the radiation coming from the unit. And to redesign if it was obviously high levels.

I have done a lot of searching and I can't seem to find a good guide or others that self certify for emissions. Has anybody gone through the process of self certifying? If so, where did you learn what kind of equipment to purchase and the procedure? My gut tells me it probably isn't worth self certifying but I have to do my due diligence in researching this possibility for my employer.

These links were useful to get my feet wet on the topic but I could not find a great lead:

How to find out which certificates (FCC, CE etc.) are necessary for a product?

How do you determine whether your product requires CE marking?

FCC and CE Testing / Failure Resolution (most helpful)

Certifications and requirements

The products to be certified are small benchtop units and are unintentional radiators. In my mind, I just need an anechoic chamber (probably not a large one), a calibrated spectrum analyzer (expensive but we would rent it), and a receiving antennae. But again, not an expert here. Just trying to understand the self certifying process.


texts:
I am having trouble understanding the concept of convolution. I get the mathematical idea behind it. I am able to evaluate that the convolution of the following problem
is $$f*g(t) = {0,\ \ t <= -1,\ \ t >= 1;\\ t+1, -1 <= t <= 0;\\ 1 - t,\ \ 0 <= t <=1}$$
However, what exactly is happening to the signal on more physical level?


texts:
I was attempting this problem and I could not finish it.

I found the maximum frequency which was 67% as I divided 8 by 12(information bits/total bits), but I am having trouble finding the maximum utilization. The answer is 80%. I believe to find the utilization, you would divide the total packets per second over the total bits. To do that, I multiplied 300k with 0.67 and divided that number by 12. Can anyone explain to me where I went wrong?

  Suppose a throughput of 10,000 16-bit samples is still required for
  the application, but the serial communication interface has the
  following characteristics:

  a total packet size of 12 bits: 8 bits of information and 4 bits of
  overhead
  does not require synchronization packets
  a bandwidth of 300,000 bits per second

  What is the maximum efficiency and maximum utilization?


texts: Switching between 5V Power supplies with minimal losses

texts:
I'm designing a circuit that allows one to switch between two different 5V sources, which is then fed into a 3.3V regulator IC. I'm targeting low cost and low board size, and I'll take a solution around $1-$2 in cost. Power supply is an integrated 5V rail on a system and the 5V USB rail for debugging.

Switch between 5V power supplies?

The answers there aren't satisfactory for me. The voltage drop on the diode brings the 5V input too low with fluctuations on the 5V rail (ie a lower voltage 5V rail may exceed the bottom limit of my LDO). I'm mainly just wanting a solution that prevents back-feeding of any power source. I also want power to only come from USB if it's plugged in.


texts: MAX31865 Over Voltage/Under Voltage Fault Caused by Noisy Environment

texts:
I have 4 MAX31865 RTD temperature sensor IC's using 3 wire PT100 sensors in an electrically noisy environment. I used an isolated DC-DC converter (SPBW03F-03) in hopes to isolate the measurement module to prevent interference and/or voltage potential between the battery supply and the RTD inputs. I think I might have misunderstood how isolation works in reference to shielding and the MAX31865 over/under voltage protection fault. Each PT100 is connected as seen in this schematic. Note: (MAX31865 DVDD and VDD bypassed with 0.1uF caps, not shown)
Each PT100 sensor has its shield grounded just before the module, the module itself is in a plastic enclosure with no ground bonding. Reading the voltage between any of the PT100 lines and where the shields are grounded shows about 0.9V of AC ripple. The MAX31865 specifies that any voltage greater than VDD or less than GND1 will trigger an over/under voltage fault.
Connecting the negative side of the battery to where the shields are grounded greatly reduces the number of faults. I am using the Adafruit MAX31865 library with 10ms delay between enabling bias and starting the measurement than another 65ms before reading the result.
Questions:

Is my thought process wrong? Is there a better way to implement isolated PT100 sensor inputs using the MAX31865?
Should I be tieing FORCE/RTDIN- and/or ISO_GND to the same ground as the shields via decoupling caps?
Would it be better to bond the shields to the isolated ground (ISO_GND) from the DC-DC?

Thank you!


texts: What is the difference beteeen a solenoid's make current and inrush current?

texts: Sorry if I'm just being noobish, but as I understand it, the make current is the maximum current that the solenoid can handle when switched on, but the inrush current is the maximum current it can handle when...switched on? What am I missing?


texts: Why is the absorption coefficient (α) not zero for energy of incident photon less than the band gap of the semiconductor?

texts:
α ( Absorption Coefficient) tells us about the absorption of a photon by a semiconductor for the creation of electron-hole pairs.

The absorption coefficient increases abnormally as the energy of photons crosses the bandgap, which is expected as the photons are able to provide the energy for excitation of electrons from the valence band to the conduction band.
But, when the energy of Photons is less than the bandgap energy, why is the value of absorption coefficient not zero?

How can there be any absorption of a photon when its energy is not sufficient to cause excitation of an electron?


texts: Small form factor over voltage protection circuit for 5V power supply

texts:
I would like to add small form factor OVP (Over voltage protection) circuit after my power JACK. Could you please any one help me on this, because we have similar kind of 2 adapters one is 5V and another one is 12V. So by mistaken we will connect and power-up 5Volt circuit through 12 Volt adapter. So i need to add OVP circuit.

please guide me: my idea about series resistor with 5.1V zener diode, Voltage break down is 5.1V and power peak pulse max 75Watts it will accept max 5A current

shall i implement this?


texts: repeatedly turning an incandescent light bulb on and off every 20 seconds will cause damage to the bulb?

texts:
I have seen similar questions to this one but none of them were asked in the range of seconds only minutes.

I just finished building a incubator for chicken eggs and I am using an incandescent light bulb as source of heat. The thing is I used a pretty sensible digital termometer an the light bulb turns on, last ~20 seconds on and then turns off again.
I'm worried this will cause any damage to the light bulb or the relay that acts as a switch.

The incubator works well but I dont want to replace parts every week.


texts:
I'm using a dsPIC33FJ64MC202 (@3.3V) for some project. I normally program my PIC projects with MPLABX through a PICkit 2, but I never tried using it on a 3.3V chip. Will it work?

I know the target Vdd value can be adjusted but, based on the programmer's schematics (datasheet, appendix B, page 77), only the Vdd pin would change and data pins would still be driven by the programmer's internal PIC's outputs (PIC18F2550 @5V).

My PIC's datasheet says it supports ICSP but it does not clarify if specifically PICkit 2 are supported. The chip has three different PGD/PGC pairs, where two are located on pins that support 5V logic. Is that the only way? Am I supposed to only use those?


texts:
I'm making a Nixie Tube Clock as a project for a class. The whole point of the project is to essentially to do it from scratch. I'll be designing a PCB for the project and I want to put the microcontroller chip directly on the PCB instead of simply using a standalone microcontroller. I've never done this before so I'm just looking for some advice for what is easy to use. Not just from the programming language but also how do I get the program onto the board, connect I/O, and make sure the chip doesn't lose the program every time I disconnect power.

I've programmed in MIPS assembly, C, and C++ before so any chip using those or something similar would be fine for me.

I was thinking about a Atmega328P with the Arduino bootloader already on the chip but that may be overkill for my project.

Thank you for the help!


texts:
I have a basic circuit: battery, fuse off (+)lead, 4 lights in parallel.

My question is, when charging is a fuse needed?

Also in the battery/charger circuit, which side is considered positive?

Update:

Ive obtained a 2amp glass fuse, as recommended, but it is a high voltage fuse.
Checking the voltage off the plugged-in charger(12V/1AMP), with its 2amp high-voltage glass fuse on, reads at 14.5V.

I attach the charger to a 12V battery, which has a 10amp blade-type low-voltage fuse, off the positive cathode.

The charging light doesn't come on when connected; however the charged-complete led came on when I it was being checked with the voltmeter.

here is my system:

simulate this circuit – Schematic created using CircuitLab

charger + fuse:

a weather-proof connector between battery and charger:

the battery with text:

top of battery can see fuse off cathode and a quick-connector type:


texts: What's the purpose of a diode across capacitor after voltage regulator?

texts:
I'm learning about power supplies at university and I have created 2 or 3 PCBs of this stuff, but recently I saw this schematic:

I have no idea of what exactly these diodes do in this circuit.  Can someone explain it, please?


texts: Multisim does not simulate the capacitor charge correctly

texts:
If I simulate this circuit in Multisim everything works fine, but in reality the LEDs burn, if I put a 1k resistor in series with the capacitor the LEDs no longer burn

I think the LEDs are burned by the initial charging current of the capacitor that must be high and while the capacitor is charging the voltage drops all over the LEDs and they burn

I have tried all the possible simulations in multisim and at the moment of time T = 0 only marks 10 ma of maximum current, this cannot be possible, in T = 0 the current must be very high because in the circuit there is no resistance

Thank you


texts:
I'm new to Simulink, and would like to make my circuits less messy. So I'd like to know how to make a node, such as on the image bellow, which has Vin and Vout written on. My MATLAB version is 2015a.

Thanks.


texts:
I am trying to communicate with an ADC via SPI. In the datasheet, It is mentioned, that:

  The performance of the ADC161S626 is ensured
  over temperature at clock rates of 1 MHz to 5 MHz – DNL +0.8 / −0.5 LSB
  and reference voltages of 2.5 V to 5.5 V

I went to STM32CubeMX to configure SPI. I found that the one I am using is connected to APB1 which works at 80 MHz. There is a prescaler for SPI that divide this value but I noticed the result is a baud rate not a frequency (MBits/s). So, my question is: to correctly set the clock frequency for the SPI, should I consider that MBits/s is equivalent to MHz and set this latter to a value between 1 MBits/sec and  5 MBits/s ?


texts: Connect PC chassis to the ground of TV coax cable?

texts:
I'm living in a house with electrical system without Ground wire and when I touch my PC case while standing on ground I get a zap from it which I believed are from suppression capacitor in PSU, I've tried to connect my PC case to the ground part of a TV coax cable which coming from the electrical pole outside and I doesn't get shock while touching my PC case anymore.

Is this is a good way for temporary grounded my PC?, it doesn't seem to have any interference on TV after I do this but I did worry about if there is a lightning strike the electrical pole outside then my PC might get damaged? (I know that lightning would go straight to earth and don't care about my PC but is it still potentially damage my PC?)


texts:
I'm always got 'off grid pin' message on my schematic. The pin on the symbol is built by me, using a component wizard. I already set my units on the library and schematic on same units. I have tried to move the pin on my own too, and the message is still there. Anyone can help me?

*I've tried the answer from Altium tell me Off Grid Net

picture :
1. from library
2. from schematic
3. the message


texts:
Right now I'm using this to switch between three devices for my home stereo and I want to replace this with an electronic method (no moving parts) with a remote I made. I already have an rf module working with a microcontroller from an older project.

I know almost nothing about optoelectronics and I just need to know if there is an IC that can take in an optical cable input and output to another optical cable so I can just switch between them with the microcontroller.


texts: Is the speed of light the upper bound on CPU speed?

texts:
Edit: As this my first question in this site I was a bit confused how to pose the question. Because of the way I had put the question before has made it trouble to understand

What is the fastest speed that a CPU can ever reach without breaking the Laws of Physics?
Is it determined by the speed of light only?

Are there any experiments or related articles published that describe how we can overcome limits imposed by the of speed of light or other phenomena? What is the highest clock frequency of a chip designed so far?

What is the max. speed that a CPU ever reached. What was that?


texts: Karnaugh Map race conditions with don't cares

texts:
Karnaugh maps show race conditions as adjacent minterms that are not covered in the same implicand. Take the following example:

We have race conditions when moving from the blue implicand to the green one, and the blue implicand to the red one (wrapping around the top).

My question is this: would this still apply if the adjacent '1' is a don't care, i.e. an 'X'? In this case, let's change the 1 in minterm AB'CD' (bottom right) to an 'X'. Would this still pose a potential race condition with minterm ABCD'?


texts: How to use Darlington arrays to source current in a 7-segment display driver

texts:
I'm building a driver for a large common-cathode 7-segment display using a shift register and BJT transistors (more details in this question).

I wanted to make it more compact by replacing the transistors for a Darlington array such as ULN2003 or ULN2803, but these only sink current and I can only figure out how to use them to drive common-anode displays.

Is there a way I can use these Darlington arrays to drive common-cathode displays?
If not, are there Darlington arrays, such ULN2003 or ULN2803, that source current? If not, why not? Is it because the IC would require more transistors (as explained to me in here) and thus it would be more expensive to produce?

Should I just prefer to drive common-anode displays instead? For some reason I think there should be some simmetry in this, but apparently there's not.


texts: I am using some 18650 batteries in a small project.  Since they are lithium ion batteries, I want to implement a charging system.  I have some TP4056 1A chargers for these batteries (I know 1A is slow).  My big question is: is there a difference between charging these is series or parallel?  Or am I fine either way?


texts:
So some Cortex-M3 CPUs (and most other small CPUs as well) have a non maskable interrupt.

I know what the NMI does, but I don't quite understand why I ever would want to use one.

I'm looking for practical examples where the non maskable nature of the NMI makes sense and is a improvement over other external interrupt sources such as GPIO or EXT interrupts.


texts: Why can't we add resistance and reactance directly to form impedance?

texts: Why we cannot add resistance and reactance directly to form impedance. Why should we use pythagoras theorem formula in order to calculate impedance ?


texts: Are TV coaxial cables compatible with WiFi antennas?

texts: If I replace an old, roof-mounted TV antenna with a 2.4GHz WiFi (IEEE 802.11) antenna; can I use the existing coax? Or will I need to run all new cable?


texts: How can I limit the slew rate of current in a battery circuit?

texts:
Let me be more specific: I have a circuit fed by a battery and charged by a charge controller and I don't know exactly what is the max slew rate of current in it, but, I can estimate conservative figures and then make a low pass circuit to further reduce this slew rate, like this:

Noting that the "load" here includes the actual devices being fed and the charge controller, so current can flow in both ways through the battery.
Because the shunt is very low impedance (and has to be) I need to include the ESR of the capacitor in my considerations.
And I'm not getting anywhere. Actually I'm confused about what path should I take.
Where should I start?
I tried starting from KCL, differentiating and trying to find something for dI/dt (where I is the total current, IC+IL), but the best I got was finding a result that depended on dIL/dt, IL and IC. I can estimate the worse possible dIL/dt and IL, but I don't know max possible IC yet once I add this capacitor.
Am I doing this right? Or is there even some solution for this?
Thanks!


texts: How to compute average colours of the edges of a composite tv signal

texts:
I want to create something like ambilight that can work based on a composite tv input.

Basically I need to work out the average colour and brightness at 3 or 4 points along each edge which can then be used to control strips of RGB leds.

I have no problem with the LED control part but where do I start with dealing with the TV signal?  Can anyone point me in the right direction of what component I could use or where to learn how to do this with a PIC?


texts: Help: Making a device to measure the amount of liquid an a container

texts: I want to make a device that would measure the amount of liquid in a container. Can anyone give me an idea on it? I am planning to use a pressure sensor, the required range would be from 0 pascal to 2 pascal. Which pressure sensor would be best suited for this purpose?


texts: Voltage Regulator IC with Current Overload Indication

texts: Some power supplies have a light that comes on when current limiting is active.  How would I design a circuit or add a circuit to a linear regulator that could light an LED when it is current limiting?


texts: Will this photodiode circuit filter this frequency?

texts: I have the following circuit with a photodiode and an LM358P where I intend to blink an LED at around 20kHz. I want to work on it. I have made a calculation through 1/(2piRC), and got something around 33khz. Is this correct? Will this circuit work with a 20kHz frequency ?


texts:
I'm learning PCB design and more than once I faced this issue. What are the standard practices when the trace width is higher than the pin size? Suppose you are designing a 3A charger with a Micro-USB as input. For example, for this connector the 5V pin can take up to 3A. However, the pin width is 0.45mm, which is significantly less than the recommended track width when dealing with 3A current.
How to solve this type of incompatibility?


texts:
I am hooking a wall wart to a plug on a dimmer switch which is hooked to some LEDs and a resistor to create a LED "lamp." What will happen when I dim the switch? Will it reduce the voltage? The current? Increase resistance? Generate more/less heat? What will it do? Are there typically voltage regulators that won't affect it?

I haven't picked out an adapter yet, but I want it to be fairly cheap ($3-8). Do different types of adapters have different effects? (I don't care if it dims exponentially. I just need it to dim.)


texts:
I'm trying to take a 12V wall wart supply down to 5V @ 0 to 500mA without using a prebuilt regulator. I was thinking to use a voltage divider setup but after doing calculations I would be using 2, 12 ohm resistors in series with the 5V breakout in between them, it sounds off to me.

How can I step down to 5V without sinking massive amounts of current in a resistive bridge or regulator?


texts: Atmega328p RS232 communication what's wrong?

texts:
I'm trying to connect Atmega328P to PC via RS232, the Microcontroller code is basically a : Serial.write("Greetings !");  inside the loop function.
I've tried the following circuit but it doesn't work and doesn't show anything in my serial monitor :

Am I missing anything here ??

Here is the full code:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.write("Greetings !");
  Serial.write("\n");
  delay(1000);
}


texts: How do you know if a decentralized solar PV is connected in series or in parallel?

texts:
I'm using a decentralized solar PV system(4 nos). I want to know that are they connected in series or in parallel ?

The output current of each of my converter connected to solar panel is 4.4A. So will the current be added up or be the same ?


texts: When did numerous short-range wireless protocols start showing up? I know Bluetooth was first invented by Ericsson in 1994 from reading up resources on the Internet. Thanks in advance.


texts: How to calculate heat dissipation improvement when adding a fan to the heat sink?

texts:
I'm using an LM338 which I want to supply at least 3A @ 20V, with Vin being 35V.

I made my calculations and I figured out I'd need a very expensive (for my budget) heat sink so I'm looking for a more affordable solution, like attaching a fan to a cheaper one.

But how much (in numbers) does a fan affect a certain heat sink dissipation? How can I calculate this improvement from the datasheets?


texts:
This circuit is simpler version of my current setup. I have connected these high power LEDs in parallel and controlling its intensity level using PWM signal generated by FPGA. The AC to DC converter which I am using currently gives max current of 2.2 Amps. In total 32 LEDS are connected to this power source in similar way. My requirement is to monetarily boost the intensity of LEDs to it peak value.So I am thinking to to use Lead Acid battery which will boost the current and intensity of LEDs will be at its peak. This switching between DC supply from converter and from battery should be controllable and with minimum switching delay.How should I approach in designing this circuit.

DataSheet of LED [BXRA-56C5300]
http://www.bridgelux.com/sites/default/files/resource_media/DS25-Bridgelux-RS-Array-Data-Sheet-2014.01.27.pdf

Thanks!

Datasheet of power transistor used
https://www.infineon.com/dgdl/Infineon-IPP_B_I80P04P4L-08-DS-v01_01-EN.pdf?fileId=5546d4625c167129015c348992484d42

simulate this circuit – Schematic created using CircuitLab


texts: Getting higher power output by using more resistors

texts: Is there anyway I can connect resistors to allow them to take more power such as using 4 1/4 watt resistors to get a 1 watt resistors. Or do i just have to use 1 1 Watt resistor.


texts:
I am an autodidact in control engineering and I have been trying to design a lead compensator for double integrator system so that the closed loop poles have damping $$\zeta=0.5$$ and natural frequency $$\omega_n=1\,rad\cdot s^{-1}$$ while pole/zero ratio of the compensator would not be greater than 10.
Desired location of closed loop poles is $$s_d=-\zeta\cdot\omega_n\pm i\cdot\omega_n\cdot\sqrt{1-\zeta^2}=-0.5\pm i\cdot 0.866.$$ Transfer function of lead compensator is $$D(s)=K\cdot\frac{s+z}{s+p}.$$ I started with a pole at \$-10\$. Then I computed position of zero as $$\zeta\cdot\omega_n+\frac{wn\cdot\sqrt{1-\zeta^2}}{\tan(\phi)}=0.5\cdot 1+\frac{1\cdot\sqrt{1-0.5^2}}{\tan(65.21^{\circ})}=0.9.$$ According to the root locus I set the gain of the compensator $$K=10.$$ My problem is that this design doesn't fulfill the constraint of pole-zero ratio and also the percent overshoot is greater than I would expected according to $$\exp\left(\frac{-\pi\cdot\zeta}{\sqrt{1-\zeta^2}}\right)\cdot 100=16.3\%.$$ When I tried different pole locations I got approximately same results.

How can I solve this problem? Thanks for any ideas.


texts: Calculate the maximum current of zero ohm resistors

texts:
According to Ohm's Law, if the resistance is zero, the power dissipated by a resistor is unmeaning.

$$P_d = R \times I^2$$

$$I = \sqrt{ \frac {P_d}{R} }$$

Can one calculate the resistance given that power is defined? Only by knowing power, how can one calculate the maximum current of a zero-Ohm resistor?

I'm a bit confused as I've seen there is zero-Ohm resistors with specified power in the market.


texts: Altium PCB Editor Room "stealing" tracks from other rooms

texts:
This question is in regards to the PCB editor of Altium Nexsus 2.1.7.

When moving a routed room (A) over another routed room (B) and then moving the room A again (I.e. pausing over room B by releasing the LMB), the traces B are then moved with room A. In other words, B's tracks are transferred into A.

I would expect the traces to stay with the room that they were routed in originally. Is there any way to achieve this? I.e to assign tracks to rooms such that they cannot be transferred to other rooms?

Curiously, when selecting "RMB->Room Actions-> Select Room connections" on room B, only the original traces of B highlighted, the "stolen" tracks of A are not...

It is a very similar issue to what was asked here (No resolution): https://www.edaboard.com/showthread.php?377851-ALTIUM-Move-room-without-moving-other-layers-track


texts:
Two of my friends and I want to build a device that helps one to transfer data from one USB mass storage device to another using a a touch screen interface. We have worked on embedded projects before but they were much simpler and not related to USB. Therefore , we have started reading relevant material on USB. (Jan Axelson usb complete and USB mass Storage if it helps.)However, I feel this is really slowing us down.

We've only figured out a rough schematic of the project. We know  that 2 hosts will be required for each mass storage device connected our device.Each of the host controllers will be connected to an MCU and a 3rd MCU will be required for the touch screen interface. However we can't move forward and tell what needs to be done next. We plan to use the TUSB7320 as the host controller. My question has a few parts:

How much time will this project take given our knowledge about USBs and our current approach?Can it be completed by March next year?
Is there any other relevant(or better) literature or tutorial we ought to look into apart from what was mentioned?
Are we right about the rough schematic that I described earlier in this question?
How should we divide work in order to optimize manpower?

I understand these questions (especially the last one) may be not be in accordance with the policy of the website. But we are only students and really want to make this work. We haven't found a suitable guide even after a long search and some guidance from experts such as yourselves will be a blessing! I earnestly request you to provide us with advice or at least point us in the right direction.

*******  UPDATE *******

Thanks guys for all the help! We've made some progress and decided the main components for our device. Also, we'll be making it for the USB 2.0 now!

We've decided to use ARM9. This is because we came by a person who introduced us to friendly ARM and told us it could work for us.

We'll be dumping the TUSB7320 and instead use the DS Vinculum 2 dual host controller IC.

Also, we are going to use an operating system to ease our work. We're torn between Linux,windows CE and Android. I personally think we should go with linux because that'll help us protect the device from viruses(I hope I'm right?) and its free. However my partners think android will be a better option because there are many people who are into android and might know a thing or two that could help us out.

Are there other things we should consider or crucial details that we're missing out on?Which OS suits this device best and how should we go about the software especially the end user GUI on the touch screen?


texts: Why might this voltage regulator have a resistor across the supply voltage?

texts:
I have come across the schematic below, and I am unsure why there is a resistor across VIN to GND on the AP2205 5V voltage regulator. Why might this be?
Note: This is for an isolated CAN circuit where the CAN transceiver draws it's power from the CANBUS.


texts: High side, high voltage, micro ampere current sensing

texts:
I am working on a project in which I am required to sense current in micro ampere range from a 2kV power supply. Here is a link of an article which I am referring.

https://www.maximintegrated.com/en/app-notes/index.mvp/id/1867

While Searching on google I found that in high side current sensing the common mode voltage range should include the supply voltage (that i am providing to the load) within its range. The common mode voltage range of the max4172 IC used in the circuit is +2V to +32V. Will it support my 2kV supply. if not, could anyone please suggest an alternative solution to this problem.

*Also i am confused about the 9v battery and 1000v. Why their positive side is connected to the same node?

Thanks in advance!


texts: Does a current clamp measure apparent or active current? And is it accurate?

texts:
1) Apparent or active

Does an current clamp measure apparent or active current?

I am looking at energy consumption metering solutions for a building. So far, the affordable products seem to click clamps on one or more of the phases (and maybe on zero) going into the house.

Or maybe some products measure one, and some measure the other?

2) Reliability / precision of clamps

Is a clamp on the outside of a cable really precise? Maybe only the high-end / expensive clamps are precise? Or is this such a simple principle that I can even trust relatively cheap solutions, such as Efergy (link to installation instruction video)?

Are non-clamp solutions generally more reliable/precise?


texts: Is it okay to write KVL equations like this (using complex numbers)?

texts:
For the circuit shown in the figure, determine the value of \$V_2\$
  such that current through \$5\Omega\$ resistance is \$0\$.

My attempt:

Let current in left loop be \$I_1\$, middle loop be \$I_2\$ and right loop be \$I_3\$ (all three are clockwise). So the KVL equations I get are:

$$+20e^{j(0)} - 4I_1 - 3jI_1 + 3j I_2 = 0$$

$$-3jI_2 + 3j I_1 - 3I_2 - 4jI_2 + 5jI_2 - 5j I_3 = 0$$

$$5j I_3 - 5j I_2 - 5 I_3 -V_2 =0 $$

I intend to put \$I_3=0\$, since current in the \$5\Omega\$ resistor should be \$0\$. Then I should get a complex number value for \$V_2\$, by solving the three simultaneous equations. But I'm not sure whether this techniques is correct. I've never written KVL equations like these (using complex impedances). Could someone please tell me if there is any error in my method? Or is it okay?


texts: Replacing 10 AAA NiMH 1.2A batteries with 6, 9v Lithium 1.2A batteries

texts:
A vacuum that ran on 10 AAA NiMH batteries in series (15.6v at 1.2A) is nearly dead.

I attempted to replace with 6, EBL 9v 1.2A batteries Lithium... bought off a the internet.  I connected them such that 3 groups of 2 9v batteries (series) in parallel which should be 18v at 3.6A.

Unfortunately... the vacuum runs for about 3 seconds and then slowly shuts down with my configuration.  If I wait a minute, I can run for another 3 seconds.  If I leave the vacuum on after 3 seconds, it doesn't run.

As an experiment I got 2, 9v 1.2A Energizer Alkaline batteries from CVS and connected them in series (18v at 1.2A).  It runs strong for about 10 seconds before it starts losing some power... but it still continues going.  I imagine if I added some more in parallel it would have more power.

Any idea what is going on?  I am at a complete lose.


texts: What's the rationale behind "wall wart" plugs?

texts:
It's more of a curiosity question than a real problem, but since I've run out of wall sockets again, I'd like to ask you - is there any particular reason or use case in which "wall wart" AC adapter design, like:

is better than a power brick, like:

I see those wall wart plugs almost everywhere, and they're notoriously difficult to arrange in power strips. Meanwhile, I've only seen the power bricks on laptops and one or two old gaming consoles.


texts: BJT Differential Amplifier-Long Tailed Pair

texts:
I am trying to solve this assignment

  Consider this schematic (the BJT's are in the effective area, with
  \$\beta=200\$ so as to \$i_e\approx i_c\$). Also \$R_1>>R_E+r_e\$.

  Define the common and differential gains, A_c and A_d respectively, aw well as the common mode rejection ratio.
  Choose the resistors \$R_1,\;R_E\$ so as the differential amplifier in a differential signal \$100\mu V\$ would reject noise of \$1mV\$
  amplitude in a factor \$10^{-2}\$.

I've managed to solve the first question and the results are

\$A_d=1-\dfrac{v_{CC}}{2v_1}\$

\$A_c=-\dfrac{v_{CC}}{v_1}\$

\$CMRR=\left|\dfrac{v_1}{v_{CC}}-\dfrac{1}{2}\right|\$

The thing is that I have no idea on the second one. I just need an idea or an advice ;)

EDIT

I saw in the Art of electronics, p.:99 that the correct expressions are

\$G_{diff}=\dfrac{R_C}{2(R_E+r_e)}\$
\$G_{cm}=-\dfrac{R_C}{2R_1+R_E+r_e}\$
\$CMRR\approx\dfrac{R_1}{R_E+r_e}\$

As it seems miscalculated what was asked in the first question


texts: Mosfet heating in current limiter circuit

texts:
I am designing a lead acid battery charger using Battery University for guidance. This is the circuit I made.

The power supply is from an Adjustable 12V power supply. I have set it to 14.4V. The mosfet is FQP55N06. The transistor is a BC547.
The current limit based on testing with multimeter is 1.24A.

If i connect a halogen bulb (12V 35W) of a motorcyle as load, the Mosfet limits the current but heats up rapidly. Why is that? (I connected a smaller 12V bulb which draws only 0.7A and the mosfet did not heat up)

If I use this circuit to charge a battery, and if it draws current upto the circuit limit, will the Mosfet heat up? If it will, how can I prevent it, while maintaining this current limit?


texts: AC Power cord - using IEC 60320 C13 instead of C17

texts:
My subwoofer has power inlet that seems to be IEC 60320 C18, which looks like this:

I should normally use a power cord with IEC 60320 C17, which looks like this:

However, the IEC 60320 C17 type power cord seems to be difficult to find where I live. My question is - could I instead use a power cord with IEC 60320 C13 type instead? That looks like this:

The only difference seems to be the additional ground connection present in the C13, which will not be connected to anything if used with this subwoofer. I would like to know if this is something that I could safely do, or are there any risks?
For context:

I live in Australia
The power cable supports 10 amps, and this is what the subwoofer manufacturer specify as well

Thank you for your time.


texts: Is it reliable to use Li-ion battery + LDO for analog circuits and 3.3v digital circuits?

texts:
I'm doing a project measuring ambient light with 'photodiode + op-amp + ADC + cortex-M0+.' For a while, I used stable DC source for providing 3.3v to every components.

The next milestone is making the module portable. What I found was 18650 Li-ion batteries, which have voltage range from 4v to 2.7v through a discharging cycle.

As I use photodiodes, op-amps, and ADCs, I think the voltage provided to those analog parts should be stabilized. So, I'm worried that is it okay to use 3.3v LDO for them, even the Li-ion battery has voltage under 3.3v.

Will it be okay? Or, what can be other solutions?


texts: VHDL: Can a signal be used as an index for an aggregate?

texts:
Is it legal to use an integer signal in place of an integer literal as an index in a named association? I want to do so in order to create a decoder, like this:

reg_clk_en <= (write_reg => '1', others => '0');

where reg_clk_en is a std_logic_vector and write_reg is an integer (with range 0 to 31).

From what I have read on Renerta about Aggregates and Expressions, I think this should be legal: write_reg is a legal choices clause because it is a name, which is a simple expression. However I'm not sure I understand this quote:

  A value of simple expression can be applied in arrays only and must belong to discrete range of an array type. A simple expression specifies the element at the corresponding index value.

The first sentence seems to say that it's OK to use an integer index as long as the target of the aggregate assignment is an array, and the value of the integer is within the range of the array type. The second sentence seems to confirm that the expression array(index) refers to the element of array at index - but this is so blatantly obvious that I suspect I am misreading it.

The reason I am asking is that Vivado rejects my initial code snippet with the following message:

[Synth 8-211] could not evaluate expression: aggregate choice expression

I know of other ways to specify a decoder, but none so concise. Most importantly, I would like to understand why that code snippet is problematic for Vivado. If it isn't legal VHDL, what about it is incorrect?


texts: Can I connect +5V GND in reverse to get -5V? Why not?

texts:
Since voltage is relative, if I have a +5V regulated source in my circuit board and need -5V some where, what will happen if I just connected the +5V supply connections in reverse?

Note that the +5V is as an example only.


texts: Solar charging a 18650 Battery ( MPPT vs TP4065 )

texts:
Most my solar project which includes ESP8266, a sensor and solar+ battery + MPPT charging module.
In some tutorials I saw a use of TP4065 as in this tutorial
While MPPT optimizes charge for varying voltages ( as a function of sunlight ), TP4065 is a standard LiPo battery charger ( assuming for contant voltage ).
I would like to hear pros and cons for each use.
THNX


texts: Calculating the capacitance for a voltage multiplier circuit

texts:
Recently, I've been asked to create a voltage multiplier, with an output voltage \$Vo = 5*Vi\$, where \$Vi\$ is the peak input voltage. This was accomplished without much issues through the schematic below (keep in mind that the capacitors are electrolytic):

simulate this circuit – Schematic created using CircuitLab
Theoretically, it does exactly what I want, presenting a \$5Vi\$ voltage between the terminals illustrated. However, one second requirement for this circuit is to use a filter capacitor in order to keep the output constant; this capacitor must have the lowest possible value considering the load in the circuit's output as a 100kOhm resistor.
Normally, I would calculate a filter capacitor so that the input signal's period is lower than the time constant between the capacitor and its load:
\$ T < R*C\$
Considering an input source with signal \$Vi(t)=10sin(4000πt)V\$, we would have a period of 0.0005 seconds; therefore:
\$ 5*10^{-9} < C\$
Yet, since the resistor will be placed in parallel between the terminals denoted by the \$5Vi\$ in the image above, I don't think a filter capacitor is needed. Instead, the capacitors from 1 to 5 are already capable of keeping a pretty stable signal with most values (according to my tests) when using a 100kOhm load.
However, I should use the minimum possible value for the filter capacitor, which in my case (I presume) would be a value related to all capacitors. How can I, in my circuit, calculate the minimum possible value for the capacitors, keeping a time constant that is superior to the source's period?
For this particular circuit, since it's not specified in the task document, I would say that the tolerable ripple would be of around 7.5V. The output voltage, errors considered, could be of \$5Vi\pm10\%\$.


texts: Xbee Running Stuff that Requires More than 3 Volts

texts:
Electronics newbie here.

I have an xbee remote that I want to control a model train smoker (6 volt) and a motor (6 volt) (separate channels).  The remote runs off of 3 volts and puts 3 volts out in the output channels.

A guy at Radio Shack drew up a diagram for me, but it went out of business shortly afterward.  When he drew it up we were going off of the published 5 volt requirement of the smoker, but subsequent reading suggests the smoker runs better at 6 volts.  Since I don't need to step the voltage down to 5 volts for the smoker with a diode, can I skip the transistor too?

simulate this circuit – Schematic created using CircuitLab

I guess my real question is why can't I just connect a 3 volt battery in series with a motor and the 3 volt output from the xbee?  What's that transistor/resistor doing over there?  Will I fry my xbee?


texts:
I'm building a Royer Oscillator, and I'm not sure why my initial MOSFET (U2) is shorting? My LT Spice simulation works somewhat, however I get a lot of current coming out of the drain (6A+), and likewise the 2 inductors drawing massive currents. Why would this be the case?
Is it because of the MOSFETs M1 and M2? Are they what's causing this massive surge in current? And hence the short in the initial MOSFET.
The power supply I'm using is rated to 6A, and it actually goes up to 6A when I turn it on, but the voltage reduces drastically.
Anyone have any ideas? (Ground is the bottom rail).


texts: Multisim: How to generate a sweep frequency?

texts:
is there a way to generate a sweep of square wave frequency in multisim?
I'm trying to test a device but I'd need the speed to increase from 100hz to 1 khz


texts: 7.4v DC to 5v DC (with 1A and 2A options)

texts:
I am trying to make a power bank out of the cells of a laptop battery. Each cells are 3.7V 2200mAh .I tried using a 7805 voltage regulator with the two cells in series, but the output current was not sufficient to charge the phone. The output it gave was about 480mA. I have also tried using a 5V zener diode but it got so hot that my breadboard was melted (i dont know if i did it wrong or used a zener diode of low wattage. So i wanted to ask how i could make a power bank of output and options of 5V 1A and 5V 2A.Please give me directions or links that could help me..

thanks in advance..


texts: For this current mirror circuit, what is the effect of doubling of the emitter area of transistor Q3?

texts:
The transistors have finite β and an infinite early voltage. Derive the expression for \$ I_0 \$ in terms of  \$ I_{REF} \$and β.

In this question Io has to be represented in terms of \$I_{REF} \$.... The solution matches to that given in text book. But they have perhaps done it without considering the doubled area of transistor Q3. I have done the same yet. My question is that what would be the effect on analysis ie whether there will be any change in the analysis(current equations) due to the doubling of area of transistor Q3 as shown?

  What is the effect of doubling of the emitter area of transistor Q3 for this current mirror circuit as shown?

Attempted Soln(Without considering the doubled area of transistor Q3):

$$I_{REF}=I_{C1}+I_{B3} \tag 1$$
Since Q1 and Q2 are matched
$$I_{C1}=\beta I_{B1}=\beta I_{B2}=I_{C2} \tag 2$$

$$I_{E3}=I_{C2}+I_{B1}+I_{B2}$$

From eq (2)

$$I_{E3}=I_{C1}+2I_{B1}$$

$$I_{E3}=I_{C1}+2\frac{I_{C1}}{\beta}$$
$$I_{E3}=I_{C1}(1+\frac{2}{\beta})$$
$$I_{C1}=\frac{I_{E3}}{(1+\frac{2}{\beta})} \tag 3$$

$$I_{E3}=\frac{\beta}{\beta +1}I_0 \tag 4$$

From (3) and (4)
$$I_{C1}=\frac{\beta +1}{\beta +2} I_0$$

Eq (1) Becomes:

$$I_{REF}=\frac{I_0}{\beta}+\frac{\beta +1}{\beta +2} I_0$$
$$I_{REF}=I_0(\frac{\beta +2+{\beta}^2 +\beta}{\beta(\beta+2)})$$
$$I_0=\frac{1}{1+\frac{2}{\beta(\beta+2)}}I_{REF}$$
$$$$


texts: Driving a BLDC motor, having three switches on at the same time

texts: I am currently working on a 14p BLDC motor and I wanted to drive it using 180 degree commutation (having 3 switches on at the time instead of 2). How can this be achieved? how can I know the correct switching patterns?


texts: Basic Eagle question about DIPs in schematics

texts:
I just started using Eagle this morning, and I've read/watched some tutorials, but with no luck on this question; please forgive my naivete.

I want to insert an LM324 (quad op-amp) into a schematic. I want the schematic to show the DIP structure, not just four op-amps scattered around the diagram. (Why? Because right now I'm trying to trace a circuit board and turn it into a schematic, and having something that's laid out the way the chip is laid out will be a big help; once I've done that, I'll swap in the four individual op-amps and do some un-rat's-nesting.)

Is there a way to do this? The LM324 I found simply lets me click 5 times on the schematic, showing 4 op-amps and a power circuit (Vee to Vcc block).


texts: My oscilloscope picks up 600kHz sine wave signal when connected to an open wire

texts:
I don't have a lot of experience working with oscilloscope, it is strange to me that if I connect the scope with a wire and leave the other end of wire floating in the air, I would see a regular sine signal of frequency 600KHz.
I suspect this is because of the impedance of the oscilloscope, but adding a 50 ohm terminator doesn't fix the problem.
 Is that normal ? If it is not normal, how can I fix the problem?

Thank you very much


texts:
I started trying to build my own Yagi. So i ran into maybe some very well known Websites that show how to do it - however, i wanted to try with some theory first, before actually attempting to build one.

I've downloaded a program called "VK50J's Yagi Calculator" (by John Drew) - this designs the Yagi (after some input) with a whole construction guide. But when i input those values into another Software "YagiModel" (a small Java applet), the values differed. And when i tinkered around with the values, they even increased above those, that the Yagi Calculator output (the dBi gain).

So, i wrote a little Program, that would bruteforce the values through that Java applet and generate me a list with all the dBi gains and different lengths and positions of Reflector, Driven element and 1 director.

Using the following Input for the Yagi Calculator:

Frequency in MHz: 2442 (skipping channel 14)
Number of directors: 1 (to keep it simple)
Diameter of element (mm): 2
The Elements are all round and there is no metal boom

The other settings seemed to have no influence on the outcome: the antenna would always have a gain of 6.9dBi with the following construction plan:

REFLECTOR 59,3 mm long at boom position = 30 mm  (IT = 22,0 mm)
RADIATOR Single dipole 56,6 mm tip to tip, spaced 25 mm from reflector at boom posn 55 mm (IT = 21,0 mm) OR Folded dipole 57,7 mm tip to tip, spaced 25 mm from reflector at boom posn 55 mm (IT = 21,5 mm)
DIRECTORS Length: 50,8mm Boom position: 63,8mm

(The construction plan was shortened)

When i input that in the YagiModel-Applet, i get similar results - BUT:
with the values that i've bruteforced, the antenna gain jumps up to 9.91dBi

List of Elements:

Length: 61.0mm, Position 0mm
Length: 66.0mm, Position 10.0mm
Length: 53.0mm, Position 45.0mm

Element diameter was always 2mm, the frequency always 2442MHz. Unit: Millimeters, and as for the YagiModel-Applet, i used "Conductivity->Perfect" (even with worse conductivity, the difference was still very significant)

Now my question is: Which values should i trust? Could the bruteforced ones really be better than those that the Yagi Calculator outputs? Do i just face this difference, because there is only 1 director - meaning, the difference would rather approach zero, the more elements i would add?

I know bruteforcing is not a very elegant way to calculate anything - but in my case i simply lack of ALL the formulas to actually do the calculations, so this was just a quick-and-dirty aproach to get started.

I'm in no way an expert about radio signals, or electronics, i just simply love it, even though it doesnt love me back. So i'm sorry if this question is maybe kind of "stupid" or solveable on my own if i just had read more about the topic first. I would have built this, but unfortunately i also lack of any equippment to really meassure these theoretical results...

Thank you for reading through this and thanks ahead for any answer or hint on this :)


texts: Does living next to an electrified railway cause WiFi outages?

texts:
Some friends of mine recently moved into their new house (in Belgium.) It is located on a small hill, next to a double-track, electrified railway. Some 2-6 trains pass by every hour, depending on the time of the day.

The ground level of the house is roughly on the same height as the power lines feeding the trains. I guess the horizontal distance between the router and the closest power line is some 40 meters. There are no obstacles in the way, except for an outside window and some small bushes.

My friends experience lots (anywhere between 5 and 20) of 'WiFi outages' per hour: periods of 10-60 seconds that not a single device in the house (cellphones, tablets, laptops,...) can make a connection to the wireless router. Horrible to watch series online, apparently.

The router itself is in the upper class of routers: it's a Linksys WRT of some 2 years old that delivers a clear and strong 2.4 and 5 Ghz Wifi-bubble around the house. Works perfect 80%-90% of the time.

We were wondering if the trains or, more likely, their power lines cause these WiFi outages. An engineer I know (working in a completely different field) told me something about 'power inversion' on the lines happening several times per hour, almost always right before a train passes. I am not sure I understood him correctly. :)

This issue lingers around in my head for a couple of weeks now, so I come to the esteemed panel here for answers:

Is there indeed some sort of 'power inversion' happening on electrified railways (in Belgium?)
Is it possible that the effects of this inversion reach into my friend's house and affect their router?
Can they shield their router in any way to prevent the Wifi-outages?
Is 2.4 Ghz more or less affected than 5 Ghz? (Should all their devices connect to one instead of the other?)

Thanks a lot for helping solve this riddle !


texts: Can FPGA-based ASIP be used in real life?

texts:
Imagine I want to design an ASIP for, say, some automotive application. The ASIP is developed and tested using FPGA board.

Is it possible to take the FPGA and put it into the car (without creating the chip in silicon) ?

What would be the problems? Size? Speed? Reliability? Something else?


texts: Why do two reverse diodes represent the logic gate AND?

texts:
Consider:

I can make no sense in my head how this can work. How is it possible to have a current flow through normal diodes from cathode to anode and represent an AND if both are 1?


texts: Why does the output of the mosfet differential pair connect to the gate of the pmos of a common source amplifier?

texts:
I'm told that a simple operational amplifier made from MOSFETs can be shown in the picture below.
M1 M2 M6 and M7 make a differential amplifier. M3 is used as the reference mosfet to create a current mirror and M8 and M5 is a common source amplifier.
Basically its two amplifiers and so gain is G = Gd * Gcs.
The problem at hand is that i'm not fully understanding why the output of the differential amplifier is connecting to the gate of the p mosfet M8.
For example the usual common source amplifiers that I have seen is that the Vin is at the gate of the nmos M5, this is the signal that is being amplified. The gate of mosfet M8 is usually a bias voltage to keep the mosfets in saturation, also  the current flowing through both mosfets is the same.
In the configuration shown the signal being amplified is put through the gate voltage of M8, which doesn't make sense to me.
The drain current and so the current through M8 and M5 is the same and  this is assigned by the current mirror, and so this sets the gain. However said above the gate voltage of the pmos in cs amplifiers i have seen has been a bias voltage to keep it in saturation. So it makes no sense to me how the voltage output of the differential amplifier is getting amplified from being connected to the gate voltage of M8.
Hopefully the problem comes across clearly.
Thanks


texts: Is connecting a 2 A adapter to a 1.3 A electrical device safe?

texts:
Is connecting a higher-amp (e.g. 2 A) adapter to a lower-amp (e.g. 1.3 A) electrical device safe?

I wonder if it will cause the adapter to over heat and cause fire or cause damage to the electrical device.


texts: How to amplify a thermocouple that shares a wire with a heating element (soldering iron?)

texts:
I have a problem that I can't seem to wrap my head around.
I am designing a controller for a JBC handpiece, but the cartridgess are only three pins (JBC Nano only two.) I'm trying to design a controller that would be "universal" between the two (for now just focused on the C245 pictured below.) I'm using 24-45VAC.

I would measure the thermocouple at the "zero crossing", but how would I protect the circuitry when it is not at zero crossing?
I have the basic AC MOSFET circuitry, current sensing, etc. all figured out (ready for testing,) but just can't seem to understand how I can measure the thermocouple correctly. I have seen many designs using "single ended" designs using diode protection, but wouldn't using an op amp in differential configuration be better? (Below is my rough circuit.)

Yellow = C1, green = C3, temperature goes direct to micro. (I'm using a "rail splitter" for my voltages, -5v_v is analog GND.)
I'd go into more detail but this is already fairly long.
TL/DR: How to amplify thermocouple signal when one leg is "common" to an AC heater element? Single ended vs differential vs something else.


texts:
I am trying to do a partial integration on a 550 KHz waveform using STM32F4 Discovery board using the Waijung toolset in Simulink. The sampling time that I am using is 0.018 us, i.e 3 cycles, if the clock frequency is 168 MHz. The ADC prescaler is 2, so the ADC frequency is 84 MHz. The total time required for the conversion should be 0.143 us (12 bit resolution) +0.018 us i.e. around 0.16 us. This should theoretically suffice the Nyquist criteria for sampling. However, I dont seem to get any output at the end. I can't see the real time data after ADC, using the serial interface or the DAC. So I am not sure what I am doing wrong. Any suggestion or idea is much appreciated.

P.S. I am attaching the waveform I am trying to acquire (integration between say 20 us to 140 us) and the simulink program. Please let me know if any other information is required.


texts: What could be the reason for this flickering of this periodic pulse train?

texts:
I try to create periodic pulse train for the clock signal in application. I use an arduino nano board. But I noticed in scopes I see flickering pulse train behaviour. It is very hard to explain this by text, so I have uploaded to YouTube:

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

As you can see in the video, the pulse train is not very stable it is flickering randomly. When I save the data as CSV or stop the screen I get the following pulse train sometimes I can catch it like below:

So at this particular point above scope shows some pulses are missing.

Here is the code I use to produce the pulses:

const int CLOCK_PIN = 5;

void setup() {
  pinMode(CLOCK_PIN, OUTPUT);

}

void loop() {

  for (int i=0; i<25; i++) {

    //digitalWrite(CLOCK_PIN,LOW);
    PORTD &= ~(1 << 5); // clock pin goes low
    delayMicroseconds(2);
    //digitalWrite(CLOCK_PIN,HIGH);
    PORTD |= (1 << 5); // lock pin goes high
    delayMicroseconds(2);
  }

    delay(50);
 }

I couldn't figure out whether this is scope artefact or related to the code. What could be the reason for this? This is happening both in Auto and Normal trigger mode.


texts: Mounting USB-B connector off-board in device enclosure. Is there a standard component for this?

texts: So I'm working on a PCB that I'm hoping to quote for production.  It makes sense to put all the control and output features on a single PCB, and that's generally the plan.  However, the power jack (Mini-B socket) has to be about 2" away at the back of the enclosure.  Its the only thing that needs to be back there.  I'll have a little rechargeable battery in between the two, and the charging circuit will be built into said PCB in front.  Is there a standard "tethered" USB socket that I can just have soldered to the PCB at the factory?  I was thinking just a simple wire connection, but maybe a rigid stamped pin connector, or ribbon would work.


texts: dynamic charge sharing between multiple gates

texts:
Based on this video: https://www.youtube.com/watch?v=CN4oIcAPIV4
hopefully it is legitimate

I understand what is being done here. However, I don't understand it well enough for a more complex case such as this

lets say I want to find the reduction of voltage at this node

adding in capacitors

Is it correct to say that

worst case here is ABC=110

C2 and C3 will appear in series, so let Cs= 1/(1/C2 +  1/C3 )

and CL VDD + C1 V1 +Cs V2 = ( CL + C1 + Cs ) VOH


texts: How to select load sensor for specific application

texts:
I have a project based on weighting scale. On the internet I have seen multiple types of load cells such as shear beam, single beam, s-type, planner beam load cells etc. What type of load cell is best for my application?

I want to measure weight in the range 0-300 Kg


texts: Will an inductor wound using wire of 0.6438 mm (22 AWG) be close enough to 0.508 mm (25 SWG) for a neglectable difference?

texts:
Degi-Key has 25SWG as an obsolete item.
While the instructions for a project say to use, "25cm length of 25SWG wire. Wrap the wire around a cylindrical object of 6mm diameter and take it out after eight turns."
http://www.electronicshub.org/fm-bugger-circuit/

Additionally, is there a general rule (such as 0.2 mm tolerance) for small inductors (less than 20 turns ~ maybe) for most gauges of wire?


texts: How do I find a matching plug & header pair?

texts:
I'm browsing board to wire type connectors. My aim is to solder a header on my PCB, and use a plug to receive/transmit signals from it.

As far as I see, the headers and plugs are sold separately, and there is not explicit information which headers are pair to which plugs. When I choose a header from the list, how do I choose a correct plug for it? How do I correctly find matching plug and header pairs?


texts: Can anyone explain how it works? What is the role of the diode in the circuit?


texts:
I am a newbie to RF World. I need to know how to generate a 10Ghz sinusoidal wave. I have found this module:
https://pl.mouser.com/new/texas-instruments/ti-lmx2694epevm-eval-module/
Is it a good option for this purpose? Does this module need any other RF source?
what are other ways to generate Low phase noise oscillator? (10Ghz)


texts: PIC On-the-fly software updates over radio

texts:
I plan to run one of the 8-bit PIC microcontrollers (like PIC16F1938) connected to the radio-module (NRF24L01+).

Suppose, that I use less, than a half of the available program memory, would it be possible to implement on-the-fly software updates?
Are there some library or example projects, that already implemented something like this?

My own considerations:

Memory organisation

0             x                      ~size/2                        size
+-------------+--------------------+----+-----------------------+----+
| BOOT LOADER | USER CODE          |    | DOWNLOADED USER CODE  |    |
+-------------+--------------------+----+-----------------------+----+

Boot loader:

Small
Can't update itself on-the-fly
Aligned to some fixed address in the program memory (at 0?)
Works in two modes:

NORMAL_MODE

Check CRC of the USER CODE
Run USER CODE, if CRC OK
Switch to UPDATE_MODE, if CRC not ok

UPDATE_MODE:

Copy the DOWNLOADED USER CODE into USER CODE
Set mode back to NORMAL_MODE
Restart

USER CODE:

Aligned to the address x
Not larger as (size - bootloader_size) / 2
Contains update routine, that can

Download the new user code
Store it at the address bootloader_size + (size - bootloader_size)/2
Set boot loader mode to UPDATE_MODE
Restart


texts: Custom connector for connecting 8-pin to 20-pin

texts:
ARM-based device have 8-pin 2x4pin JTAG header. J-Link debug probe have standard 20-pin J-Link connector. I have 8-pin 2x4 Socket-Socket IDC Ribbon Cable.

One end connects to the 8-pin JTAG header on device, and the other end should be connected to J-Link probe. What is better way to interface this 2x4 pin socket with 20-pin J-Link probe? Should be used a custom-built connector for this, which connects matching pins? Please advice the most handy way.


texts: How can I make a test circuit and application for CA3020A power amplifier?

texts:
I found these components recently and am eager to work on them. I first need to check if they are working and then need to make an application with them. I referred to the data sheet but still not able to proceed.
This is the link to the datasheet.


texts: How to get data from one micro controller to another using UART

texts:
My concept is I have two designed boards, One with AT90USB1287, other with ATmega32A both are working properly.

AT90USB1287 is talking to the PC via USB.
ATmega32A is talking to the PC via USART(RS232).

Now i have connected ATmega32A board to AT90USB1287 using UART communication(RS232 cable by disabling connection to PC) Because both boards has to work together with one PC. Easiest way is UART connection between those two.

If i want to send data from ATmega32A to PC means, I have to get data from ATmega32A to ATusb901287 and send it to PC via USB.

I am confusing how to get data from ATmega32A to AT90USB1287.
I have given connections like
1. connected RxD pin i.e., PD0 i.e., Pin 14 of ATMega32 to TxD pin i.e., PD3 i.e., Pin 28 of AT90USB1287
2. connected TxD pin i.e., PD1 i.e., Pin 15 of ATMega32 to RxD pin i.e., PD2 i.e., Pin 27 of AT90USB1287
3. USB pins of AT90USB1287 are connected to PC USB.

  Updated

I have implemented UART functionality for both controllers.

The problem is i am not able to send the command that i got from PC to AT90USB1287 via USB. the command will be in USB receive buffer. I have to send the command to another micro controller using UART of AT90usb1287.

  Updated2:

I have one more problem with this communication between two microcontrollers using USART. I have the interface code for both controllers like this.

I have the first board with AT90USB1287 microcontroller which is connected to PC using USB, I have several commands like this "CMD", "TEMP" ... When i send command it gives the response. Which is working perfectly. I have to connect another board which contains ATmega32A microcontroller to this board using USART. I have connected and I implemented USART communication in both boards, even the second board also have the similar type of command format and i need to send command to get response as well.
To send the Command from PC to second board i have to send the command first to AT90USB1287 board using USB communication and from that to ATmega32A using USART. I have done that and i am able to get response from second board also but i have one problem. What happening with my code is whatever command i send from PC it is sending to second board, i need to change like only commands which exist in second board has to sent to the second board.

Can anyone suggest me that how to stop sending all commands and send only those 5 commands which related to second board? Please help me with this.


texts:
I've been experimenting with the PWM Waveform Generation Modes on the ATMega328P. I've been getting some strange results and I can't figure out if its a problem with how I'm writing the firmware or how I'm interpreting the datasheet.

Here's the first piece of code that I wrote to emulate the analogWrite() function:

// Waveform Generation Mode 0
// Table 15-4 of the datasheet

void setup()
{
  DDRB = (1<<PB1); // set pin 9 as output

  TCCR1A |= (1<<COM1A1);
  OCR1A = 125;
}

void loop()
{
}

The above code produces an average voltage output of around 2.5V (49% duty cycle) out of pin 9. The strange thing (for me) is that according to the datasheet, TIMER1 is a 16bit timer, so it should overflow at 65536 ticks. From what I understand setting OCR1A between 0 and 65535 will change the duty cycle of the pulse. So, having set the OCR1A at 125, shouldn't I be getting an output of around 0.01 V instead of 2.5V? The results seem to imply that the clock is overflowing at 255.

For my second foray into PWM land, I wanted to try and create a 2.5V signal using the ATMega's fast PWM mode. Here's what I got:

// Waveform Generation Mode 14
// Table 15-4 of the datasheet

void setup()
{
  DDRB = (1<<PB1);

  TCCR1A |= (1<<COM1A1) | (1<<WGM11);
  TCCR1B |= (1<<WGM13) | (1<<WGM12) | (1<<CS10);

  ICR1 = 19999;
  OCR1A = 10000;
}

void loop()
{
}

I set ICR1 (the overflow value) arbitrarily to 20000 ticks then set OCR1A (the compare value) to about half that. I set Channel A to non-inverting mode, but (I think) it wouldn't have made a difference if I set it to inverting mode. When I flashed this onto the Arduino I was getting a steady voltage average of 5V (100% duty cycle) out of pin 9, and I can't for the life of me figure out why.

I would appreciate any insight you can offer.


texts: Name of the HP Female Adapter Socket In My Laptop

texts:
I have this HP powerbrick with a 90W capacity (19v 4.7A) that I want to use in my project. I am planning to use it as a power source for my 50W LED. But I want to keep the male socket it has rather than chop it off.

What I need is to know what specific socket name should I search in EBay to use it? Or can anyone recommend me a link and I can search it from there.

I search for HP Power socket and I get this result:
http://www.ebay.ph/sch/i.html?_from=R40&_sacat=0&_nkw=HP+power+socket&LH_PrefLoc=2&_arm=1&_armm=63&_ruu=http%3A%2F%2Fwww.ebay.ph%2Fsch%2Fi.html%3F_from%3DR40%26_sacat%3D0%26_nkw%3DHP%2Bpower%2Bsocket%26_arr%3D1

I'm not sure if this is what I am looking for.

Picture of the HP Power Brick

Socket


texts: Question about ideal transformers and inductors

texts:
Recently I was studying about alternating currents and transformers and I got confused about some of the concepts. I tried a lot of sources but none of them seemed to address the problem.

I understood that in a purely inductive DC circuit, the EMF of the source is exactly equal to the back EMF from the inductor at all times (due to KVL) and the current increases linearly with time.

In case of a purely inductive AC circuit, the net EMF is still \$0\$ at all instants and the current follows a sine curve and lags behind voltage by \$\pi/2\$ rad.

Please tell me if I've got something wrong in my understanding or misinterpreted something. I'll be very grateful.

Now my problem:

In an ideal transformer, if the secondary coil is open, the primary coil just behaves like an ideal iron-core inductor since the secondary coil has no effect. Hence the current in the primary coil must be there lagging behind the voltage by 90 degrees.

What I think is there will be a changing current flowing in the primary coil just enough to maintain the necessary back EMF. Here are a few articles I read.

http://www.electricalunits.com/transformer-on-no-load/
https://www.electronics-tutorials.ws/transformer/transformer-loading.html
this Quora post (please see Steven J Greenfield's comment below)

If that's the case the back EMF has to be equal to \$-V_0\sin\omega t\$ which is precisely opposite to the applied voltage and that's the case of ideal inductors as I mentioned in the beginning. I think that this is what should really happen neglecting losses and other non-idealities. Again I may be wrong so please correct me.

But I also found some posts talking about the current in the primary coil being zero.

Here are a few posts which talk about this:

this EE SE post
this EE SE post
this Quora post

Moreover if the current were always zero in the primary coil under no load, that would mean \$\frac{\text dI}{\text dt}\$ is 0 so no back EMF would be induced and it'd be a short since there would be no resistance.

Actually I'm confused about whether or not the primary current at no load will be zero.

Please tell me where I've gone wrong and if something I mentioned is wrong.


texts: Is it fine to use 2.4 GHz nRF24l01 modules in commercial products under FCC rules?

texts:
I want to use nRF24l01 modules commercially. But, at the same time, I am aware of some of the FCC rules. I am just curious if someone knows about the regulation and could help me in this. I found this FCC document.

EDIT:

My concern is the use of this module indoor/outdoor products as it is necessary to have FCC ID for radiating products.
I don't want to get FCC certification as it may cost a lot of money. There should be some way (under FCC rules of course) where I can use this module without getting certification.

The product will be used in both indoor and outdoor environment.


texts: Symmetrical supply (or almost) in Opamps and Inamps

texts:
My question is in relation to the symmetrical supply in opamps and inamps. I did not find this information easily on the datasheet.

I have an INA118P inamp with gain 2, and in my circuit I have 2 possibilities of symmetrical power for it.

First: +-9V coming from 2 batteries, or +-5V coming from voltage regulators (7805 and 7905).

If I were to feed with the +-9V I know there would be a slight difference between the voltages due to the quality and the life of the batteries, for example, one of my 2 batteries has more time to use than the other, so the voltage Of it and more or less 7.8V, the other is newer, and provides a voltage around 8.5V. Ie my feed would not be ideally symmetrical (+ 9V and -9V), would be + 7.8V and -8.5V.

Would this have any practical implications regarding the use of my inamp?

Second: The other possibility would be to feed with +-5V, due to the voltage regulators I know the voltage would be as accurate as possible, but would I have a better gain with +-9V (even though it is not accurate)? I talk about the offset voltage, CMRR, slew rate, and so on.

Of these 2 options which would be the best?

Just out of curiosity what I intend to amplify is a signal received by electrodes from the human body. A voltage of +-1.5V at a rate of 100KHZ is sent to the body by 2 electrodes with 1mA. Another 2 electrodes are responsible for capturing this signal, and they will be connected to the 2 inputs of the Inamp.

Thank You!!


texts: How to monitor / log / record / store voltage reading across various connectors of a PC power supply unit ( PSU )

texts:
I'm searching for a way to detect over-/undervoltages across the PSU connectors so that i can have a better chance of finding causes for HW failures/errors . Best way i could think of was logging the voltages and see if i can correlate any abnormalities with on-screen errors or system hangs and such. But i can't find any device that helps me log the voltages (If you know of a better way, do tell)

Regards,
Sonny


texts: What is the variation of ammeter reading with PQ

texts:
Honestly, this is a homework question. A screenshot of it is given below:

Okay these are the things I have done in order to take the answer.

First I calculate the equivalent resistance which comes form 1000 ohms and 10 ohms.
Therefore I assume that total resistance of the circuit is increasing.
And since the potential difference is constant for the equivalent resistance, I get the relationship of current is indirectly proportional to resistance by using Ohm's law.

So according to my argument a graph should indicate a decrement of current with distance PQ, but here in the answer I don't have such a thing. So I think I have done something wrong, so that is why I'm asking this question here!


texts: Address and communicate with multiple devices in a matrix

texts:
I have a large matrix of devices, "nodes", that I would like to address and communicate with - assume > 50 nodes. Each of the nodes have a controller that receives data from a central microcontroller and then performs a function.

I was thinking of using I2C for this but since the controllers will be the same, the number of addresses are limited to only as many variations the controller can provide.
Is there a better way to address and communicate with this large grid of devices with minimal wiring? I initially chose I2C since it has just 2 wires (SDA, SCL) for bus functionality, apart from power and ground.


texts:
Okay, we had a seriously bad science teacher this year, and long story short, we hardly understood anything relating to DC current(she was fired a few days ago).

I understand Ohm's Law:

Working out current from voltage/resistance

Working out resistance from voltage/current

Working out voltage from current*resistance

I understand what current is(I=q/t, flow of electrons in a circuit)

I understand what voltage is(potential difference)

I understand what resistance is(how much a resistor decreases the current)

I understand what wattage is (voltage*current)

I don't fully understand batteries:

Battery x is rated at 5volts, 2500mAH.

Device y draws 5 volts, 5mA. This means that the battery would last 500 hours correct?

Now, device z draws 5 volts, 3000mA. This means the battery would last under an
hour correct?

Now circuit d draws 5 volts, 2500mA. The circuit would last 1 hour.

Now take a AC -> DC adapter, it is rated at 12 volts, 1A.

What does that amp in this circumstance refer to?

Is it to work out the maximum resistance that a device plugged in could have?

Would this adapter be working as the battery in a circuit?

Is it refering to the amperage of the full circuit when a device is plugged in?

So, batteries don't output amperage. It changes depending on the voltage/resistance of the device.

Now wattage. Why are some devices rated in watts?

For example my PSU is 600watts.

So it outputs 600watts total over a bunch of 12v, 5 volt and 3 volt cables? It's input is 220V, so the amperage it draws is: 2.7Amps?

Or is that the amperage it outputs?

Thank you if anyone answers these question, I taught myself all of this from countless days of research and questions.


texts: Is there an FPGA implementation of Donald Knuth's MMIX?

texts: Does anyone know of an FPGA soft-core implementation of Donald Knuth's MMIX? My google search only found old discussions of people who knew people who were working on an FPGA implementation.


texts:
I'm tying to calculate the change in reactive power of an alternator with the change in its real power input.

P=EV/Xs sin(d) is the real power output of the generator.

Q=EV/Xs cos(d) - V^2/Xs is the reactive power output of the generator.

I can take derivative of these equations. dQ/dP to calculate change in reactive power with change in real power.

But I can also use the absolute equations to calculate reactive power before and after change in real power.I have applied both these methods, I'm getting different results.

What could be the problem ?


texts: Converting old relaxation oscillator vacuum tube circuit to a more modern circuit?

texts:
I am trying to figure out how to convert an old relaxation oscillator circuit from the late 30's. The history of this circuit, is this is the buzz generator for the Bell Labs Voder, which is a speech synthesizer that is played using a keyboard. I am planning on making a clone of it.
This circuit combines the relaxation oscillator, and also a way to change what the voice sounds like using 2 hand adjustable potentiometers, with a pitch pedal (which is also a potentiometer,) which changes the pitch of the output of the signal. The confusing part of the circuit, there aren't any values to the circuit, and that it has 3 different voltage inputs.  I'm not sure if they are the same voltage to each or if they could be 3 different voltages in the circuit.


texts:
I want to know the reason behind why this elements are connected in mosfet driver circuit. Basically I want to know the use of this elements .
elements are
(1)R1,R2  and diode in parallel with them
(2)R3,R4


texts: Detecting interrupt on Atmega8 from zero crossing detector circuit

texts:
I have a zero crossing detector circuit, whose output I am providing to my Atmega8 as an interrupt, but unfortunately its not working. If I use DC supply 5V (logic 1) as an interrupt, it works.
Where am I going wrong?

Attached is the output of zero crossing detector circuit:

Here is my complete code:

#include <avr/io.h>
#include <avr/interrupt.h>

#define F_CPU 1000000UL
#include <util/delay.h>

#define DataPort    PORTB   // Using PortB as our Dataport
#define DataDDR     DDRB

//Interrupt Service Routine for INT0
ISR(INT0_vect)
{
    ///* This for loop blink LEDs on Dataport 5 times*/
    for(int i = 0; i<3; i++)
    {
        DataPort = 0x00;
        _delay_ms(50);  // Wait 5 seconds
        DataPort = 0xFF;
        _delay_ms(50);  // Wait 5 seconds
    }
}

int main(void)
{
    DDRD = 1<<PD2;      // Set PD2 as input (Using for interupt INT0)
    PORTD = 0<<PD2;     // Enable PD2 pull-down resistor

    DataDDR = 0xFF;     // Configure Dataport as output
    DataPort = 0xFF;    // Initialise Dataport to 1

    GICR = 1<<INT0;                 // Enable INT0
    MCUCR = 1<<ISC01 | 1<<ISC00;    // Trigger INT0 on rising edge

    sei();              //Enable Global Interrupt

    while(1)
    {
        DataPort = 0xFF;
    }
}


texts: Is there a circuit where output signal is high ONLY when at a specified input voltage?

texts: Is there a circuit where the output is high (or on) when the input voltage is at a specific voltage range? For example, if the input voltage is 4.5 V or lower than the circuit output is low (or off). And if the input voltage is 5.5 V or higher than the circuit output is low (or off). However, if the input voltage is between 4.5 V and 5.5 V then the circuit output is high (or on). I've tried various ways using Zener diodes and transistors but keep running into dead ends. Any help is appreciated.