texts: Interfacing with USB connector in simulation

texts:
I'm prototyping a board which has a USB connector, in Spice or any other circuit simulation technology. The production board will plug into the PC and there will be some software which talks to it through USB. I'd like to do a lot of the prototyping in software before I mess around with meat-space, because speed.

Is it / how is it possible to connect the software to a simulation of the board? What simulation software does this?

In other words, it would be cool to get the simulation happening and have it act like it's plugged into one of the USB ports on the computer (a real one or a virtual one), so I can test the interaction with my PC-side code.


texts: What current should I choose in bench top DC power supply?

texts: Most of the time while I'm doing my university projects, I find that only voltage requirements are given for building a circuit, and how much current I should supply from a bench-top DC power supply is not given. Normally, if we require 5V supply, we set the current to some small non-zero value only ,like it's not important. So I'm wondering if anyone knows the importance of which current to set.


texts: Why is there no rat's nest in this file? (KiCad)

texts:
Can anyone tell me anything about this schematic that might cause it not to have a rat's nest?  By the default settings, most pins are warnings.
This is simply a bus for some buttons on a pull down resistor....

I could do the breadboard manually, but what I'm really interested in is the cause of this error!  I import the net.. no rat's nest.


texts: Boundary of DIY soldering: is it possible to reflow 0402?

texts: 0402 packages - absolutely tiny. I'm wondering if it's possible to reflow solder them using a hotplate/skillet or toaster oven. Does anyone have any experience with doing this?


texts: Can I connect a 12 Volt and 24 Volt AC to DC SMPS to get 36 Volts?

texts:
I am a bit of a newbie when it comes to electronics, the only reason I am here is because I need to make something work and cannot do so because of the lock down. So please, bear with me.

I have a portable fan. It needs a 36 Volt power supply.
Due to the lock down, I am unable to order a 36 Volt power supply.

I have a 12 Volt and a 24 Volt power supply, my question is that can I connect them together to output a 36 Volt power supply?

I don't want to risk anything cause the fan is quite costly.

And if I can connect them together, how do I do it?

EDIT:
Images of the power supply:

Sorry, they do not have much information on it. I come from a third world country and this is the kind of stuff you get in most of them. :(


texts: Calculating RF attenuation through plastic container

texts:
I need to provide a customer with an analysis for the maximum range of transmission for a wifi system. I have a raspberry pi with an XBee transceiver module on one end and a laptop with an XBee transceiver on the other end. The XBee states maximum distance of 300 ft. However, the raspberry pi with the transceiver will be house inside a Pelican case (plastic). I need to calculate the maximum distance that our system can operate (at least estimated). Therefore, I would like to know how to calculate how much (percentage-wise), my transmitted signal will be attenuated while passing through the Pelican case.

For example, if I will attenuate the signal by 20% due to being inside the case, my max distance of operation is now 240 ft. (300- 0.2*300).

Can someone assist me in calculating this? If I knew the amount of attenuation per inch of abs plastic for example, then I could make the calculation, but I couldn't find those values.

Thanks,
-D


texts: Reverse Voltage Protection the same as Reverse Current Blocking?

texts: I have been searching for an power management IC for my circuit but i noticed that Reverse Voltage Protection and Reverse Current Blocking are both a separate feature. Logically speaking i think they are the same because if there is no reverse current there would also be no reverse voltage. But since they are marked differently (where one ic is labeled RVP and another RCB) makes me think that I am missing something. Are there distinct difference between the two ? What i want is to protect my circuit from Vcc and GND being connected interchanged


texts:
I have the USBasp programer and I'm trying to burn bootloader on Atmega328 so that it can be used as a replacement chip in Arduino board (replacement chips with the bootloader installed are quite expensive).

I have installed the USBasp drivers - the installation is quite straightforward thanks to the guide. The device was recognized and is working properly - according to windows.

I have then connected the pins according to the datasheet. After that, I started Arduino IDE and I selected USBasp as a programer:

I have noticed that whenever I hover over Tools the arduino IDE lags for a while. But that might simple be an unrelated software bug.

After I selected the correct programmer I have clicked Burn bootloader and I got this error:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I have already been trying to program this chip using Raspberry PI - and I've failed as well. And I still can't find out where the error is. Except the possibility that I bought 2 void chips.

My question is how can I test all fragments of my system and check which one is broken. AvrDude's errors are useless.

Here's an image of my connections when trying the same (and with the same result) with AtTiny:


texts: 2x2 Mimo antenna layout: Is it a requirement to length match the antenna traces

texts:
I am currently laying out a 2x2 MIMO antenna configuration for WiFI, using on board ceramic antennas.

While naturally the traces are impedance matched. Is it important to match the traces to the uFLs in length?

Is there any advantage to a length matched antenna pair?

This design is required to specifically measure RSSI.

I have seen some references to performance differences, but no application note which indicates length matching as a standard.


texts:
I am wondering how the electronic circuit used to drive the tuning fork in the Accutron Spaceview watches worked. The page at The Accutron 214 gives a brief explanation and some diagrams. I am most interested in the later "two wire" circuit:

I am unsure whether the tuning fork has magnets inside the cups or if they are just metal, but I believe they are just metal. It would be nice to verify this somehow. Other than that the driving coils keep the fork in motion with periodic pulses of current and that the feedback coil somehow senses the motion of the fork to control the driving coils through the NPN transitior, I am absolutely clueless as to how the circuit works. Any help would be appreciated!

EDIT: I've been pursuing electronics more seriously recently and have a much better grasp on how circuits like this work now. One of the physics classes I took last year was also fairly illuminating. I have an idea about how this circuit may work and I would like someone to verify this is correct or point out the fallacies.
The transistor acts as a common emitter amplifier, the resistor biases the transistor so it is constantly conducting. I am surprised how little current it passes though; judging on transistor specs from the era - it seems the drive coils would have a current of under 10 microamps going through them constantly (I assumed a current gain of 15, since the silicon transistor would have been an improvement over the earlier germanium transistor used in the first design, which I know had a current gain of about 12). Could that be right? It's so little current.
As the drive coils appear to be wound in the same direction, that is with the fields they produce both pointing in the same direction, the metal cups of the tuning fork should be attracted together slightly, as the current through the transistor increase so will this attraction. Any signal received by the feedback coil is passed through the capacitor. Due to the direction of the feedback coil's winding, this causes positive feedback; an increase in the number of field lines through the feedback coil will cause a larger current through the drive coils, a decrease causing a smaller current. As the tuning fork reaches one extreme and begins moving back, this changes the magnetic flux through the feedback, which keeps the electrical component of the circuit in phase with the motion of the tuning fork. Positive feedback ensures the system keeps going.


texts: Noise on the whole board after USB connection

texts:
I designed a device on which there is a HUB, FT232 , two external USB port and some periphery.

I wanted to check the noise on the power bus. And I saw only white noise.

But after I connect the USB cable, I see on ALL circuit this is an noise.

Most likely it is common mode noise from fronts D+/D-, because if I connect only the VBUS and the GND noise disappears.

How terrible is this noise?

How can i get rid of this noise?


texts: How do I pick a suitable battery for my sensor?

texts:
I'm very new to electronics, and I have a sensor which is being powered by 2 batteries in series, each 6V/3.5Ah. I believe this means the total Watt Hours is 6x3.5x2 = 42Wh. When the sensor started, it detected the batteries had 12V initially, but after an hour had decreased to 8V. It no longer functions properly once it hits 8V. However, I need it to run, uninterrupted, for 6 hours, with enough voltage.
What kind of external battery should I look for to facilitate that?


texts: Parallel generators don't divide reactive KVAR load equally

texts:
We have three generators cat 3412 800kW at our power station. They load in synchronization. But we have a problem in the sharing of the reactive power KVAR.

The voltage regulator used in the system is a model VR6, and the sharing used cross current compensation. The problem happened when we disconnect any of the three generators for maintenance and loaded again, as we found that the pf rapidally changes between them.

We had performed the following:

Checked all the connection again for any wiring loose but fount it is ok
Replaced the voltage regulator for all the generator step by step and nothing happened.

Can any on help me to find the root cause for this problem?


texts: Star rating of electrical appliances like AC / fridge

texts: What distinguishes a 2-star rated AC/fridge from the one rated 5-star? What exactly is the technical reason for the difference in their efficiencies? Is it the compressor technology / the wiring / better electronics or something else?


texts: Problems finding voltage between two points (transistor)

texts:
I am having a homework question about transistors where I am asked to find the voltage drop between the base and the collector (Vbc). I drew the circuit in Proteus but I am not sure where to put the two dots which are going to represent the point B (for base) and point C (for collector). I am not sure if I should put the positive end of the DC voltmeter on the B point and the negative end on the C point. Or should it be vice-versa?

So, I think that I should put the positive end of a voltmeter after the R10 resistor and the negative end before the R9 resistor therefore I get -9.97V but if it is vice-versa I get +9.97V. I am confused as to which one is the right one, if someone has an idea I would gladly listen to them.


texts:
I have a sheet that needs to be repeated 30 times. Normally this has not been an issue.

However, one of the components in the sheet is a shift register that has a serial in and a serial out (for chaining multiple devices together).

A single serial signal comes from the top level, and goes into the sheet to the serial in of the first sheet and the serial out is to go to the serial in of the next sheet etc..

I'm having a bit of difficulty arranging my sheets so that its easy to wire, and easy to see what exactly is happening.

Any thoughts of how I can pipe the output of one sheet into the input of the same sheet (repeated) ?

I had 30 sheets before, but when I had to make a change in the wiring, I had to make 30 changes overall and I don't want to do that again, which is why I'm trying to do it this way.

Here's an example of what I mean.

This is a shift register, where Q7S is the serial output. So this shift register can be cascaded to form a long chain.

But there is more stuff happening on this schematic that is not shown, and so this entire schematic has been been made into a sheet symbol because everything that happens here, gets repeated a bunch of time.

For the very first shift register, I feed it data that comes from my microcontroller (DATA_IN_1). But the Q7S from sheet RELAY_1, becomes the serial input for sheet RELAY_2, and so.

The problem I was having, was setting up the connections (wires, busses, net names) so that I can get the connection I wanted so that I can cascade the shift registers together.

I say "the problem I was having", is because I ended up changing my design that I no longer needed to cascade them together and so didn't need to worry about how the connections were. However, I still would like to know, and it might be a good question for this community. This could also be a limitation of the software. I don't know.


texts:
I am builing a homemade reflow oven, but I cant find a good and cheap temperature sensor that can survive the temperatures necessary for reflow (~250ºC or 482ºF).
Does anyone have a recommendation?
I will be reading the output in a PIC ADC to control a relay.


texts: Finding the capacitance of a full wave rectifier

texts:
I am currently learning electrical engineering,and I'm having trouble in finding the capacitance of a full wave rectifier so that it would match the graphs below.
From the image below, the input voltage is a 10 V sine wave and the load of the rectifier is 2000 ohms. I am having trouble finding the capacitance and the only idea I have tried is looking when the input voltage is at 0. I would like any help possible.

Thank you.


texts:
This may (and probably will) sound very silly, but I rather ask first than destroy my childhood memories - I found my old sega mega drive at my parents home, but it had no psu. I knew I had some psu's laying around at home so I found one that supplies 5V2A, but the console requires 10V1A.

I guess I should get an universal psu somewhere, but maybe, by some chance, the one I got at home won't burn my console and will actually work?

Thanks.


texts:
I need to perform an FFT on a block of 8192 samples on an STM32F446 microcontroller.
For that I wanted to use the CMSIS DSP library as it's available easily and optimised for the STM32F4.

My 8192 samples of input will ultimately be values from the internal 12-bit ADC (left aligned and converted to q15 by flipping the sign bit)., but for testing purpose I'm feeding the FFT with test-buffers.

With CMSIS's FFT functions, only the Q15 version supports lengths of 8192. Thus I am using arm_rfft_q15().

Because the FFT functions of the CMSIS libraries include by default about 32k of LUTs - to adapt to many FFT lengths, I have "rewritten" them to remove all the tables corresponding to other length than the one I'm interested in. I haven't touched anything except removing the useless code.

My samples are stored on an external SDRAM that I access via DMA.

When using the FFT, I have several problems :

Both my source buffer and my destination buffer get modified ;
the result is not at all as expected

To make sure I had wrong results I did an IFFT right after the FFT but it just confirmed that the code wasn't working.

Here is my code :

status_codes FSM::fft_state(void)
{
  // Flush the SDRAM section
  si_ovf_buf_clr_u16((uint16_t *)0xC0000000, 8192);
  q15_t* buf = (q15_t*)(0xC0000000);
  for(int i = 0; i<50; i++)
    buf[i] = 0x0FFF; // Fill the buffer with test vector (50 sp gate)

  // initialise FFT
  // ---> Forward, 8192 samples, bitReversed
  arm_rfft_instance_q15 S;
  if(arm_rfft_init_q15(&S, 8192, 0, 1) != ARM_MATH_SUCCESS)
    return state_error;

  // perform FFT
  arm_rfft_q15(&S, (q15_t*)0xC0000000, (q15_t*)0xC0400000);

  // Post-shift by 12, in place (see doc)
  arm_shift_q15((q15_t*)0xC0400000, 12, (q15_t*)0xC0400000, 16384);

  // Init inverse FFT
  if(arm_rfft_init_q15(&S, 8192, 1, 1) != ARM_MATH_SUCCESS)
    return state_error;

  // Perform iFFT
  arm_rfft_q15(&S, (q15_t*)0xC0400000, (q15_t*)0xC0800000);

  // Post shift
  arm_shift_q15((q15_t*)0xC0800000, 12, (q15_t*)0xC0800000, 8192);

  return state_success;
}

And here is the result (from GDB)

PS : I'm using ChibiOS - not sure if it is relevant.


texts:
I am trying to drive a 5V Relay using ESP8266-01 module.

Following image is the circuit diagram i have uploaded.

My sketch is about connecting the esp to the mentioned Access Point and controlling the relay from esp.

When i power my device ( same as the connections given in the image below ), the esp turns on (blue led is turned on on esp) but it does not work according to the sketch.

When i remove the connection between GPIO2 (of esp) and R3, the esp works according to the program logic but in that case i wont be able to control the relay from GPIO2 (of esp).

Can anyone guide me resolving this issue ?


texts: Difference between a memory cell and a memory chip?

texts:
I have gotten very confused on the fundamentals of computer memory in regards to memory cells and chips. I have been reading Assembly Language Step By Step Programming with Linux by Jeff Duntemann and in Chapter 3 "Lifting the Hood" he dives into what a computer is, starting with how memory in a computer works (RAM, memeory chips, and cells). The confusion starts when he uses memory chip and memory cell interchangeably.
It states that transistors act as switches and have either a state of on or off which represent 1 or 0 respectively in binary. Then it states

...the transistor switch and its support components are called a memory cell.
A single computer memory cell, such as the transistor-based one we’re speaking of here, holds one binary digit, either a 1 or a 0.

So from the above quotes I have the impression that a cell holds one bit and has a transistor.
The confusion starts here:

Whereas in the beginning one chip held one transistor, in time semiconductor designers crisscrossed the chip into four equal areas and made each area an independent transistor.

Not it is stating a chip is holding the transistor but before it said the cell held a transistor. It also says the chip was redesigned to hold four transistors so in essence now a memory cell/chip holds four bits of memory not one as it said previously.
Then it goes back to using them as separate objects.

...256 memory cells could occupy one chip of silicon, usually in an array of 8 cells by 32.

Now it says chips hold cells.
The question I have is what are the differences between the cell and chip? Also if you could help clarify my confusion of how memory works.
Follow up question is how does this relate to RAM? Does RAM hold multiple chips or is the chip actually RAM in this context?


texts: Understanding a low pass filter used in a HV circuit

texts:
I have been given the following circuit:

The input of this circuit is a 3.3 kV DC signal. The filter is there to stabilize high frequency ripples that might appear on the supply line.

As far as I can see, this is a 3rd order low pass filter (R11/C11 + R14/C12 + R15/C13...not sure about the last one, though, since C13 is smaller).

What I don't understand:
1) the function and values of the resistors in the "return" line (R12, R13, R16).
2) Isn't this return line supposed to be just ground? Any particular reason why they would call it "return"?

Final note: my assumption is that J5 is used to monitor the current through R16 (to, conversely, monitor the HV value) but I am not 100% positive on this.


texts: What happens if a motor draws more amps than a battery can provide?

texts:
Lets say I have a motor which draws 25 amps and the battery I'm using can only provide 20 amps. I would assume this would cause a drop in voltage and poorer performance of the motor, but is this potentially dangerous or could the battery be damaged?
Another scenario, the motor again draws 25 amps and this time the battery is able to provide 35 amps, however the motors starting current is 420 amps which is significantly more amps than the battery could provide. My guess is this would cause a temporary drop in voltage which would eventually stabilize, but would this scenario be potentially dangerous or could the batteries be damaged in the process?
Thanks for your time and help!


texts:
I'm trying to make a circuit with a transistor on each side of an LED so it only lights up when both transistors are activated.

The transistors need to be on either side of the LED because the LED is part of a small LED grid display and one transistor controls the vertical line (which the anode is connected to) and the other transistor controls the horizontal line (which the cathode is connected to)

Here is the simple circuit I came up with:

Seems to me like it should work, but it doesn't. Applying a voltage to Va and Vb doesn't light up the LED. I'm pretty new to electronics, so I'm sure I'm missing something simple. Is there something obiously wrong with this circuit? (adding a resistor in series with the LED doesn't help)


texts:
How can I make a simple cheap 3 port Switch?
I have 30 10-base low speed Ethernet devices and I want to connect them together, how can these devices connects together with simple Bus topology?
simplest and cheap way?


texts:
I am having situation that when I connect my monitor with ADV7511, it triggers interrupt (when hot plug detect happens) but more than one time, so I done debouncing. Problem is when I am unplugging cable, I don't know if I can call it bouncing, as it causes also multiple interrupts during pulling the cable out of the connector.

How to solve that problem? Does it also need some kind of debouncing? But it lasts more than second or two.


texts: How drift current is independent of bias voltage in semiconductors

texts: The equation J=nqv where n is a concentration of electrons or holes,v is drift velocity.also, v=uE where u-mobility, E is an electric field.SO as bias voltage increases, in turn, increases the Electric field and then results in an increase in Current Density.So how it is possible that the drift current is independent of bias voltage.


texts:
I want to use AD811AN as high frequency amplifier. According to its datasheet , Its Absolute maximum V+ and V- are +18 and -18 and differential input voltage is +/-6 V. Most of the graphs in the datasheet are tested in +/-15 v supply voltage.

When I use it with +/-12 Volt supply and input signal= 0-50MHz , 200mV pk-pk (which are all well below the maximum ratings), it works fine but gradually it gets very hot (in around 5-10 minutes) until stops working.

Here are thing I tried:

1- Removed all components until it was just connected to V+ and V- . all input, output and ground connections removed. but it gets hot.

2-Replaced it with 3 other parts(with the same part number ) but they got hot also.

I should mention that after the device gets cool, it works fine again for next 5-10 minutes.

I am sure there must be something that I am missing with this device. Please let me remind that the device gets hot even when just pin7=V+ and pin4=V- are connected to 12V and all other pins are not connected to anything.


texts: Input voltage drop in LM358 with "an improved precision rectifier circuit."

texts:
I found the input voltage drops around 2V drop (observed from oscilloscope) when I connect the ion mobility spectrometer (IMS) signal to the circuit "an improved precision rectifier circuit", like the attached picture.
I have already used single supply +5V from Arduino Due and dual supply +-15V, but the problem still existed.
Can someone help me to deal with this problem?

Update 2020.07.15:
I modify some parts to what you suggested. I still have some problem with my circuit. I have the positive and negative signal from the signal source. The first LM358 I use it as voltage follower. Second LM358 I use it as inverting signal circuit, and I can get the peak what I want. But I need to remove up to -4 to -5V and amplify positive signal from second LM358 output. When I use the third LM358 as below, the positive signal is amplified but the negative signal also amplified. Can I have some way to remove negative signal and let the positive signal be amplified?
Second question is I found the signal decrease before first LM358 like picture shown below when I connect the wire between Arduino and signalinput.


texts:
My Bluegiga WT-32 manual ("Stereo CODEC ADC characteristics" table) says:

Allowed Load --> Resistive, min.:16(8)Ω , max.: OC

What does OC mean in this case?


texts:
I have built a digital alarm clock using an LM8560 chip. I tried powering the circuit with DC and the 7 segment display lights up, but none of the buttons worked and the numbers on the 7 segment display did not change.

So today I tried powering the circuit with a 11.8V AC power supply and one of the capacitors popped, even though it was rated a 16V.

Should I proceed in trying to make the circuit work on DC or should I try to make it work with AC. From looking at the circuit diagram, only the 50/60Hz input needs AC, so would connecting pin 3 of a 555 astable circuit do the job?


texts:
I was reading an answer in Quora about how 3-phase electricity is generated. There was a picture in the answer:

Is it right to say that the generator above can produce 3 oscillating currents with 120 degree shift regarding in each coil based on Faraday's law of induction? Or it's just an oversimplified version that can not actually generate 3-phase electricity?

If it does, there are 2 coils for each phase in real-world 2-pole generators? (having 6 coils for generating 3 phases instead of 3 coils)


texts:
We have designed a board to control asynchronous single phase motor, using two half-bridge gate –drive IC (Fairchild FAN73833MX) and four IGBT (Fairchild FGH30T65UPDT) as shown in the scheme below.

Using a MCU we have implemented a 18kHz PWM control signal with a 1,5us dead-time, but we noticed that the outputs of the two drivers don’t respect this dead time and there’s cross-conduction issue.

For debug only we tried to use a longer dead-time (6 us) and powered the board at about 90 Vac by Variac, but this problem still exists.
In the image below, you can see:

Probe 1: high-side driver output (HVG, pin7) referred to GND;
Probe 2: high-side driver input (IN_H, pin 2) referred to GND.

When IN_H signal goes to low level, the HVG signal follows IN_H with a variable delay (in the worst case, this delay is equal to dead-time, as shown in the image above).

What can be the cause?

Thank you in advance.

UPDATE:

When we connect the motor, we have a similar situation.

To better understand what happens if we connect an inductive load, we tried to estimate the following signals:
-   Q1 emitter current (probe 1);
-   Q2 collector current (probe 2);
using two shunt resistors (1 ohm when we connect a resistive load, 0.1 ohm when we connect the motor).
The first shunt resistor has been connected between Q1 emitter and Vout node, the second shunt resistor has been connected between Vout node and Q2 collector, so both probes are referred to Vout node.

As shown in the following pictures, when we connect a resistive load we find regular waveforms (with correct polarity in the signal measured by probe 2: positive polarity when Q2 is on), where dead-times (about 3 usec) can clearly be seen; but when we connect the motor we no more find regular waveforms (with variable polarity in the signal measured by probe 2: positive or negative polarity when Q2 is on) and dead-times cannot be seen.
In this last case we can also see current peaks at the switchings (up to 30A).
We think that the different behaviour is due to the motor inductive characteristics, but we are wondering if these conditions can be dangerous for IGBTs integrity and eventually what precautions can be taken.

Thank you in advance


texts: What are the specifications of this capacitor marked '3R910, R L'?

texts:
I have a battery charger circuit, this capacitor sits between the rectifier diodes and chunky set of inductors and diodes on the AC input side. The battery charger is 30A 12V car battery so pretty hefty.

WikHow says <number>R<number> means 3.9pF but does not explain why there are an additional two digits afterwards, also looking at high voltage 3.9pF capacitors, they seem much smaller than the one I found in the circuit. Also there is no guidance as to the R and L. The capacitor is shorted so I cant measure the values.

edit

It may be a varistor rather than a capacitor, you can see in this image where I took it from in the board, how can I identify a replacement for this component?


texts:
I want to use an eMMC card for my application.
After searching on different websites,I was not able to find any parallel interface supported eMMC chip.

Is parallel interface available for eMMC chip?
What are main differences of eMMC parallel vs SDIO interface?

I got some additional information from below link.
https://superuser.com/questions/594357/ssd-sd-emmc-raw-nand-what-are-the-differences


texts: Microchip XC8: multi-byte assignment with reverse endian

texts:
Most, if not all, chips targeted by XC8 process one byte at a time.  To assign a value from one multi-byte variable to another, it has to load the first 8 bits from the source into WREG and store them into the first 8 bits of the destination and then do that again with the next 8 bits.  At the assembly level, this makes it trivial to adjust the endianness at the same time simply by reordering the load instructions or the store instructions (but not both).

But I can't seem to make XC8 do that.  I've tried various combinations of shifting by 8, or'ing components, and'ing with masks, etc., and the smallest assembly code I can get comes from a straight assignment followed by an xor swap:

union
{
    unsigned int i;
    struct
    {
        unsigned char lo;
        unsigned char hi;
    };
} address;

    address.i = Packet->dest_addr;
    address.hi ^= address.lo;   //xor swap: valA ^ valB = diff (bitwise difference, not arithmetic)
    address.lo ^= address.hi;   //xor swap: valA ^ diff = valB
    address.hi ^= address.lo;   //xor swap: valB ^ diff = valA

I would think that the pointer source would help or make no difference, depending on whether it took advantage of the pointer inc/decrement instructions, but it insists on recalculating the pointer for each byte except for a direct assignment like this.

Am I missing something?

(I included the hi-tech tag because XC8 is descended from Hi-Tech after Microchip bought it.  Maybe there's an old trick from there that still works?)


texts: Modifying USB 2.0 Hub to use an upstream Type C connector won't communicate Data

texts:
I have taken a cheap Amazon Basics USB 2.0 Hub and have started soldering wires on it with a USB C plug breakout I bought from Pololu

I soldered the Vbus, Gnd, D+ and D- respectively from the USB C to where the Upstream USB A is on the hub and while the power is working fine, the Data pins don't seem to communicate effectively. I think this has to do with the fact of using a random wire to do this which might not be impedance matched (or something along those lines) but I have no idea how to debug this and solve the problem.

I am not trying to plug both the A Male and the C at the same time, just left them there both for testing. The A male plug still works fine but my C plug won't transmit data correctly. I already checked if based on the sloppy soldering anything was shorted and all connections are good.

While what I want is for this to work, I also don't know how to debug this so any help or hints into what to try to find the issue and fix it is greatly appreciated.

simulate this circuit – Schematic created using CircuitLab


texts: Connection of LAN8742A nRST pin causes failure when ESD strike

texts:
My circuit uses LAN8742A ethernet phy. The system has a metal case and gets 220V AC to power supply board. After converting 5V DC it goes to my board that has Ethernet and mcu. I screwed case and power supply pcbs earth point to mains earth. ethernet phy nrst pin connected to mcu nrst pin and 1 capacitor and 1 extra pull up resistor for guarantee. When i hit the ESD to metal case system fails. I found the problem point that is nrst connection. Not EMI but RFI affects it. When i cut the connection of ethernet nrst pin between mcu nrst pin. (ethernet nrst pin can float cause it has internal pull up) system works fine. My tries to solve:

changed capacitor value(inc&decr) ✘
changed resistor value(inc&decr) ✘
removed capacitor ✘
removed resistor ✘
changed capacitor to TVS(uni&bi) ✘
added TVS to power input ✘
increased power input capacitor ✘
all combination of theese ✘

Apparently I will remove this connection on next revision of pcb. I dont have to connect ethernet nrst pin but i wonder what is the reason of this situation?
My circuit scheamatics are:


texts: Draw a finite state machine for a welding machine

texts:
I am trying to draw a fsm for a welding machine. So far I have the following table, which I think is right..
The system has three normal states: stopped, started, and welding. It will only transition from stopped to started when the power button is pressed, and from started to welding when the weld button is pressed, then from weld to stopped when the power button is pressed again. The system only has a single output: a signal called fail, which is set to a 1 if there is an incorrect sequence of button presses. Adding a failed state makes the system easy to implement as a Moore machine. The state transition table would look something like:

Following that description can anyone help me with the design please? It has been a long time since I did something very similar.


texts: Switch high frequency AC on/off at zero crossing

texts:
I have a 3 phase generator which is powering some system. (50Vrms @3A, with variable frequency from 50-5KHz).

I've used mechanical relays to control each phase to the load. However, there was no real protection on the contact side, and I would imagine that the repetitive on/off over time is eating away at the contacts due to arcing. I've had to add some thermystors to control the inrush current as well in the past.

What I would like to do, is replace the mechanical relay with an SSR or non mechanical part, that would allow me to allow the outputs to go to their loads, at or near the zero crossing point to control inrush.

The problem I am facing is, the frequency of operation. I was looking into SSRs with built in zero crossing, however, they appear to be tailored for the common house hold mains frequency ranges. I considered Triacs as well, and from the few data sheets I've seen, they do have a relatively low frequency of operation as well.

What are component or components can I use, that will allow me to switch on/off at near zero ?


texts: "two bypass/decoupling capacitors" rule?

texts: I found many discussions on bypass capacitors and their purpose. Usually, they come as a pair of 0.1uF and 10uF. Why does it have to be a pair? Does anyone have a good reference to a paper or an article, or could provide a good explanation? I wish to get a little theory on why TWO and the purpose of EACH.


texts: How to find the closed loop transfer function of the LT1619 current mode controller

texts:
I am trying to figure out what would be the closed loop transfer function of the LT1619 controller. This is the first step I want to make in order to design the feedback loop.

What I already know about the subject

-I know to work with poles and zeroes, right half plane zero, etc.
-I understand how current mode control works (but not at a very deep level)
-I know to draw the asymptotes of impedances

What I know about my problem
-The circuit: power stage+controller setup

-The transfer function is \$T(s)=G_{cv}(s)K(s)A(s)\$ where \$K(s)\$ is the transfer function of the voltage divider formed by \$R_3\$ and \$R_4\$, a function which I think doesn't influence the loop since I didn't add any capacitors, \$A(s)\$ which is the compensator function and \$G_{cv}(s)\$ is the control to output transfer function, influenced by the power stage. I know \$A(s)\$ (with the help of this document) and \$K(s)\$, but I don't know \$G_{cv}(s)\$. This document gives some examples, but I don't know how to work with them to obtain an answer. My circuit is different than what is shown there.

The actual question is how do I obtain the control to output transfer function for the given controller (\$\frac{V_o}{V_c}\$)? I wonder how does an engineer figure out the frequency response of the chip he/she chooses as I believe that is a very important detail.


texts: How can I make a durable connection between a PCB and outside of case?

texts: How would one go about connecting an LED or a sensor to a printed circuit board? You could use a male header pin and a dupont cable, but that seems like it would easily be able to slip out. Is there any standard solution to this problem? Soldering is out of the question because anyone should be able to connect the wire without having to have any special skill.


texts: Is there some free online circuit simulator where I can see see the electrons fluxing,imitating real-life circuitry?


texts: Get the frequency of a three phase voltage without a PLL?

texts:
I would like to get the phase and therefore the frequency of a three phase voltage, and with using a simple transformation (Clarke). so I get a stationary alpha - beta voltages. Then I will use an atan function to get the phase, but the problem is how can I see if I am treating a sine or a cosine voltage. I mean the problem of initial phase must be obtained. Is there any idea to get this synchronisation without the use of zero crossing detection.

Thank you.


texts:
Some many years ago my teacher taught us to program Xilinx Spartan II development board. He taught us to think of the hardware element we wanted to invoke (logic gate, adder, shift register, etc) and then check the Xilinx XTS manual for the Verilog code pattern that implements that hardware (In Chapter 2 of the manual: XST HDL Coding Techniques).

Now, moving to Altera and following several tutorials and guidelines I don't find mentions of code patterns. Everything is coded based on what behavior you want, almost like coding C, without an awareness of what hardware behavior you're invoking, which is exactly what my teacher taught us we shouldn't do.

So, this leaves me with a few questions: Does Altera provide code patterns for Quartus II (I have a Cyclone II devel board), like Xilinx does with XTS? What is the most advised design technique?


texts: Problem with EUSART pic16F18877 in async mode

texts:
I am trying to set up a communication with the EUSART of the pic16F18877 but sofar no succes. After receiving some comments I made some changes to the RxChar() function.

From the computer I am sending 0xFE05 to the controller by means of a usb to ttl interface (USB To RS232 TTL PL2303HX). A serial monitor in between shows no errors. The send char is going out correctly. On the micro controller side I keep receiving frame errors time after time.

Still trying to make the EUSART working. Sofar without succes. To find out where the problem comes from I returned to the Original hex file (code in basic) to reduce the possible error sources. The Original program is written for the pic16F887A and after programming the PIC16F877A the serial communication operates correctly. The serial communication for the PIC16F877A must be in a library since I can not find it in the basic code. Only the port and baud definitions are given.

This above makes me believe that the problem must be somewhere in the settings or code of my project with the PIC16F18877. But sofar I have no clue. Any assistance in how to proceed is welcome.

fosc = 20.000000
void UART_Init(void)
{

    RC1STAbits.SPEN = 0;     // begin of setup disable serial port.
    // transmitter
    TX1STAbits.TXEN     = 1;    // continues transmit enable bit
    TX1STAbits.TX9      = 0;    // 8 bit transmission
    TX1STAbits.SYNC = 0;        // asynchronous operation
    ANSELCbits.ANSC6    = 0;    // digital
    TRISCbits.TRISC6    = 0;    // output

    // receiver
    RC1STAbits.CREN    = 1;   // continues receive enable bit
    RC1STAbits.RX9     = 0;
    // there is only one sync
    ANSELCbits.ANSC7   = 0;   // digital
    TRISCbits.TRISC7   = 1;   // input

    // baudrate.
    TX1STAbits.BRGH    = 1;
    BAUD1CONbits.BRG16 = 1;
    SPBRG = 520;               // baudrate 9600

    RC1STAbits.SPEN   = 1;     // end of setup enable serial port
}

void UART_TxChar(uchar ch)
{
     while(TXIF==0);
     TXREG=ch;
}

uchar UART_RxChar()
{
    uchar Discard;
    while(1){
        while(RCIF==0);       // Wait till the data is received
        if (RCSTAbits.FERR)
        {
            Discard = RCREG;   Read the register and wait for the next byte
            break;
        }
        if (RCSTAbits.OERR)
        {
            RCSTAbits.CREN = 0;
            break;
        }
        return RCREG;   // Return the received data to calling function
    }
}


texts: Appropriate model of an unknown sonar piezo

texts:
I have a collection of piezoelectric transducers that I have got from old devices.

No print stamp on them, and I couldn't get a schematic of the device that could help me to find a datasheet. I wonder if I could find the model through this procedure:

The idea is basically exciting the piezo with a known electrical signal (sine) and measuring the current and voltage in the load. By taking note of the voltage in the shunt resistor I get the current amplitude and phase.

I could say that the piezo impedance equals R+jX, where X is the reactive component.

Is there any pitfall in this idea that I should be aware of? This is the first time I try to model this piezo.

EDIT: i want the model to build a matching network
EDIT:  The piezos I know, usually work at a simple frequency,so I think that I just need to sample at the same frequency (no freq sweep).


texts:
Has many of you acquired used parts (motors, expensive IC chips, sensors, actuators, etc.) from the dumpsters, recycling, or trash and used them for your projects? How did you feel benefited from such choices, on top of saving the environment, despite the challenges of finding the true specifications?

Thanks in advance for the feedback!


texts: What does it mean if my voltage regulator is acting as a wire?

texts: When i connect 24V to my input pin, and connect ground pin to my Ground, it gives a short circuit at the bench power supply. What does this mean? Did i kill my voltage regulator?


texts: Buck/Boost Regulator Problems (TPS63070)

texts:
Questions:

1.) Why do input voltages of 9v and higher cause the regulator to output voltages in the range of 1.2v to 2.0v instead of the configured 3.4v if a load is connected to the output when 9v is applied?  If no load is connected to the output when 9v is applied, the output voltage is the correct 3.4v, and the load can then be applied to the output without issues.  The load draws 240mA @ 3.4v.  This problem does not occur with a 5v input voltage.  I have used two different 9v PSUs and have also built out two test boards which only contain the components shown in the attached schematic.  Same result regardless of what combo I use.

2.) What does the "Qty=2" mean next to the single caps in green squares in the schematic below?

Details:

I have a PCB which can accept a range of input voltages typically between 3v and 12v.  I designed the PCB to use a TPS63070RNMR.  My power circuit is laid out exactly as it is shown in TI's Webench Power Designer's schematic as seen below with the following exceptions:

1.) The positive wire out of Vin immediately goes into a CFSH05-20L diode.

2.) For the cap on the far left of the pic, I'm using a 33uF cap (C4532X7R1C336M250KC, good to 16v) because several months ago when I was laying my board out that is what Webench said to use.  Not sure why it recommends something different now.

In the schematic I have placed a green square around the far left cap and the far right cap.  I'm confused by the picture because it shows a single cap in each instance, but the note next to the cap reads "Qty=2".  Not sure if TI ran out of black pixels and couldn't draw another cap in there, but it leaves me wondering if a second cap is really needed.  Webench is recommending a C2012X5R1V226M125AC for the 22uF cap on the far left which is rated for 35v and a GRM31CR61A476KE15L for the 47uF cap on the far right which is rated for 10v.

You will notice that PS_SYNC is connected directly to Vin in the schematic, and my PCB is set up the same way.  Troubleshooting my problem today I did read in section 8.4.5 that it is not recommended to connect PS_SYNC directly to Vin.  As of right now though, that is how my PCB is laid out (thanks TI), but I have manually also manually modified the PCB to share the EN resistor as is mentioned in the datasheet.  This change didn't fix my problem.

I have tried increasing and decreasing the capacitance of both the caps in the green boxes in the schematic with no success.

Any guidance would be appreciated.

Update:

Looking at section 11.2 it looks like I have made a few layout mistakes.  This is my first time dealing with a switching regulator and I didn't realize how important placement of the input caps, output caps, and inductor were.  According to Five steps to a great PCB layout for a
step-down converter produced by TI, placement of the input cap is the most important aspect of a proper switching regulator layout.  Unfortunately, mine is about 1" away from my regulator.  I don't know if that is causing my issue, but it sure can't be helping things.  If anyone has had experience with a poorly laid out regulator before I would love to hear if you think that input cap placement could be my problem.  I plan on fixing my design error, but I would like to be a little more sure poor placement is causing my problems before getting more PCBs made.


texts:
I have seen many relays with same current and voltage rating (like 10A 230VAC or 5A 30V ) but the coil rating (I am not sure, I am using the right word) are different. Some are 5V some are 12V and so on.. .
What I want to know is, why there's difference is in this value? Do it have something to do with the force with which switching contact are touched and released?


texts: 3 Way flip flop between LEDs with 555 timer

texts:
I'm a beginner working on a project which requires flashing high power LEDs, they will be supplied by a battery and flash at a frequency with a 555 timer. However, because I would like the battery to last longer I need to alternate between 3 LEDs with each output of the timer. Currently I have the 555 timer flashing a single LED but I was unsure of how to proceed with alternating between 3 LEDs.

Any help would be appreciated, thanks.


texts: Can I an RS422 interface to Arduino's serial pins?

texts:
I have a custom-designed circuit that communicates to and from the external world through an RS422 interface. I wish to communicate with it with an Arduino, preferably UNO. The RS422, much like the RS485, uses two lines for both the receive and transmit lines (one positive, one negative). From what I can find on the net, RS422 uses 0-5V digital communication, which is the same as the Arduino serial pins, right?

Can I use one of the lines, the positive (?), for both the TX and RX of the RS422 interface and connect them to pins 0 and 1 of the Arduino? Or would I have to connect to the USB plug of the Arduino?

UPDATE

The problem I'm facing is I already have a custom-designed Arduino shield that sends and received serial data, and I completely forgot about the RS422 interface. I can easily sort out the multiple devices on one UART bus in software, but I wasn't sure whether you could simply plug one of the differentials of the TX/RX of an RS422 to the Serial pins, or not.


texts: Constant Sum Voltage Divider With Thermistor/Temp Sensor

texts:
I need a circuit with a thermistor/temp sensor that will essentially emulate a pot.  In other words, I need a voltage divider that varies with the resistance of the thermistor/sensor, but keeps the sum of R1 and R2 constant.  (Used to vary duty cycle with 555 timer PWM circuit.

I have a 10k thermistor, a tmp36 (though my supply voltage is 12, so that probably won't work) and an ad592, so if one of those worked it would be great.


texts: How does current flow in this path when all points are at the same potential?

texts:
If the potentials at points A,B,C .. etc are at the same potential as the battery wrt the ground, how does current flow then?

I'm lacking something fundamentally so it would be helpful if someone could correct my mistake.

Also where exactly does the voltage drop occur(from 12V to voltage across the bulb)? Does it occur immediately when the bulb's terminals come in contact with the wire or does the 12V gradually decrease till it reaches the voltage of the bulb?

Moreover, if I were to measure the voltage at any point in the return path (after the bulb) how would I measure that? What would be my "ground" or "reference to measure the voltage against" in this case?


texts: NiMH battery charger using discrete elements

texts:
Below is a schematic of NiMh battery charger that must automatically switch off charging current when battery is fully charged.

I am aware that the main part of this scheme is current source, build on transistor Q2, resistor R2 (that sets charging current) and battery (as a load).

What I do not understand is how these circuit detects at what voltage level on battery to switch itself off? What happens after switch S1 is switched on? What voltage levels are then present on OP AMP inputs? What is the role of elements D6, R8, R7, C2 here?


texts: LSM9DS1 accelerometer with too many aux pins. Which ones are actually useful?

texts:
I'm designign a board with an LSM9DS1. I have an SPI bus (with only this device connected), two gpio for the chip selects (it has two CS, one for gyro and accel and the other for the magnetometer. Weird things happen at ST microelectonics? It has also a separate MISO for the magnetometer, but i guess i can tie them together. At least that's what i saw on the internet. Correct me if i'm wrong)

So now i have a lot of interrupt and enable pin left to be connected, for which the datasheet says too little/nothing. Beeing:

INT1_A/G: Accelerometer and gyroscope interrupt 1
INT2_A/G:  Accelerometer and gyroscope interrupt 2
DEN_A/G: Accelerometer and gyroscope data enable
DRDY_M: Magnetic sensor data ready
INT_M: Magnetic sensor interrupt

I have only two pins left on my MCU, and i can't wrap my head around, looking only into the datasheet, which ones do i need, which ones can i tie to VCC/GND and which ones are only for specific applications.

Can someone, who has already used it, or can make a sense off what's written on the DS, help me in chosing which pins to keep?


texts: Lower than 0.7-0.6V voltage drop on sillicon diodes

texts:
I am trying to understand how voltage drop happens. From what I know, there should be about 0.7-0.6V drop across a silicon diode. This is exactly what happens when I remove the LED from this circuit. However, when LED is connected, each diode has about 0.2V drop. And the current across diodes is 10.7nA. I did this to see what the voltage would be on the node between R1 and LED. Let's call this NODE-1.

I considered 2 possibilities, first was having 1.6V on NODE-1 (which is what happened) and no voltage drop across each diode, meaning no current flow on them since 1.6V is not enough to forward bias every single diode. Second possibility was having about 6.3V-5.4V on NODE-1, enough voltage to supply 0.7-0.6 voltage drop for every single diode. In this case, since the drop across R1 is lower, meaning less current, the LED would be dimmer.

So my question is, why does the power supply only "consider" the 1.6V drop across the LED and sends current accordingly, instead of "considering" the 6.3V-5.4V drop across diodes? (which is what happens when you take the LED out of the circuit the circuit)


texts:
I have completed my customized Arduino schematics using KiCad. I have been using MCP2200 for usb-to-uart conversion. After completing it, i was having a look at Arduino Uno Schematics available at Arduino website. I have following questions:

Arduino uno has used resistor of 1K in between TX/RX pins of ATMEGA8U2-MU and Atmega328. I am not quite sure why they have been used? To limit the current when Arduino TX/RX pins are used as GPIO?
I want to power my board from USB power. I am using capacitor of 10uF to remove noise. Is it a right way to do? Although, i am having a regulator LM1117-3.3 and it's output is being connected to a pin. It is there to power other off-board modules and hence, i am not using it for on-board components.

If you find any other problem with my schematics or layout, please mention them in your comments/answers.


texts: Will 16-20 1.5 volt serially connected led lights tolerate 12volt energizer battery source?

texts:
I am doing a little project with 1.5volt led lights. I want to buy 16-20 1.5volt led lights and connect them serially and need advice on power source.

If I connect these serially connected led lights to a 12volt energizer battery will the lights tolerate this amount of electricity or do I need a resistor for this circuit?


texts: How do I read the data sheet for a gate driver to determine the total output current?

texts:
I am planning on using the ISL55110 gate driver and I am confused with what the total output current is since the driver is dual channel. The data sheet says that the output current is 3.5A. Does this mean that the output for each channel is 3.5A and if I tie the two channels I should get a total of 7A? Or does the 3.5A refer to the output from both channels?

The datasheet can be found here: https://www.renesas.com/us/en/www/doc/datasheet/isl55110-11.pdf
Additionally, if my switching device needs 6.4A at the gate, is it better to connect the output of two separate gate drivers (total of 3.5*4 = 14A) or can I use the single gate driver?


texts:
I have a question please about sparks used in the early history of radio.  I have read the similar questions but I still need your help please.
I have learned from sources such as https://neurophysics.ucsd.edu/courses/physics_1b/SerwayCP7_Ch21.pdf and http://www.arrl.org/files/file/History/History%20of%20QST%20Volume%201%20-%20Technology/Kennedy%20N4GG.pdf that AC, whether in wire or spark, creates EM waves.  This is because in AC the electrons are constantly accelerating and decelerating, and acceleration of a charged particle is required to generate EM waves.
I am using 2 HV generators to generate sparks and a neon bulb to test for presence of EM waves.
(1) The first generator is a small enclosed plastic cylinder. I give it 5VDC input with low amps. I couldn't find specs for output except it claims to generate 400KV output which I doubt. This generator continually produces an intermittent spark which causes the neon bulb to flash in sync.
(2) The second generator is a ZVS flyback transformer ("12v-36V Zero Voltage Switching(ZVS) Tesla Coil Flyback Driver Circuit").  I give it 24VDC at 10A.  This generator continuously produces a solid spark which causes the neon bulb to stay lit continuously.  The specs for this generator state that it generates "High voltage direct current output, voltage input voltage of about 1000 times."
If this is true then it seems to be that the DC spark is creating EM waves, which does not make sense to me. How is the neon bulb lighting up?


texts: High-current capable, high precision sine wave

texts:
I'm actually asking 2 questions - one about sine wave generation and another about high rate / precision voltage measurement.

I'm working on a project where we have to generate a sine wave on top of a DC bias - say, 3.2V with a +/- .1V amplitude sine wave - for the purposes of EIS.  Because we will be measuring low impedance devices, a small voltage difference can result in a large current, so just generating the signal is not enough, it has to be able to deliver fairly high current (~4 amps max) .  Right now, we are doing low-side N-type FET control with a PWM sine wave generated by an arduino or a C2000 TI board, with a low-pass filter on the high side of the circuit.  The results are alright, but the low-side FET control causes a fair amount of noise.  Would this be improved by physically hiding the FET behind the filter and doing high-side control?

So far, we are generating a sine wave that reduces in resolution as the frequency increases, but it should be able to generate between 1 Hz and 50 kHz.  The sampling rate has quickly become the bottleneck, as measurements taken with the 10-bit adc on the arduino are next to useless, so we are using an external ADC, which is limited to about 400hz sampling rate.  Are there any recommendations for a faster, less noisy ADC than the ADS1115?

Is this a decent approach to the sine wave generation, or would using another form of generation and then maybe using an op-amp give better results?  Our THD right now is around 10% with a .1 ohm load at low frequency, and we would like to get that as close to 0 as possible.  Any advice would be greatly appreciated.


texts:
I've seen various schematics which feature a low-pass LC filter at the output of a inverter intended for a UPS or a Class D Amplifier. With a Class D Amplifier the load is somewhat predictable (i.e. an 8 Ohm speaker etc) and therefore one can take that into account when designing the filter.

However, with a sine-wave UPS the load can be quite variable and this would change the response of the LC filter, wouldn't it? If so, how can the designer mitigate the effects of a changing load at the output of the inverter?


texts: how to build a circuit that compares two potentials?

texts:
I want to build a circuit that compares two potentials, in principle, it works like so:

basicly, the circuit gets 3 intputs, p1, p2 and input, and has one output, output.
the potential of p1 would be, p1 and the potential of p2 would be, p2. when p1 and p2 are not equal, output's potential is 0, which means, no potential. when p1 and p2 are equal, input and output are "connected" and output's potential equals to input's potential.
but if p1 and p2 are suddnly not equal (after they were equal, which means that input and output are "connected") input and output will still be connected, up until input's potential turns into 0.
(if its more comfortable, i wouldn't mind adding a four'th input that would "disconnect" input and output. for example whenever it has a certain potential, input and output will be "disconnected")

EDIT: Some information:
input's volt is 5V. the potentials vary based on the resistance the wires go through when they connect the p1 and p2 inputs, the resistance comes from a simple photo cells.


texts: Microcontroller and FPGA Manufacturing Process Technology and Size

texts:
I'm comparing the power consumption of several microcontrollers, FPGAs and an ASIC I've developed, which all perform the same task. For a fair comparison the current consumption must be scaled due to differing manufacturing process technology, especially the process node (micrometer or nanometer, number of metal layers, which metal).

I'm looking for information on the following devices:

MSP430F1232
MSP430F2232
MSP430F5418A
PIC16LF727-I/PT
ATmega88PA-AU
Virtex 4 FX XC4VFX20
Zynq XC7Z020CLG484-1

Unfortunately I couldn't find any reliable information in the datasheets and also not with extensive web search. At Microcontrollers Manufacturing Process I found the overview information that Microchip uses 0.25-1.2um, but nothing specific. Further, I found that Virtex 4 FPGAs were manufactured in a 90nm process and Zynq (and the other series 7 FPGAs) in 28nm.

Additionally I'm comparing reconfigurable logic size and amount of configuration data. Therefore I'm searching information on the area of a CLB on the FPGA chip. For example, with a die photograph the size could be estimated.

To compare the amount of configuration data I'm currently using the size of a configuration bitstream file, subtract estimated numbers for IOs, Block RAMs, DCMs, ..., and divide by the number of CLBs. However, this is quite imprecise (also because the bitstream files are not just data but basically specify configuration commands with argument). Therefore I'm interested in the number of configuration bits per CLB (or similar unit) of the above mentioned FPGAs. One thing I've found so far is that the Lattice iCE40 FPGAs use 864 bits per tile (which contains 8 LUTs) (see the reverse engineering project by my colleague at http://www.clifford.at/icestorm/).

Clearly, my question is not related to textbooks or engineering basics but highly specific. I'm hoping that someone in this noble community accidentally came across any of the above information or is himself an employee of the companies and has access to such information or can point me to the proper documents.

Addition 1: Atmel replied that the ATmega88PA is 250nm. The 'A' at the end denotes the "newer" process. Chips without that 'A' are in an older 350nm process. Thanks!

Addition 2: For the following FPGAs I found the process nodes: Virtex: 220nm, Virtex-E: 180nm, Virtex-II: 150nm, Virtex-II Pro: 130nm, Virtex 4: 90nm (300mm copper wafer), 7 Series: 28nm

Addition 3: For Virtex (first version) XAPP151 leads to 864 bits/CLB (which contains 4 4-LUT+D-FFs). For the Virtex 4 I've estimated 2719 Bits/CLB (which contains 8 4-LUT+D-FFs). For the 7 Series I've estimated 4085 Bits/CLB (which contains 8 6-LUTs + 16 D-FFs).

Addition 4: For the Virtex-E I found an estimation of 35462um²/CLB  @ 180nm in a paper (however I don't know whether this number is only related to the papers own work). For the 7 Series I estimated 3790um²/CLB @ 28nm. For the iCE65 I found 1750um²/LUT+D-FF.


texts:
I'm trying to design a constant current LED driver and am totally confused!

This is the schematic i end up with:

simulate this circuit – Schematic created using CircuitLab

What's the formula for calculating R1?
What's the formula to calculate the required low-pass filter
capacitor?
Is this how we calculate the current: output current = Vref / R2?
How reference voltage affects the circuit (decreasing Vref to 2.5V)?


texts: Who is the manufacturer of this DIP and is there any datasheet or documentation for it? Top marking FD633D 1230

texts:
Here is the DIP I have:

FD633D 1230
I've tried to search for it and the only good result I get is this for sale at E-Bay and AliExpress and the page has no details regarding it. I tried contacting the seller but they don't have any datasheet.
Any help is appreciated.
Edit 1: It was from a Chinese seller so it might be a Chinese manufacturer. Also this same thing was being sold by several other sellers with different brand names, but same logo on the chip.


texts: Loading firmware via JTAG without soldering on headers every time?

texts:
Is there a good way to load firmware onto a PCB that has a 2x5 arrangement of JTAG headers that doesn't involve soldering on pins every time?

I tried getting come pogo pins in the hopes of being able to jam them into an IDC cable (which the website I bought it from suggested doing), but the pins are clearly larger than the holes they're supposedly supposed to go into.

I can't just touch it with wires, because the connection won't be electrically solid (which is what the pogo pins were for), but I can't think of a better way around this.


texts: What are the advantages and disadvantages of using signal diodes instead of resistors?

texts:
In the past to create voltage dividers or protect against back emf I have used resistors, but reading about signal diodes those situations are given as examples. I can't really comment on the inductor example because I have never used one but I am familiar with MOSFETs.

So I was wondering what are the advantages of using signal diodes instead of resistors.

These are the examples I have seen:

Images from signal diode tutorial here!


texts:
Sorry for such a question.
I am not very dexterous and have no experience in soldering.
I have purchased some momentary buttons.
Some are already pre-soldered (both ends). The other others are just soldered to the button. The other end I need to solder onto some pins form my Raspberry Pi. Are there any 'adaptors/plugs' that  I can push the wire into and the other end plug over my pins.
This is what I purchased:

Total newbie so please forgive me.
Thanks


texts: RF Transmitter Impedance - Looking from the Transmission Line

texts: If an RF transmitter is designed to transmit into a 50 Ohm load, is the impedance of the transmitter, when looking from the load towards the transmitter, always 50 Ohms?


texts: Calculated vs Rated Currents in Designing Transistor Switch Circuits

texts:
I am designing a circuit that drives a relay. I  control the behavior of this circuit by using a BJT transistor that receives a DC signal from a micro controller.

Here is my schematic:

simulate this circuit – Schematic created using CircuitLab

So, I did the schematic and I want to predict current values such as Ic and Ib. Note that I want the transistor to operate in the saturation mode.

My questions that I need help with:

1- From where do I begin? Do I begin with Ic and then I go find Ib? or the opposite? or with Vce(sat)? or with the gain?
Indeed, I chose to begin with Ic but I wanted to convince my self of my choice. Like why not Ib? Anyways, I am forced with one value of Ic, which is the coil current. It is 16.67 mA.

2- If I begin with Ic, and then I find Ib, I will face a potential contradiction. If the microcontroller is supplying 40 mA, would not that be Ib? So, why would I need to calculate Ib from Ic if I know it already?
Note that my gain is roughly 100 given that my Vce(sat) is around .1 volts.

So, here is my main big question: which to choose, the rated current (40 mA) or the calculated one (.1 mA) for Ib?

3- I can ask a similar question if I would begin my analysis to with Ib. Which to choose for Ic? the rated (16.67 mA) or the calculated (4 A)*?

Although 4 A will destroy my coil and therefore it is impossible for it to be chosen, which in turn leaves no basis for me to ask the question in the first place, [for the sake of "knowing more"]let us look at the Rated vs Calculated concern as a theoretical question without worrying about the practical sense of it.

4- If I am supposed to choose the calculated Ib, what is the advantage of knowing that the microcontroller is supplying 40 mA and how would this affect the value of the Rb (R1 in the schematic)?

Update: Relay datasheet is this


texts:
Is there anyone there that has knowledge if such IC exist? i search in the internet for years like on distributors etc but somehow I can't see any (maybe i don't know the right term or keyword for it to pop-up on search engines).

Only 1 decoder i know that has many output combination and that'll be the decoder for 7 segment only. The rest decoders have only 1 output (e.g 3 to 8 decoder, 1 output H/L and 7 output opposite on the former).

i somehow want to have a decoder flexible enough let's say a 2 to 4 decoder where it can have output combination of:

LLLL
HLLL
HHLL
HHHL
HHHH
LHHH
LLHH
LLLH
HLHL
HLHH
HHLH
LHLL
LLHL

as i said, all decoders i had searched out (even not dmx-based) have the combination output of only this:

LHHH
HLHH
HHLH
HHHL

or vice versa.

Aside from shift register, what else could do this kind of combination output that is a decoder and what exactly the term used for these kind of decoders.


texts: Transfer Function of a second order system

texts: Given the system, how do you find its transfer function? It has more questions after but what i just really need is the transfer function. I'm confused as to how to deal ones with motors.


texts: What is meant when a diode is said to be forward biased?

texts:
I have this circuit:

I am giving an input voltage from 0V to 40V shown at the input of the circuit.
When I give 1V at the input, I get the voltage values as such shown below (measured with multimeter and oscilloscope):

0.18V is dropped across D0002 and 0.8V is dropped across the 36V zener diode and the remaining 20mV is dropped across the remaining 2 resistors.
I tried the above circuit in simulator tool as well. I am getting similar results. The current through the components is only the reverse leakage current of the zener diode which is in the range of 10s of microamps.
My Questions :

My understanding was that when I apply 1V at the input of the circuit, 0.7V would be dropped across D0002 and the remaining 0.3V will be dropped across the other components because diode requires a minimum of 0.7V to conduct. So, when voltage of above 0.7V is applied at the input, the diode conducts and 0.7V will be dropped across the D0002 diode right?

But in my above scenario, why is the voltage across the diode D00002 only 0.18V and D00003 is 0.8V?

This also brings the question - What does it mean when one says, the diode is forward biased? Once forward biased, the diode should have 0.6V-0.7V voltage drop across it, right? Or what is it that I am misunderstanding?

Please help with the above questions.


texts: Inverter with two diodes 1N4934 and Zener diode?

texts: Why author of this circuit used two diodes 1N4934 and Zener diode 35V?


texts: Adding Darlington transistor in parallele to increase current does not work

texts:
I have a circuit that must provide PWM to a motor which is expansive in current (around 1.2 A for 4.5V). For the moment I use 100% duty, but I cannot reach the same efficiency as the one I get when I plug the motor directly on the batteries (3x1.5V = 4.5V).

The circuit I used firstly is this one :

+12V ---------+---------+
              |         |
             / \        |
             |M| motor ---  1N4001
             \ /       / \
              |         |
              +---------+
              |
            |/
CTL -/\/\/--|    2N2222 NPN
      1k    |\>
              |
             ---
              -

but then I cannot reach enough voltage so I made a Darlington transistor :

and I replaced the transistor of the first picture by this one. But the current was still under what I wanted (around 0.6A while I want 1.2A), so I tried to put two Darlington transistors in parallel :

+12V ---------+---------+
              |         |
             / \        |
             |M| motor ---  1N4001
             \ /       / \
              |         |
              +---------+-----------+
              |                     |
            |/                    |/
CTL -/\/\/--|         CTL -/\/\/--|    <-- Darlington
      1k    |\>             1k    |\>
              |                     |
             ---                   ---
              -                     -

(each "transistor" here is made with two 2N2222A transistors)

But the current stays at around 0.3-0.6A... Why the current isn't added to provide me 1.2A, but stays at the same level as before ? Is their any other way to proceed to reach 1.2A with 2N2222A transistors ?

Thank you in advance.


texts:
I had a colleague design a board for pH sensor amplification based on schematic (fig 1)and spec in a paper. The paper recommends using the spec noted in figure 3. It uses a guard ring to reduce surface leakage. He used the ground plane as the guard ring (see figure 2). Was wondering if this seems like it would be correct/work

Schematic

Guard ring implementation with ground ring

Guard ring specification


texts:
Please take this vacuum pump datasheet for the circuit I am planing to build.
Vacuum pump datasheet

I like to make a simple motor driver preferably using an SMD type MOSFET.

I am struggling to choose a suitable MOSFET. So far, I have come across with FDN327N. Since the pump motor has nominal 250mA current and the motor won't be running continuously but intermittently, I believe it should do it.

Note that: 5V supply (from Voltage Booster) will be used for both MCU and the motor.

Here is a sample schematic I am willing to follow;

Would that MOSFET do the job?
I couldn't be sure  if voltage drop on MOSFET might be an issue for feeding 5V motor with 5V power supply?
How can I calculate Rin and Rgs?

Any input greatly appreciated.


texts: Should the ground plane of a noisy mezzanine card be connected to the ground plane of the main card by metal mounting hardware?

texts:
I have a mezzanine card, 60 by 40 mm, mounted near one end of a main PCB, about 160 by 40 mm.  This card is a known source of EMI problems and, in fact, has a metal shield over it.  But, I suspect that it is injecting EMI into the main PCB and it is radiating from there.

There is a single power/signal connector from the mezzanine card to the main PCB with two ground pins.  These are connected to the main card ground plane via thermal reliefs.  The card also has four mounting holes, plated through and continuous with its ground plane.  These are used to mount the metal shield using metal hardware, but they are at present electrically isolated from the main PCB ground plane.

My question is: is it good that the main PCB ground plane connects to the mezzanine card only via the two pins in the connector or would it be better to mount the card using metal pillars and have the mounting holes on the main PCB plated through and continuous with the main PCB's ground plane?

There is a second connector between the boards, but it is just to route a signal from the mezzanine card off the board and there are no electrical connections from that connector to ground.

Troublesome emissions are in the range 25 to 300 MHz, some higher.


texts: EEPROM Interface confusion with Address?

texts:
So im researching how to interface with a EEPROM Chip via I2C with an AVR (Still learning a lot of the interfacing).

Anyways, the AT24C16 for instance (or that family of EEPROM) seem pretty popular. I looked at the datasheet and it mostly made sense besides one part:

So I think my confusion lies in tehe "Addresses" of where to write. Or maybe im confusing device address? If I only had 1 eeprom connected....would it just be zero? Im assuming this is just if you had more than one chip on the i2c line?

Anyways lets pretend I have 1, I would need to do these steps from my understanding (correct me if im wrong):

Initialize I2C
Send the Start bit
Send the device address (Which I guess would be 0x00?, this assumed write in R/W is 0 of course since it's the LSB)
Wait for the ACK back from the EEPROM (Would this literally just be a 0 coming back or what?)
Write the word Address (I don't understand how a chip can have 1024 locations for instance if there are 8 bits for a location? the max value for 8 bits is 255?)
Wait for ACK to see if thats a valid address
Send my data until i send stop bit (I assume the EEPROM "knows" to move it to the next address after each data byte? or do you have to update the word address each time?)

Thanks! just a bit confused by the inner workings.


texts: Use of resistors on signal lines of serial to parallel shift register

texts:
I have recently come across a circuit with a serial to parallel shift register(HEF4094B), and Vcc 12V. I could see that resistors are connected in series to the signal pins(OE, STR, DATA, CP).

2.2kΩ to STR
2.2KΩ to DATA
2.2kΩ to CP
1kΩ to OE

I failed to understand the role of resistors here, are they being connected to limit the current ? but, in that case, would those resistors not drop the voltage required by the signal pins.
Please help me understand the role of resistors here.
Thank you in advance.


texts:
I am beginning a project that requires the sensing of a very small current (in the nA range) from a 3000V supply. The application is such that it can only be done on the high side. The data needs to be transmitted via I2C, ultimately, so the voltage drop across the sense resistor needs to be in the range of 5V, but it will be sensed up at the 3000V level. If I float an op-amp up there to amplify the dynamic voltage across the sense resistor, the output is still up in the 3000V range with respect to the system ground, so this needs to be scaled down to 5V. I guess this is the crux of the problem. I've found devices that do this type of thing for the 100V range, but does anyone know of anything that will be able to work with 3000V?

Any suggestions would be greatly appreciated.


texts: Connecting an active low Enable pin IC with a MCU

texts:
It's my first time working with an active low Enable IC and I'm not intuitively understanding the connection.
EN_N pin of the IC has an internal pullup resistance of 1.1Mohm and I'm planning to use STM MCU GPIO to control the EN_N pin.
Since this IC needs to be active most of the time, I want to pull it down normally, and only pull it up when not in use.
So like the attached picture, GPIO1111, which is the GPIO of the MCU, is connected directly to the EN_N pin with a matching resistor of 1.1Mohm.
Is this a correct way of connecting?


texts: Analog input to ATMEGA328P using op-amp - how does this circuit work?

texts:
I was looking for a good solution in order to use a bunch of components and read 0-10V/0-20mA and digital inputs using my Arduino Pro Mini (ATMEGA328P working at 3.3V.)
I've found online this schematic from SferaLabs, the reference board is Iono Arduino, here you can find the entire schematic, and following the interesting section:

I find this schematic really interesting, it seems that, using a single op-amp, is able to manage: a digital input OR 0-10V analog input OR 0-20mA analog input (as reported at page 8 of the board user manual):

Now, I need to know two things:

If I wire 3.3V at BAT54S cathode (red circle in the main photo) and the VLIM of the LM224D, will the circuit work without any issue?
Can anyone help me to understand how this non inverting op-amp was configured in order to work like that?


texts: What gets wrong when I average AC voltage and current to get power?

texts:
Power is half the product of peak AC voltage and current (or product of its RMS voltage and current). But why is it wrong when I average first the voltage and current before getting the power?

I get that the average of AC voltage and current is zero. But what is then the use of the formula:

V(ave) = 2V/pi
       AND
I(ave) = 2I/pi

This is the formula for averaging sinusoidal 360 degree voltage and current, right? Why can't I average the voltage and current to find power?


texts: Handling timer overflow and compare interrupts in ATMega328 (Arduino)

texts:
I'm trying to simulate PMW mode on multiple pins in software by controlling a Timer2.

I'm using maximum prescaler value to get approximately 60 pulses per second when timer counts to its maximum value. Value of OCR2A is used to trigger the actual moment within full timer cycle.
Overflow interrupt is used to set the LED (PIN13) on and compare interrupt is used to reset LED off.

When I run it, I see that LED blinks but very dimly and its brightness is not affected by CUT_OFF value. If I disable LED off in compare interrupt and just toggle LED in overflow I see it blinks at a reasonable rate which match the final report printed to serial port (number of interrupts in 5 sec). Final report also shows that both interrupts are being called correct number of times.

Here's the code that I use:

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

#define LED_PORT (13)

#define CUT_OFF (100)

volatile unsigned long time1 = 0;
volatile unsigned long time2 = 0;

ISR(TIMER2_OVF_vect) {
  PORTB |= 0x20;
  time1++;
}

ISR(TIMER2_COMPA_vect) {
  PORTB &= ~0x20;
  time2+=2;
}

void startTimer() {
  cli();
  // enable timer interrupt overflow + reg a
  TIMSK2 = _BV(OCIE2A) | _BV(TOIE2);
  // counter
  TCNT2  = 0x00;
  // cut off value
  OCR2A  = CUT_OFF;
  // mode - normal + prescaler 1024
  TCCR2A = 0x00;
  TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20);
  // async mode off
  ASSR  &= ~(_BV(AS2) | _BV(EXCLK));
  sei();
}

void stopTimer() {
  cli();
  // disable interrupts
  TIMSK2 = 0x00;
  // mode (disconnect clock source)
  TCCR2A = 0x00;
  TCCR2B = 0x00;
  // async mode off
  ASSR  &= ~((1<<AS2) | (1<<EXCLK));
  sei();
}

void blinkLed(uint8_t times) {
  for(uint8_t i=0;i<times;i++) {
    digitalWrite(LED_PORT, HIGH);
    delay(500);
    digitalWrite(LED_PORT, LOW);
    delay(500);
  }
}

void setup() {
  pinMode(LED_PORT, OUTPUT);
  Serial.begin(9600);
}

unsigned long iterations = 0;

#define MAX_ITERATIONS (1000000)

void loop() {
  blinkLed(3);
  startTimer();
  delay(5000);
  stopTimer();
  blinkLed(2);

  Serial.println("Iterations finished!");
  Serial.print("Timer1=");
  Serial.println(time1);
  Serial.print("Timer2=");
  Serial.println(time2);

  while(1);
}

Is there something wrong with my understanding of when interrupts are called:

COM2A - when we reach CUT_OFF value
OVF when counter reaches 255 and flips to 0

or there's a problem with setting up timer/or handling interrupts?

Update: Could the problem be in digitalWrite() usage in interrupts?
Update2: Changing digitalWrite to direct PORTB bit manipulation produces single flash probably on initial interrupt and subsequent very dim LED so it is not the only problem.

P.S. blinking LED is just a test so using built in PWM is not an option.


texts:
I'm using a Conrad DCF77 to get RTC on Beaglebone Black and wiring it so:

1--> GND |
2--> VCC 3,3 V |
3--> One of the gpios  (P8_11)

To read the Signal of the DCF Antenn I wrote the code:

import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P8_10", GPIO.OUT)
while True:
    new_switch_state = GPIO.input("P8_11")
    print(new_switch_state)

Result is

0
0
0
0
0
0
.
.
.
.

So no signal is read. Could you help ? THX!


texts: Why don't we use capacitors containing multiple kinds of dielectric in a single package?

texts:
I know that it is common in DC regulators to use both a high capacitance electrolytic capacitor and a low capacitance ceramic capacitor in a parallel, in order to maintain sufficent capacitance over a wider frequency range.

Why are not these parts sold in a single package? Presumably a capacitor combining electrolytic and ceramic dielectrics would be a closer approximation to an ideal capacitor.


texts:
I plan to use a CT to measure the current on a resistor whose voltage will be controlled by two SCRs in antiparallel.

The main function of the CT is to detect an overcurrent in the system to proceed to turn off the control over the SRCs.

I think of using two internal comparators of an MCU. These comparators are useful to evaluate that the current doesn't exceed a maximum and a minimum established.

In the following figure I1 is the current of the secondary and with the help of R3 generates a voltage. While the current is within a range, the outputs of the comparators will remain at 0 volts.

simulate this circuit – Schematic created using CircuitLab

Vmax and Vmin are obtained with voltage dividers.

Is there a better way to do it?

Any comments or suggestions are welcome.


texts: How to use a phototriac coupler to trigger the main triac?

texts:
I have in my box of parts a phototriac coupler, namely a Sharp PC3SD21NTZ (datasheet), which is a zero cross type. I don't know how to use it, but I've been meaning to learn for a while.

This part is specifically intended for triggering a main triac in load control applications and "are ideal isolated drivers for medium to high current triacs". Typical application from the datasheet:

When triggering the main triac directly, one would typically have a zero-cross detection circuit which a microcontroller can use as an input to decide when to trigger the triac. However, this part does not appear to offer any way for the microcontroller to detect zero crossing, which leaves me wondering what its purpose is in the first place.

What kind of input would one typically drive onto the diode side when using this part? Is it intended for on/off control only?


texts:
(from http://www.adafruit.com/blog/wp-content/uploads/2009/06/tmp36pinout.jpg)

Have a look at this picture. It's a simple heat sensor. Though it looks like it's really simple, I don't fully understand how the middle pin works.

How can a voltage be applied? I thought it was merely an abstract concept for the difference in potential electrical energy.

And how does it work for this heat sensor in particular?


texts: Is there a special name for stripboard with split tracks?

texts:
A friend of mine showed me a project he was working on, and the stripboard he'd soldered to had its tracks split into 3-hole blocks. A little like this:

=o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o=
=o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o=
=o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o=
=o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o= =o=o=o=

(apologies for the terrible ASCII-art)

He can't remember where he got it from, but it looks incredibly useful! I've tried searching my usual sources (Farnell / RS / eBay) but I can't find it.

Does this stuff have a proper name?


texts:
I am trying to power an ultrasonic mist module, which works at 24V and requires a few milliAmps. I have a 12V DC power supply, how can I use it to power my ultrasonic module?

I searched on the internet and there are multiple(rather complex for a beginner) ways given to do so, is there a simple way a beginner can get his way around it?


texts: Any solution to avoid humming sound / speaker noise for MP3 bluetooth module?

texts: So I have here sub woofer Simbadda CST 5100N and I want to convert it to bluetooth, so bought an MP3 bluetooth module to convert it. The module needed 5 to 12 volt DC to operate. Inside the speaker, there is step down transformer 220 to 9 volt (that is what is written on the transformer), but I connected the power supply for MP3 module from a capacitor after full bridge rectifier. Before I connected it though, I measured the voltage running through the capacitor (2200 uf), and it says 12 volt. So I can directly connect the module and it would operate. On the module though, there is LM 7805, so I know it runs with 5 volts. The problem is the humming sound is louder.  Is there anyway I can reduce the humming sound ? Or it would be best to eliminate it.?


texts: Induction Motor Torque Slip Characteristics

texts:
This question was asked in a interview for Scientist position.

For a given T-slip characteristics of an induction motor, I want the same maximum torque but at a lower slip value?

Is it even possible?
If possible, then what will be its advantages and disadvantages?


texts:
Hey I'm looking for suggestions for implementing a very high precision timekeeping device.

I need to record independent signals in multiple devices and then time match them to an accuracy of about 60uS (3 samples at 48khz).

I was thinking of using GPS for time syncing (good to about 10-50nS with cheap commercial receivers), but some of the recordings could be done in areas without good gps signal.

My current idea is to sync all the devices initially (either with gps, or plugging them to a single pulse generator) and them keeping time locally with a high precision RTC of some sort and assume that the RTC can keep the needed accuracy (±30uS) for a reasonable amount of time (6-12hours) before needing to time sync them again.

Unfortunately the best RTCs I have seen have an accuracy of ±2.0ppm which is a time drift of about 41mS per 6hours, which is just too much for my application.

I'm looking for recommendations of how to keep an accurate clock signal across multiple non connected devices.


texts: STM32F7 46 G Discovery setting TIM2 to 1 second

texts:
I'm learning to programm on an STM32F7 46 G Discovery board using Eclipse as an IDE and STM32CubeMX. I'm trying to set a timer (currently TIM2) to one second without using an ISR.
I'd like to get a tick from the timer every second.

Below is what I tried so far:

#include "main.h"
#include "stm32f7xx_hal.h"

/* Private variables ---------------------------------------------------------*/
TIM_HandleTypeDef htim2;

/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_TIM2_Init(void);
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);

int main(void)
{
    HAL_Init();
    SystemClock_Config();
    MX_GPIO_Init();
    MX_TIM2_Init();
    __TIM2_CLK_ENABLE();

   while (1)
   {
       HAL_TIM_PeriodElapsedCallback(&htim2);
   }
}

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim2)
{
    if (htim2->Instance==TIM2) //check if the interrupt comes from TIM2
        {
           HAL_GPIO_TogglePin(ARDUINO_D2_GPIO_Port,ARDUINO_D2_Pin);
        }
}

static void MX_TIM2_Init(void) /* TIM2 init function */
{
  TIM_ClockConfigTypeDef sClockSourceConfig;
  TIM_MasterConfigTypeDef sMasterConfig;

  htim2.Instance = TIM2;
  htim2.Init.Prescaler = 41999; //max 65 536
  htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
  htim2.Init.Period = 1999;
  htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  htim2.Init.AutoReloadPreload = 0;
  HAL_TIM_Base_Init(&htim2);
  HAL_TIM_Base_Start(&htim2);

  if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
  {
    _Error_Handler(__FILE__, __LINE__);
  }

  sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;

  if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
  {
    _Error_Handler(__FILE__, __LINE__);
  }

  sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;

   if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
      {
        _Error_Handler(__FILE__, __LINE__);
      }
}

I know that the MCU runs at 42MHz which finally makes the clock run at 84MHz with PLL and I think I already set the Prescaler and the Period (to fix the autoreload time) values accordingly.

Thanks for answering and sorry for any English mistake (it's not my first language)


texts: How can I turn pulsating DC (square wave) from a 555 IC timer into an ac square wave?

texts: I am trying to create build a morse code transmitter. I know that morse code is sent at 500 KHZ so I set my 555 to spit out pulsating DC in a square wave with 9 volt peaks. But I am unsure wether antennas will transmit pulsating dc. And I also would like to add a couple filter capacitors on the circuit which block dc... but when I try to use a transformer to get ac from my pulsating dc it turns into a sine wave ac....... Any help????


texts:
I wrote this simple program:

#include <avr/io.h>

int main(void) {
  DDRA = 0xff;
  PORTA = 0xff;
  while(1) {
  }
}

When I program it to my brand new ATmega16A-PU, avrdude tells me that everything's fine. But when I connect an LED to port A, it never gets enabled.

For compiling the program and flashing it onto the ATmega, I use the following commands:

avr-gcc -mmcu=atmega16 -c -o test.o test.c
avr-gcc -mmcu=atmega16 -o test.elf test.o
avrdude -p m16 -c avrispv2 -P usb -U flash:w:test.elf

The following pins of the microcontroller are connected:

40 PA0 ---------> 220 Ω --> green LED --> GND
06 PB5 (MOSI) --> MOSI of the programmer
07 PB6 (MISO) --> MISO of the programmer
08 PB7 (SCK) ---> SCK of the programmer
09 RESET -------> RESET of the programmer
10 VCC ---------> VCC of the programmer
11 GND ---------> GND of the programmer

When I connect the left end of the 220 Ω resistor directly to VCC, the LED glows, so the LED is ok. The microcontroller is brand new and I already tried another one (also brand new), so I think they are ok too.

EDIT: the fuses are set to 0b10011001 (high) and 0b11100001 (low).

Any idea, why the microcontroller does not set port PA0 to VCC?


texts: Toggle state between two circuits with two momentary switches

texts:
I have two circuits each with their own 1.5v power supply. I would like to toggle state between the two circuits with a switch, so that hitting a momentary switch turns the light off on one and turns the light on on the other. I've been able to wire in the momentary switch on each circuit but I need them to toggle each other.

I've looked into flip-flops but I'm a bit lost and haven't been able to figure out the best way to connect the two independent circuits. No code, this needs to be done with discrete components.

Sorry if this is a stupid question, I'm still learning the basics. Thanks for any tips/pointers.


texts: Serial Communication Between Android and Attiny85

texts:
I am planning to build a sensor module for smartphone using Attiny 85 as its microcontroller.

The sensor module will have a USB type A and to connect to the smartphone, OTG is required.

Serial Communication (TX RX) will be used for them to communicate with each other.

My questions are:

TX of Attiny85 should be connected to D+ or D-?
TX RX of Attiny85 will have 5V for its logic signal voltage
level. Do I need to use a voltage regulator to change them to 3.3V
for the D+ and D-? Commonly, what logic signal voltage level is used
for D+ and D-?
What is the max current can be drawn from smartphone's USB

Note: My smartphone model is Redmi Note 4. TX RX of Attiny will be done by using software serial following this guide https://www.instructables.com/id/ATtiny85-ATtiny84-Analog-Pins-Serial-Communication/


texts: ADC unable to read from multiple channels

texts:
The problem is that I am unable to read from multiple ADC channels (atmega8-au). The code works fine if only one channel is used eg. ADC0, however, if the second channel ADC1 is used then the value of readADC1 is equal to readADC0.

What should I do this to fix the problem? Might it be related to resetting the ADMUX bits?

The related code:

#include <avr/io.h>

unsigned int threshold = 900;
volatile unsigned int sensor_left = 0;
volatile unsigned int sensor_center = 0;
volatile unsigned int sensor_right = 0;

void init()
{
    DDRD |= 1 << PORTD0;
    DDRD |= 1 << PORTD1;

    ADCSRA |= (1 << ADEN);
    ADCSRA |= (1 << ADPS2) | (0 << ADPS1) | (0 << ADPS0); //1MHz / 16 = 62.5kHz
}

unsigned int readADC0()
{
    ADMUX |= (0 << REFS1) | (1 << REFS0);
    ADMUX |= (0 << ADLAR);
    ADMUX |= (0 << MUX3) | (0 << MUX2) | (0 << MUX1) | (0 << MUX0);
    ADCSRA |= (1 << ADSC);
    while (ADCSRA & (1 << ADSC));
    return ADC;
}

unsigned int readADC1()
{
    ADMUX |= (0 << REFS1) | (1 << REFS0);
    ADMUX |= (0 << ADLAR);
    ADMUX |= (0 << MUX3) | (0 << MUX2) | (0 << MUX1) | (1 << MUX0);
    ADCSRA |= (1 << ADSC);
    while (ADCSRA & (1 << ADSC));
    return ADC;
}

int main(int argc, char* argv)
{
    init();

    while (1) {
        sensor_left = readADC1();
        sensor_center = readADC0(); //false results if enabled

        if (sensor_left < threshold) {
            PORTD |= 1 << PORTD0;
        } else {
            PORTD &= ~(1 << PORTD0);
        }

        if (sensor_center < threshold) {
            PORTD |= 1 << PORTD1;
        } else {
            PORTD &= ~(1 << PORTD1);
        }
    }
}


texts:
I'm designing a PCB in Altium and I need to trace tracks that can support 20A. I used a PCB Track Width Calculator and I need a width of 10mm for my tracks. The problem is, how do you link the pads of component to such a large trace?
Can I make a small trace at the end of the large one? Do you have a solution for this problem?
Here is a screenshot so you can see the size.

Thank you.


texts: Any idea which software was used to generate these circuit diagrams?

texts:
And/or:

I'm trying to choose a free schematic drawing software, and like the way these two look. I've read related questions about circuit drawing software as well. I like Fritzing, but it lacks some components. For example, I cannot get that RS232 component into it.


texts: Relation between Torque, Speed and Voltage

texts: In my application, I require a DC motor that can operate a fixed load at different speeds. Is this possible? I know for sure that torque varies with current and speed varies with the voltage. Does this mean that voltage has no effect on torque and that the dc motor will generate the same torque even at lower voltage?


texts: Arduino / Processing versus .NET Micro Framework? Best language? Best hardware?

texts:
I've been messing around with Arduino for a while now, and I'm in the process of moving from beginner to intermediate. I'd like some opinions on the .NET Micro Framework, in terms of performance and hardware availability.

I'm a .NET programmer, but I've found Processing for Arduino to be pretty much zero friction... It's so close to C# that anything I want to do doesn't even require a trip to the documentation.

Anyhow, which is better?


texts: Designing a simple ELF-VLF Receiver with Loop Antenna

texts:
I'm going to design a simple Receiver and Loop Antenna pair to receive signals repelled from Meteors upon hitting earth aerosphere with the frequencies around 3-30KHz. It's going to be introduced to people in a workshop.

The aim is to keep it simple and not too expensive in order to let people with minimum knowledge about technical details be able to at least construct something with a little help. It should not be so highly efficient but it should have good frequency coverage and get low noise, as much as possible.

I'm thinking to design a square loop antenna by turning wires around a square plastic or wooden frame and connect it using a coaxial cable to the receiver board containing filters and amplifiers, and connect the board's output signal to Mic input of laptop to analyze the data using Spectogram application.

So, i started searching for Loop square antenna specifications and found this page that has modelled the antenna with this equivalent circuit:

Now, the questions:

Are loop antennas limited to single frequencies or can they receive specific frequency ranges too? How can i design the best loop antenna to have the broadest bandwith to fulfill the 3-30KHz range? Should i consider anything special?
How can i match the impedance between Antenna, the coax cable and the receiver?

The receiver part will have a high impedance input as it's a amplifier. The coax cable Will be 50 or maybe 75 ohms according to it's type. What about the antenna part? Is it enough to calculate the impedance seen from antenna output in the schematic image attached above?

And, how can i match antenna impedance to remove imaginary part? Can using regular capacitors and/or inductors be enough or i should create an compensative element using wires? Does having imaginary part weaken the gain too much? Is it imporant at all (In my case, of course)? I'm lost!

What is the best way to limit the maximum output of the board to ensure that Sound card of the laptop would not get damaged because of extra voltage/current?

Correct me if i'm missing anything.