texts: Improve current limit on boost converter

texts:
I am using the LT3571 to convert 5v to 50v as the bias for a photoreceiver.   Overall noise and stability are good, but above 3.5mA the voltage begins to drop. At 8mA I am down almost 5v.
Doing some quick calculations, 5v->50v gives ~90% duty cycle.  Looking at the switch current limit at that duty cycle, it is 400mA. If I understand correctly, for ideal components I should be able to hit approximately (1-dutycycle)/2 times the peak current, or 20mA.  I am running into trouble at less than 1/5th that value, so probably I am doing something wrong or misunderstanding.
Here is my circuit diagram:

and here is the circuit layout:

I apologize for the images, but the boost converter is stuck into a more complicated circuit with very little free area.  I opted to put the output cap on the backside.  This added vias but let me put the cap pad directly over the switching converter GND, so the loop area is very small.  Most components are 0402. The board is 4 layers, with almost all components on the top, then GND, then PWR and finally the back signal layer which has the output cap.  Should I have avoided the vias?
I tested with the current limiter set to 20mA and with it disabled and it made no difference.
My inductor is 10uH with < 350mOhm resistance and a saturation current of 1 amp.  The converter is configured to run at 1 MHz.  Not sure if these are ideal?
Any advice?  I'm new to DC converters and not sure how to proceed.
Edit
I tested the power supply (0.07V total sag), and my decoupling seems fine (few 10s of mV p2p ripple under load measured at the device power pin).
Following suggestions here, I tried lowering the switching frequency 2.2-fold (450 kHz) while increasing the inductor size an equal amount (22uH).  Unfortunately, the voltage droop into 10kOHm was identical to my original 1MHz/10uH circuit (0.9V). I took a few simple measurements putting a scope probe on the switch/inductor trace (at 450 kHz/22uH):

Under load it seems the switching frequency becomes irregular, with some missing cycles, and a few that seem to happen too close together (?).


texts: DALI - ARC Power Control Commands - What about them is 'ARC' related

texts:
Commands used in DALI are described as ARC Power Control.  If I am Directing an LED fitting to a particular dimming level, what about the command has any relevance to an 'ARC' description.  Where does 'ARC' fit with the DALI protocol for Dimming a fitting?
New User ... Very impressed your resource... Thank you for it.


texts: How do I fetch data from the internet with a GSM module using GPRS?

texts:
Recently I have built a device using Quectel (GSM/GPRS module) interfaced with Atmel MCU. It will control another device using SMS received by that GSM module. Now I am trying to connect it to the internet.

The user will give command on a website and Quectel(GSM/GPRS module) will transfer the user's command to the MCU.

Or sometimes the application will be like: Quectel(GSM/GPRS module) need to take temperature value from particular website and give that value to my MCU.

What are the things I need to learn to do this? Can I buy domain and host, or is there any other free service for this?


texts: Voltage step up for bidirectional current source

texts:
I will be using a circuit similar to the following to create a bidirectional current source driving a max load resistance of 10k at a max of 2.5 mA. (based on this article http://www.ti.com/lit/ml/slyy054/slyy054.pdf)

Since I only need to drive about 2.5 mA through the load, I think a supply voltage of +/- 30v should do the trick and provide enough headroom to account for the difference amp not being able to go rail to rail.

The problem is that I'd like to use a 7.5-9v single supply to generate the +/- 30v. My current plan is to step the 9v up to 60v and then create a virtual ground to split it into +/- 30v.

A dc dc boost converter might be what I need, something like this:

http://datasheets.maximintegrated.com/en/ds/MAX1771.pdf

but I don't see any of these types of devices commonly being used to step up voltage that high, which makes me think I'm barking up the wrong tree. I'm also not sure that my current draw will be high enough to keep those devices working.

If that will work, how should I choose the inductor/transformer and capacitors?

If that doesn't work, I might have to convert to AC to step up the voltage with a transformer and then convert it back to DC; how would I go about doing that?

Then I need to get the virtual ground. I don't see any ICs that can handle more than 40v. How would I go about designing my own given my low current, higher impedance requirements?


texts: Is it possible to take the transfer function of a transistor?

texts:
I am using a common emitter amplifier to bias and amplify the signal from an electric guitar, and in the process I started wondering whether it is possible to include a transistor in a transfer function.  If it is assumed that the transistor is acting in the linear region of operation, then it is my understanding that the component is approximately linear.  As the transfer function only applies to linear elements, I was wondering if this is possible.

In the linear region of operation, I learned in class that we can approximate this component as a resistor, where the value of resistance is:
$$
R_{on} = 1/(k*(V_{GS} - V_{TH}))
$$
I've also seen this written as:
$$
R_{on} = 1/(k*(V_{BE} - V_{cutoff}))
$$However, because the resistance is dependent on voltages at other points, I was unsure as to whether or not this is again possible. To be thorough, I attached a picture of my circuit in LT Spice. My transistor is a PN2222.

Thank you very much.


texts: PIC32 SPI Flash Burst Write chip select behavior

texts:
I have a pic32 and I'm talking to a spi nor part to store some data.  Now for burst write my flash supports 256 bytes at a time and I want to use my DMA to transfer this.  However the part requires that CS stay low for all 256 bytes.   I was reading both datasheets and trying  to understand CS behavior but I don't quite understand.

I took a look at what happens when I read a status register from the flash which requires me to use DMA to write 4 bytes.  On the analyzer I see that CS stays low for the whole transfer which is what I want.   But how does it know?  There's only one register to write for the spi buffer (not using fifos / enhanced mode).   So how the heck does the hardware know I'm not done after the first byte?

My only thought is that there is a buffer you write to, and another buffer that shifts out bits.   So if I fill the write buffer before the shift buffer is empty maybe that keeps CS low.  I can't prove it though and I'd like to understand how it works before I just blindly use it.


texts: Obtaining the analytical expression using the state transformation matrix

texts:
I am trying to derive the analytical expression in the box below. T is the state transformation matrix.
x_dot=A*x(t) is a second order linear system.
A has 2 distinct eigenvalues s1 and s2 and diagonalizable.

k1 and k2 depend on initial state x0

I am not able to understand what linear algebra steps have been taken so that e^(s1*t) and e^(s2*t) get decoupled? It doesn't make sense to me because the middle term is diagonal but the terms T and inverse(T) are not diagonal.


texts: Is charging a small battery bank possible using a battery charger and a large battery in series?

texts:
What would likely happen if someone wanted to charge a series battery bank of say 36 volts total but they only had a 24V charger?  Could they put that charger in series with a 12V battery and charge the bank that way?  For example, imagine they had three 12V 7.2Ah AGM batteries in series like the kind used for a childs electric scooter.  The regular charger for that scooter broke and they have to use a makeshift charger but the only other charger available is a 24V but luckily with an AGM mode setting.  Knowing this is not enough voltage to charge a 36V bank and not wanting to charge in groups of 2 batteries (1+2, then 2+3, then 1+3), someone decides to just take a larger 12V 50Ah fully charged battery and put it in series with the 24V charger.

Question:  will this work and assuming the charger is set for 2A maximum charge current, will that still be maintained with the addition of the series battery which would bring the 24V charger up to 36V?  Since the battery and the charger do not share a common electrical ground, it seems they would effectively be isolated from each other with no bad interactions.


texts:
I have created an AC sine way using a wien-bridge network.

I would like to measure the peak to peak voltage of this wave using my microcontrollers ADC.

I cannot just use this wave as an input to my Analog Input pin, as of course the electrical specification specifies no negative voltages, and I would only get a snapshot of the wave, and would have to take many measurements and take the max one.

I am looking for some discrete components I can pass this wave through to get a simple DC voltage representing the Peak to Peak (or just the positive) voltage of this wave.


texts: How to create a J1939 ID that have a PGN = 0x130?

texts:
I'm trying to create a J1939 message with a PGN equal to 130.
But I couldn't determine how the ID is going to look like in order to get that exact PGN.

Can you please share a suggestion?

Thanks a lot


texts: Power supply noise caused by external heat pad

texts:
I have a circuit that switches a 50W Sunbeam heating pad via a relay (for regulating temperature). My circuit is driven by a 5v AC/DC switching converter. The AC input to the power converter is shared with the heating pad.
When the heating pad is switched off, I notice a lot of noise in the 5v DC output of my power supply. I also notice a lot of noise in the same DC output as I change the heating pad thermal output (from off, to low, to medium, to high, and back). Every "transition" on the heating pad seems to generate a lot of power noise to the microcontroller in my circuit (see o-scope images).
I've tried a simple RC snubber on the AC input to my supply (0.033uF + 120Ohm in series), and also a filter on the 5V DC output (2 electrolytics in parallel... 470uF and 150uF, separated by a 0.47uH choke). Nothing I've tried seems to affect the noise. The AC/DC converter I'm using is the XP Power ECE05
Any ideas? These power spikes are causing my controller to reset.

The switch in the schematic isn't there in the real circuit. The base of the transistor is controlled by the GPIO pin of an Atmel processor, but this illustrates the point.

NOTE: I get identical noise when everything after the power supply filters is replaced with a 50 Ohm 10W resistor. The oscilloscope captures above were all done with just that 50 Ohm resistor as the load so I could eliminate the rest of the circuit as the problem.
Some data:

Connecting the heater to a different AC circuit than the power supply and o-scope did make the noise go away.
Connecting the heater and power supply to the same AC circuit but putting the o-scope on a different circuit did not make the noise go away.
Adding a 0.1 uF mylar cap in parallel (and after) the existing filter caps added some attenuation to the noise (a volt or two). Other (smaller) ceramic caps I had also did little.
I noticed that switching the heating pad temp setting a rate of about once a second didn't produce any noise. Once every 1/2 second produced a few noise spikes every couple seconds. Rapid switching caused noise everywhere on the o-scope trace.

I added an EMI filter (EMI103T http://www.bourns.com/data/global/pdfs/emi_t_series.pdf) to the power supply output and I also tried it at the AC input. Neither configuration had the attenuation I would have expected.
Close up of the noise signal. 8-10MHz range. This is why I thought an EMI filter with 15db at 8MHz would have a positive effect... I'm confused why it didn't have more than a 2-4V attenuation effect on the noise on the DC output.


texts: Multiple Ground Referenced Sensors on Single Floating Supply

texts:
Some background: I'm designing an industrial control board with isolated analog and digital IO. The hope is for it to be pretty foolproof, such that you could connect any 4-20 mA or 0-5V sensor with little configuration (i.e. a DIP to switch between current and voltage measurements) and have it work without having to worry too much about grounding specifics. For example, I'd want to a technician to  be able to connect both ground-referenced and non ground-referenced sensors without having to think about how the grounding is configured. Some of these sensors may be powered by a separate mains supply, while others may be powered off the board's (isolated) 0-5V supply.

To me, it seems like the way to do this is to have a floating ADC that digitizes the analog signals then sends them to the earth-referenced board through opto-isolators, rather than deal with analog isolation.

My question is, to safely do this, will each analog input require a separate supply? Thinking about it, I think if I could guarantee that all sensor signals would be floating and not referenced to their case ground it would be fine, but I can't. As in the schematic below (sensors are modeled as voltage sources), if two sensors on the same floating supply have their analog ground connected to the case ground, you create a ground loop, conceivably the two sensors at different locations could have different ground potentials/ An example of this would be two pressure transducers with case grounds in different water tanks.

simulate this circuit – Schematic created using CircuitLab

If so, what's a good cheap way to get several floating supplies? Or is there a better way to do what I'm thinking?

Thanks!


texts: Would a capacitor between base and emitter make relay amplifier less noisy?

texts:
I have a single transistor relay amplifier driven by GPIO output of Raspberry PI. The amplifier works reliably and is not causing any immediate problems. Still, if I leave the relay flipping on/off every second, the computer board somehow gets reset after an hour or about. I suspect that my relay still generates too much noise and I need to take more measures then just a flyback diode which I already include.

simulate this circuit – Schematic created using CircuitLab

Would adding a capacitor between base and emitter of the transistor help? By idea, when GPIO level changes, this capacitor should cause gradual closing/opening of the transistor rather than abrupt. This would give much more time for the flyback diode to engage. I understand this would slow down the switching, but 200 ms or about delay is acceptable for this relay.

If you think this would work, that would be a recommended capacity of this capacitor?

Please also tell if could do something else can be done to make this amplifier really quiet. I cannot easily get rid of the relay because the circuit it controls is totally undocumented (no clue about the voltage, current, polarity, requirements, just that < 12 V and this is a signal circuit so unlikely a lot of current). I only have a single power source to power up both computer and amplifier.

I currently have no oscilloscope in my disposition so my possibilities to investigate the noise spikes are limited.


texts: What is the correct way to interface 3.3v logic with the PS_ON# 5v signal on a standard PC power Supply?

texts:
The PS_ON# line of a standard ATX PC power supply needs to be pulled to ground to turn the supply on.  The signals on an ATX supply are 5v logic according to the standard. I'm trying to re-purpose an old PC power supply and I need to control it with a 3.3v logic device (GPIO on a Raspberry Pi).  What would be the right way to connect the PS_ON# signal to the 3.3v pin so I can use it to turn the power supply on and off.

I've tried a resistor voltage divider but that didn't work because it always pulls the signal low and I'm afraid that hooking the 5v PS_ON# directly to the pin will fry the 3.3v chip.  Is there an easy way to do this that I'm missing or do I need a special part to deal with the difference in voltages?


texts: I've noticed that some high-speed switching PCB's (i.e. microwave) use a layout, where each net is maximized and the 'traces' are the non-copper.  Is this to decrease capacitive reactance in the circuit?


texts:
I'm building a drone with an mpu6050. Does the placement of the mpu influence sensor data?

I mean, if I rotate the sensor properly so that all axes point in proper directions, then will it matter if I place it right in the center of the drone's board or can I place it near, for example, the front left edge of the board?


texts:
I try to design a (relatively) low cost H-Bridge on N channel MOSFETs. I need to drive 8.5A peltier device with 12V and (roughly) 20kHz PWM.

(after reading some of the comments I changed this question to use P-MOSFETS for high side)

I plan to drive only low side MOSFETs with PWM, so I don't care too much about capacitance of high side MOSFETs. I was able to find quite cheap P-MOS transistors with an Rds value of about 0.02-0.06R.

My circuit would look like this:

I could probably use bipolar transistors for driving high side MOSFETs, but I have some spare N channel, I hope that using MOSFETs there is fine too.

Now the question is:

Is it a good circuit design?
What resistance values I should use for driving high side?


texts: What is the meaning of negative value of alternating waves?

texts:
What does the negative values in AC mean?

If we have a symmetrical sine wave with positive and negative amplitudes, then what is the physical significance of negative values?

If the answer is related to direction, then the current should travel forwards and backwards, then how does the current complete its path in the circuit?


texts: Can I simulate the temperature response of one thermistor by a different thermistor

texts:
This sounds like an automotive question, but its really not.

I have a engine temperature sensor (presumably a thermistor, as it reduces resistance with increasing temperature). I need to mate this to a temperature gauge, but the gauge is calibrated for a different sensor with a different temp. response curve.

temp/ohm curves are known for both sensors (see graph)

For various reasons I can't replace the engine sensor. Also the gauge is a sealed unit, so lets assume I can't modify the gauge internals.

Is there anyway I can insert a circuit between the sensor and gauge, so the gauge 'thinks' its connected to the 'correct' sensor? Preferably a circuit of passive components as I don't have too much electronics experience.

Initially I assumed I might be able to do this by putting a suitable resistor in parallel with the sensor, but any resistor like that will only 'flatten' the response curve and as you see, response curve needs to be 'stretched'.

A couple of other factors to consider.

I don't need super accuracy; +/- 3 deg C is fine
I only this to work well in the range 85-105 deg C

Is this possible in principle and what is the general approach?

EDIT: More info

The red curve is given by: resistance(ohms)=114+6014*e^(T*-0.0396), where T=temp in deg C

Measured resistances from the existing engine sensor (blue line) is below. I would hope there is enough data there to predict the remaining values up to 105degC
(do themistors follow a standard curve?)


texts: Preventing power supply startup transients

texts:
I am trying to build a huge array of WS2812b's and the wiring is all done.
Now, I am in the process of installing it into it's final destination.
However, I have read that these WS2812b LEDs are very fragile parts and are destroyed by such voltage transients.
So, I have not yet hooked up the LEDs nor the control board to the power supply and have measured the supply without a load and there are huge >20V spikes (see screenshots). The output is supposed to be 5V and is getting stable after less than one second.
Is there any way to prevent these spikes from destroying my precious LEDs and the controller?
Would an inductor maybe help to prevent these spikes?

This is the supply in question: https://www.ebay.de/itm/Schaltnetzteil-LED-Strip-Netzteil-5-12-24V-AC-to-DC-Power-Supply-Netzadapter-TOP/252712276489?ssPageName=STRK%3AMEBIDX%3AIT&var=551690817312&_trksid=p2057872.m2749.l2649

These screenshots are with DC-coupling and no load:

Here are some screenshots with a 50 Ohm resistive load and DC-coupling:

50 Ohm and AC-coupling (times 10 probe):

Thanks,
Benedikt


texts:
I have an old camera flash that I want to trigger using my Arduino and an optoisolator. The flash has two wires.  When they are connected, the flash is triggered

How can I connect it to the optoisolator?


texts: How do service stores determine capacity in a lithium battery?

texts:
I went to a Samsung service store today with my S9 phone to ask about replacing my battery.
The people there plugged the phone into a USB port (I don't know where it was connected) and after a minute or so the program in their PC finished reading my battery capacity. They told me it was 70% (after 3 years.)
Now I don't think my phone has any built-in spectrometer for the battery (although with all the €€ it cost it should.)
From reading through the literature like here, I've seen the typical way to do this is via cycling the battery fully and Coulomb counting.
How did these people diagnose the battery so quickly?


texts: How to disable & enable the JTAG fuse in code on AtXmega MCU?

texts: An application sheet suggested that by disabling the JTAG interface fuse (JTAGEN) the current consumption of the MCU will drop a bit. Can this be done from within the code itself?


texts: Pros and Cons of Types of "Dielectric Grease"

texts:
I have come across two different types of dielectric grease. One, the "usual" kind, is a silicone grease that has added insulators. Another, less common, is a hydrocarbon grease, typically polyalphaolefin (PAO) grease with silica additives.

I noticed that PAO Grease is not typically advertised as "dielectric grease" but we have a tube in the shop that the electricians have been using as such. I have also found some distributors who have listed it this way, but the manufacturer does not call it "dielectric grease" or even state the dielectric / conductive properties online (for reference, the grease in our shop is Nyogel 760G). Among it's listed uses is for lubricating (for connector insertion / removal force) and sealing electrical contacts. I have seen that PAO Coolant is listed as "dielectric" in military applications but I don't know if that's relevant to the grease form. I'm having a hard time finding information for it when used as a grease.

Is this grease a better or worse insulator than Silicone? What are it's pros and cons?

For my particular application, we have a connector seal that needs some kind of lubrication to prevent damage when the connection is made. If the connection is made well, the unit is sealed from the environment and we don't have problems with it. Sometimes the seal is damaged when it is connected, however, and then we have issues with water intrusion.

Additionally, the unit is not sealed without the connector in place. On the other side of the connector is an exposed PCB and I need to make sure nothing gets shorted out on the board. My concern is if we put the grease on the seal to make the connection better (some technicians have even suggested packing hole entirely with the grease), that some grease could ooze onto the PCB. If it's not a good dielectric, we could have shorts which would negate the reason for using it.

It's a poor design, but I'm stuck with it unfortunately. We have thousands of these units. I'm trying to find a good solution.


texts: Is it ok to replace a tantalium decoupling capacitor with ceramic?

texts: I am using the Analog Devices ADXL343 accelerometer (https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL343.pdf) which advises using a 1uF tantalium cap on one power line, and a 0.1uF ceramic on the other.  I can't see any reason to prefer tantalium - ceramics of that size are easily available in my preferred 0402 chip size, and a fraction of the cost.  Am I missing something?  On Digikey tantalium cap one-off is about £1.50 but ceramic just 8 pence!


texts:
This one should be obvious, but I'd rather ask here then get some unexpected surprises.

One of my friends fried a proprietary USB cable which has male USB A connector at one end and TRS connector at the other end. As far as we can see, only the USB A connector seems to be damaged (one of the pins melted). I'm thinking of removing damaged connector and replacing it with something like this. How would I assemble that connector?

EDIT: Results for future users with same problem: Step one was to cut off burnt connector in such way that there is a bit of cable remaining connected to it. Then I removed metal shield from old connector and found relation between pins on connector and colors of internal cables. In retrospective, I think it would have been better to remove shield and to see which pin is connected to which ring before cutting off the connector. Maybe some crazy product uses internal wires of same color?

After that I removed piece of insulation from the healthy part of the cable, placed heatshrink and removed pieces of insulation from individual wires. To me it looked like the black part of the connector was there to facilitate cold welding, but it turned out that I had to solder wires to white plastic part. After that I placed black part on the white part. I was surprised with big metal part as it turned out that the protruding metal part should go next to the black plastic part. To me opposite it looked logical, but plastic parts would go in in only one orientation. In the end, small metal part is just placed on the exposed area of big metal part and small metal jaws are tightened. After that I moved heatshrink so that it covers the jaws and applied heat.


texts: How to determine patch antenna slit/truncation size for RHCP?

texts:
I am designing a patch antenna for a project. It is running at 2.45GHz. I am looking into both rectangular and triangular designs. I need to have a single coaxial feed point. I found all the formulas that give the radiator and ground sizes, however I cannot determine how to determine the slit length/width or truncation size.
If anyone has any insight to this, that would be great!
Thanks,


texts: What can I replace a BSS138 N-Channel MOSFET with?

texts:
I'm replicating this level shifter by Sparkfun but they use a transistor that I don't have. Frankly, I know next to nothing about transistors so reading the specs is way over my head at this point.

I do have a "kit" that I bought that has a bunch of them that might be able to replace the BSS138. Here's the list of the transistors that I have. Can anyone suggest a replacement for the BSS138?

2N4401, 2N3904, PN2222, 8050, PN4393, J113, 2N3055, TIP41C, TIP31A, 2N5458, 2N3904, 2N3906, 2N5088, 2N4401, BC547.

EDIT: Commenters saying that none of these parts will work as they are not the right kind of component. Having said that, could you suggest a through hole part that would satisfy these requirements?


texts: Expected behavior of 555 timer in monostable mode

texts:
While assembling the 555 timer based circuit below I noticed that 1) the intended delay on pin 3 only works if the switch on pin 2 is closed before attaching the circuit to the 9V power supply.

Source: circuitdigest

2) If the power supply is already attached and pin 2 is opened, closing it will produce the desired turn on delay on pin 3, which is fine.

My first question is whether scenario #1 is indeed the expected behavior in monostable mode (or perhaps a flawed construction on my part). The second question is whether it is possible to provide a delay also in the case where pin 2 remained closed but the power supply would be removed and reattached later on.

PS: I have looked into a similar question but was not convinced it can help in this case.


texts: how to calculate the frequency and impulse response of the photodiode-detector

texts: can you help me to do the problem ( some hints how to solve those problems based on experimental method course)


texts: How much time needs a 120W/15V solar panel to charge a 48V/2.1KWH battery?

texts:
Could you help me with this problem?

I'm building a solar panel with these characteristics:

No. of Cells:                36

Cell Type:                   Mono-crystalline 125x125mm 3.42w

Max. P:                  123W

PTC Power Rating:            100W

Voc:                     18V

Vop:                     15V

Working current (Iop) :      5.5A

And I want to charge with it my Lithium 48V 2.1 kWh battery

Dividing this capacity by the power delivered by the solar panel:

t=2100Wh/100W=21h

So it should take at least 21hrs at optimal conditions.

As I need to step up the voltage from 15V to 55V in order to be able to charge the battery, is that going to affect the calculations or add some loss? Is that easily doable with an mppt?

Thanks!


texts: Thevenin equivalent of the following circuit

texts:
So...I have to find \$v0\$ using exclusively Thévenin/Norton equivalents. I am completely lost since in this case I have a dependent voltage source which relies on \$v0\$ itself.

\$v1,a,R1,R2\$   and  \$Rq\$ are known values.

If I understand the procedure correctly, I should obtain \$R_{TH}\$ by "removing" dependent sources and then use Norton equivalents, where I would end with:

\$V_{TH} = R_{TH}*I_{N}\$

Any help/clues are appreciated.


texts: Altium: How do I flip/mirror components? X and Y don't work

texts:
So this seem like a simple question, but I'm trying to flip components in the schematic editor. If I select a component then use the keyboard shortcut X or Y, it brings up a menu and does not slip the component as desired. Edit --> Move --> Flip... also does not work. Suggestions? Thanks

Edit: I should have mentioned that I would like to flip groups of components as well as net labels. With net labels the connection point is on the bottom left, but would like to have it on the bottom right such that I can connect it to wires aligned right.


texts:
Since I could not get CAN to work with the internal CAN of an STM32 (F103C8T6), I bought a few CAN boards working with SPI, like these:

However, when I send something I get the following results using a logic analyzer:

Channels 1, 2 and 3 are Clock, MISO and MOSI of the receiving SPI
Channels 4, 5 and 6 are Clock, MISO and MOSI of the transmitting SPI
Channel 6 and 7 are CANH resp CANL

My relevant code for the sender side:

static void MX_SPI1_Init(void)
{

  hspi1.Instance = SPI1;
  hspi1.Init.Mode = SPI_MODE_MASTER;
  hspi1.Init.Direction = SPI_DIRECTION_2LINES;
  hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
  hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
  hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
  hspi1.Init.NSS = SPI_NSS_SOFT;
  hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128;
  hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi1.Init.CRCPolynomial = 10;
  if (HAL_SPI_Init(&hspi1) != HAL_OK)
  {
    _Error_Handler(__FILE__, __LINE__);
  }

main:

  while (1)
  {
      uint8_t data[] = { 1, 2, 3, 4, 5 };
      if (HAL_SPI_Transmit(&hspi1, data, 5, 100) != HAL_OK)
      {
          Error_Handler();
      }
      HAL_Delay(1000);
}

(note the Error_Handler is not called, so the return value is HAL_OK.

Receiver code:

static void MX_SPI1_Init(void)
{

  hspi1.Instance = SPI1;
  hspi1.Init.Mode = SPI_MODE_MASTER;
  hspi1.Init.Direction = SPI_DIRECTION_2LINES;
  hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
  hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
  hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
  hspi1.Init.NSS = SPI_NSS_SOFT;
  hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128;
  hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi1.Init.CRCPolynomial = 10;
  if (HAL_SPI_Init(&hspi1) != HAL_OK)
  {
    _Error_Handler(__FILE__, __LINE__);
  }

}

main:

while (1)
{
    HAL_SPI_Receive(&hspi1, data, 5, 100);
}

Questions:

Why don't I get information on the receiving side? It seems the sending SPI is ok, the sending CANH can be ok, but CANL seems not.
There are two jumpers on the CAN PCB, but I'm not sure what they do (when I put jumpers I still get nothing on the receiving SPI side).
I put both the Transmitter and Receiver to Master (because later they both need to send messages). I also tried with the Transmitter to Master and Receiver to Slave, but again no difference. What should be the correct setting?


texts:
I am reading a data sheet that has offset current at 200nA, however, some calculations are using the total offset current.

Why does the op-amp image below half the Offset current?

Datasheet


texts: Problem with RF transmitter/reciever and VirtualWire

texts:
I'm trying to get an RF transmitter/reciever pair from digikey to work with my Arduino Uno/Mega ADK.
But it seems neither the transmitter nor the reciever example are working with any of my Arduinos.
At the moment I focused on the transmitter for now (hooked up the UNO) as its more obvious to tell when its working or not. I'm using Arduino IDE 1.0.1 with VirtualWire 1.9 (the one coming with 1.0.1 didn't compile).

Now when I understand the sketch correctly this should send "hello" in an infinite loop and blink the onboard LED everytime. When I reset the Arduino UNO I can see the TX LED blink once for a very short amount of time (which is the serial.print I guess) and after that the onboard LED is just constantly glowing. I have honestly no idea why this isn't working. Everything looks correct to me.

The model name of the transmitter is QAM-TX2-433-ND but I guess this is more of a code than a hardware problem? Though here is the datasheet of the transmitter if thats of any help: http://www.quasaruk.co.uk/acatalog/DSQAM-TX2-2.pdf

This is the code of the transmitter example from the VirtualWire libary

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);   // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    //vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);  // Bits per sec
}

void loop()
{
    const char *msg = "hello";

    digitalWrite(13, HIGH); // Flash a light to show transmitting
    vw_send((uint8_t *)msg, strlen(msg));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, LOW);
    delay(200);
}

And here two pictures of the hook up to the arduino:

EDIT:
Ok so the LED problem was super simple, I just didn't specified PIN13 as output.
Though I still don't know if the transmitter is acutally sending something, I have my ADK hooked up to the reciever and its running the reciever example from the VirtualWire libary.
It should blink and print the "hello" message via serial but its not doing that.
Now its hard to say if this is a reciever or transmitter problem now.

Reciever sketch:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600); // Debugging only
    Serial.println("setup");
    pinMode(13,OUTPUT);
    // Initialise the IO and ISR
    //vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);  // Bits per sec

    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    //Serial.println("Recieving...");
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
    int i;

        digitalWrite(13, HIGH); // Flash a light to show received good message
    // Message with a good checksum received, dump it.
    Serial.print("Got: ");

    for (i = 0; i < buflen; i++)
    {
        Serial.print(buf[i], HEX);
        Serial.print(" ");
    }
    Serial.println("");
        digitalWrite(13, LOW);
    }
}

Deleting the if (vw_get_message(buf, &buflen)) statment gives me alot of garbage on the serial monitor, so I can recieve atleast something.

And here two pictures of the circuit again (forgot to insert the data cable for the photo, it was connected to the second pin from left to the reciever and to pin 0 on the arduino):

And the datasheet: http://www.quasaruk.co.uk/acatalog/DSQAM-RX4-1.pdf


texts:
I want to create a small device that detects AC outages and sounds a buzzer powered by a battery. I have some experience working with arduino and DC electronics but I have no experience in working with alternating current, so I'm kind of lost here.

I think I could use some kind of AC relay that would switch whenever current is lost, shorting the DC circuit, but I'm not sure such a component exists.


texts: How do the flat antennas pick up vhf signals?

texts:
The rabbit ear antenna had those two long poles for the VHF frequencies since those frequencies have pretty long wavelengths. The new flat antennas like mohu leaf and winegard don't have long wires in them. However they work extremely well based on personal experience.
I believe they are using fractal antenna design which I don't really understand, but how does the fractal design get around wavelength problem?

(source: hdtvexpert.com)


texts: Charging the lithium battery with higher rated charger

texts:
This question is two fold:

What happens if lithium cells are connected to a higher current capacity charger? Say, a 10Ah 1C rated cell is charged with a charger of 20A. Would the battery only take the amount it requires and leave the rest alone?

What happens when the lithium cells are in a pack? Say a 48V (13s8p) is connected to a charger of 20A? Would the load be shared by 8 parallel cell joints?


texts: Powering the MCU (basic), is this circuit suitable?

texts:
Shown is a basic circuit diagram to power a MCU. I am using the recommended caps for the test circuit for the regulator.

Should I put a diode between the +ve terminal of the power source and the input of the LDO just to be safe?
Will this circuit be suitable to power and program the MCU?
Are the decoupling caps correct or suitable?

simulate this circuit – Schematic created using CircuitLab


texts: Simulating oscillator in LTSpice vs Orcad

texts:
I'm busy simulating a Hartley oscillator that I have designed for a 64.5kHz oscillation frequency. I first simulated in LTSpice and obtained the results below which I am happy with:

LTSpice unfortunately doesn't have the opamp that I want to use in practice, the TL074CN, so I am now trying to simulate in OrCad using this opamp. For some reason I cannot get the same result in OrCad as in LTSpice. I've spent hours trying to get it to work in OrCad but to no avail. I have added my OrCad schematic and the result below:

In OrCad after my initial pulse to get oscillations going the oscillation dies out very quickly. I am at a loss as to what I am doing wrong and how the circuit seems to work in LTSpice but not OrCad. Any help would be appreciated.


texts: Controlling this stepper motor with NPN transistors

texts:
I found this stepper motor (It may have been in an old microwave oven). I didn't find the datasheet for this motor, so I would ask if someone recognise this model.
I'm new in electronics, so I'd really like to try this motor, but currently I only have some TIP41 NPN BJTs. Can someone show a simple diagram on how can I control this stepper motor with arduino using only TIP41 transistors?
EDIT: Full part number is MSCS048F83.


texts: Design of a low frequency (80 kHz) voltage-controlled oscillator circuit

texts:
I'm working on a project involving low frequency, through-the-earth data transmission from a transmitter in a karst cave system to a receiver on the surface. I've worked out that a SDR can be used for the receiver but there doesn't seem to be any readily available SDR packages for data transmission at around 80 kHz. Because of this I've looked to creating my own VCO circuit. I've produced a draft schematic in LTSPICE XVII that meets the target transmission frequency of around 80 kHz but the transmitting power is a little too high for my liking.
Admittedly, I don't know everything there is to know about how a circuit like this functions so if anyone could guide me through or give me some pointers on how to optimise this circuit for this purpose and potentially drive down the transmitting power then I would greatly appreciate it.
Attached is the VCO circuit in question and an Octave simulation from 1 kHz to 1 GHz, with associated values.


texts: Altium individual clearance for polygonpour

texts: I want to use a poured plane in my design, but i need more clearance on the bigger pads. If i increase the clearance in the rules, all the spaces between pads, will increase. Is there a way to specify, which pads should have a bigger clearance?


texts:
I am using vias to filter the input power. The following to pictures show two ways of placing vias. I think both of them are inappropriate since the vias are not "fully" connected with ground through all four "feet".

Is my guess correct? Could I have some comments on placing the vias?


texts: Why does smaller step show instability better?

texts:
I was stability testing a simple op amp circuit by applying a square wave to the input and looking for ringing etc. on the transitions.

I figured, hey, I'll give it a big whack, say from 0 to 5V, that should be plenty worst-case enough.

Well, that looked pretty stable and I thought I lucked out, didn't need any compensation, and everything was going to work fine.

A little later, I had occasion to exercise the same setup, but with a much smaller square wave, about 200mV P-P. To my surprise, the output rang quite a bit, indicating maybe 30 degrees phase margin or so.

As I wrote this, taking a closer look at the images, I realized the 5V step actually does show a similar ringing (4 bumps), it's just really small compared to the 5V unless you zoom in. I don't have a scope shot for that, I don't think I noticed it on the bench at all. However, even though the ringing is there, it's only 5mV overshoot on the 5V step and 50mV overshoot on the 200mV step.

It seems counter-intuitive to me. How come a smaller input signal makes the instability more pronounced?


texts: What capacitors are available in chip design?

texts: I've heard of MIM caps and MOM caps in chip design; what are the differences between them? What, if any, other capacitor types available to chip designers? What are the relative advantages and disadvantages between the types?


texts:
I've been playing around with I2C for a couple days now with a DE10-Nano dev board: I'm implementing an I2C master in CLaSH so that I can talk to the HDMI encoder chip, but for now I'm talking to an Arduino Due for easy debugging. The way I've been doing that is to use the SCL and SDA pins on the Arduino header of the DE10-Nano and connect that to the SCL and SDA pins on the Due with pullups.

I had versions that worked and versions that didn't; but at some point it just started not to work at all. Even with previously-working versions.

I managed to isolate the problem to the SCL pin: if I use a different pin on the FPGA for SCL, then everything works again. This makes me think I might have managed to kill the SCL pin.

How do I go about proving or disproving this? I tried outputting either 1 or 0 on the SCL pin and looking at it with a multimeter, and I see the correct voltage; I tried using the SCL pin as an input and connecting it to one of the builtin LEDs on the board, then feeding it 0 or 3.3 V, and I can see the LED light up or not.

Another thing I tried (based on this suggestion) is comparing the driver strength to a pin which seems to work:

Against 4.7k pulldown to GND:

"Good" pin: 3.21V
"Bad" pin: 3.19V

Against 4.7k pullup to 3.3V:

"Good" pin: 0.1V
"Bad" pin: 0.16V

Resistances (with the board powered down):

To GND:

"Good" pin: 1.2k
"Bad" pin: 0.95k

To 3.3V:

"Good" pin: 1.5k
"Bad" pin: 1.2k


texts:
The picure below is a improved current mirror. There are two equal input currents Iin and an output Iout. M1 converts Iin into BIASN2 to bias transistor M4B and M3A converts Iin into BIASN to bias transistor M4A.

So what is the role of transistor M3B here? It is a cascoded transistor and by adding it, the output impedance increases. However, I don't see why we want to increase output impedance at this branch.


texts: Simple reverse and overvoltage protection circuit for drive a fan

texts:
What is the simplest/minimal circuit or component i can use to drive and protect a fan from overvoltage and reverse polarity?

A mosfet per fan seens a option for reverse polarity, still if there's a better option would be cool since i don't want to do switching or turn off or on digitaly.
And what about overvoltage? For example if i plug 34V supply?

Fans are 24V @ 1A.


texts: Behavior of AVR microcontroller only containing bootloader

texts:
I'm working on an implementation of AVR109, where the bootloader times out after two seconds if a given series of bytes aren't received on the serial port, and then starts the main application using a function pointer to address 0.

The bootloader is working fine, and I'm able to program the AVR via serial port.  But when the AVR only contains the bootloader, and the flash memory at location 0 is empty, it takes two seconds in addition to the bootloader timeout every time the AVR restarts.  Why isn't this instantaneous?  Why isn't the AVR resetting immediately when the bootloader sets the pointer to an empty area in the flash?  Is this something I can configure?

EDIT: My bootloader conundrum actually proved to be caused by PEBCAK.  An error in the initial timing loop in the bootloader caused the extra two second delay, and was fixed.  When jumping to the start of a blank/erased flash memory, it actually only took a few milliseconds before the bootloader started up again, i.e. not a big problem.  But the best approach is to check the flash memory location before jumping there.  If it's erased, just restart the bootloader instead of jumping to the empty area.


texts: Why does 1/4 wavelength have a ground plane and 1/2 wavelength needs none?

texts:
Why does 1/4 wavelength have to have a ground plane and 1/2 doesn't?

I know that an antenna that has half a wavelength does not need the ground plane (example a dipole antenna) and when using a wavelength of 1/4 it is usually necessary to have the ground plane (planar antennas [PCB]).
My problem: I can't understand why we need to use a ground plane at 1/4 wavelength and not at 1/2 wavelength.

Please could also provide source of relevant information, examples, books or scientific article, something like that.


texts:
Conductors have a single electron in the last band, these electrons get pushed forward by electrons coming from the source (Battery), each electron pushes its neighbor and so on. Current is the flow rate of these electrons (i=dq/dt).

If the electrons make a complete loop and get back to the battery, why does the battery drain ?


texts:
I'm sure this has an answer somewhere but I am going to try my luck.
I am having trouble with the following type of circuit.

240V ac going to 3 resistors in series @ 10kW (no neutral, this a simple circuit diagram).
Total circuit current @ 1.44 ohms for each resistor load is 83.33 amps and 120v across any load with a voltmeter.
And since this is a SERIES circuit that (83.33 amps) is also the TOTAL circuit amps (if i'm not wrong).
Because in a parallel circuit it would be 249.99 TOTAL circuit amps and 240v across any load with a volt meter.
I am so confused because the voltage across each load keeps adding up to 120v, and in a 240v power supply circuit that does not add up correctly, it would need to be a 360V circuit with 3 resistors @ 1.44 ohms.

I guess the question is:
Should each resistive load in this circuit read 120v across itself with a voltmeter or should it read 80v across itself with a voltmeter.

If it should read the first one, why.

I apologize ahead for the bad grammar.


texts:
Beginning Electrical Engineering student here and had a basic question. I am researching microprocessor based relays and came upon the SEL-351 relay for differential over current. Looking at the spec sheet, it shows the following functional overview:

My question is, when this relay is put into a protection scheme, does this spec sheet mean that this relay will protect with all of the following scenarios below (67 P/G/Q, 27, etc) or are the features selectable, as in the user can select particular features to enable?


texts: How does a micro-controller process instruction from its code segment in the memory?

texts: I have been working with an Atmega 328 PU for a while and I understand how the .hex file is transferred into the chips code segment in memory . I have looked at the architecture of the Atmega 328 and it raises questions in my mind as to how are instructions processed in the processor , or in other words , how does the binary instruction ex : 1000001 get processed by the micro-controller. I searched the web but found nothing helpful. Can anybody give a good answer on how a instruction is processed by the micro-controller's processor ?


texts: 500F supercap charging causes circuit undervoltage (pre-charge)?

texts:
I have a 24V Generator starter system. Which controls all the engine parameters and includes a starter and it's supercap of 500F.

I'm supplying it with two redundant 24V 1kW sources.
First DC/DC converter is directly connected to the management system (about 1A).
Second DC/DC converter is connected to the supercap.

The management system starts and after a selftest and about 30s toggle the supercap contactor for loading.

Both converters should be in redundant mode, if one fails, the second should be able to compensate the loss and reduce the supercap inrush current impact.

However, when supecap is completely empty and starts to charge, the voltage is going under 16V (24V - 33%) and unfortunately the management is restarting causing troubles.

Do you have any ideas how to smooth the voltage at least till 18V? For the motors there are some soft starters. For the pre-charge there some Resistor+Contactor based circuits, but need a voltage monitoring. Unfortunately I have no Digital Inputs available.

Is there any on shield solutions?

Thanks in advance

simulate this circuit – Schematic created using CircuitLab


texts: Monitoring a LiPo battery while powering the Arduino

texts:
Well I am tring to make a circuit to charging lipo battery then use lipo. while arduino nano using lipo battery, nano measuring the voltage level of lipo. I am planning to make deep sleep if voltage level decrease to under 3.5 volt.
I have used tp4056, 5v boost converter and lipo battery
everthing working fine 5v boost converter gives 5v output until If I plug in the battery + pin to NANO A0 pin. after plugin A0 pin, 5 boost converter decrease to ouput voltage near to 3 volt.
How to measeure correct voltage level of lipo battery while I am powering the arduino nano with lipo?
this is my circuit


texts: Is a bleeder resistor on a small circuit mandatory at the decoupling capacitors?

texts:
I have this basic circuit with an MSP430 (The outputs go to LEDs)

I have noticed a strange (to me, not saying much though) circumstance.  In this circuit, I always have to wait around 20 seconds or manually short out the capacitor (when it's off) to get it to turn back on.

First plug in ::
  Everything works great!

Unplug it then plug it right back in::
  Nothing!

Unplug it and short out capacitors, plug it back in::
  Everything works great!

I have added a 4700ohm resistor (R1) in an effort to have a load constantly on the capacitor after power off.

With this resistor (chosen only in that it's only 5mW on a 250mW resistor) the circuit appears to work as expected.

To my very limited understanding however, I would think that the MSP430 would be enough to drain the capacitor.  I am very unfamiliar with brownout protection, but is this functionality preventing the micro from draining the capacitor?

Note that all capacitor sizes were chosen arbitrarily except for C1 which is called for in the data sheet of the voltage regulator.

Max draw from the micro is about 22 mA (the LEDs are driven by transistors)

I am unsure if datasheets are required for the regulator and micro

http://www.ti.com/lit/ds/symlink/msp430g2553.pdf
http://www.ti.com/lit/ds/symlink/lm1117-n.pdf

I am highly inexperienced but very interested in these things.  My goal is to learn and I thank you for your help

simulate this circuit – Schematic created using CircuitLab


texts: In what languages can firmware be written?

texts: Is there a restriction that firmware can be written only in compiled languages or Assembly languages or Machine code? Can Interpreted languages or Just In Time Compiled languages be used?


texts: Does resistor power rating mean 'real' power?

texts:
Given a mixed capacitive-resistive circuit, I have a \$36 \Omega\$ resistor through which a current of \$9.22 \angle 86° \text{mA}\$ passes.

My AC theory is rusty, but wouldn't I do:

\$P = I^2 R = 3.06 \angle 172° \text{mW}\$

\$P_{real} = P \cos 172° = -3.03 \text{mW}\$

This is a negative value, which is probably wrong. Which figure should I be comparing against a resistor specsheet's power rating? (I realize nearly all resistors will accommodate 3mW; this is a question to straighten out my theory.)

Edit

I'd totally forgotten about the conjugate rule. With the adjusted calculation, I get

\$(9.22 \text{mA})^2 \cdot 36 \Omega = 3.06 \text{mW (peak)}\$

\$(6.52 \text{mA})^2 \cdot 36 \Omega = 1.53 \text{mW (RMS)}\$


texts: Why do some transformers hum less or not at all when lightly loaded?

texts:
It can be observed that large power transformers hum more under load. For example, when some devices are powered up, there is brief "twang" sound: a loud hum that quickly decays as the filter capacitors charge. Increased continuous hum from a transformer can indicate that the filter capacitors are leaking.

This question isn't about why transformers hum, but why do they hum less, or hardly at all, when not loaded. How is the electro-mechanics playing itself out to reduce the hum? After all, the fluctuating magnetic fields are there whether or not there is a load on the secondary winding.


texts: how to draw the transistor level schematic a 3-port SRAM

texts: I have been trying to look up 3 port SRAM cell (2 reads and 1 write) everywhere, but I can't find anything about it. Does anyone know of any sources where I can look for how one might be implemented using logic gates or transistor level schematics?


texts: 8-Bit Binary to BCD Decoding for Three 7-Segment Displays

texts:
I've created a circuit that uses both binary and BCD counters to convert an 8-bit binary number into three BCD numbers, which then feed into BCD to 7-segment decoder chips, and finally to common-anode displays.

How it works: Upon pressing a push-button, an 8-bit binary number from a DIP switch is loaded into two 74LS191 binary counters, that are wired to count down. When both of the counters have reached their minimum (i.e. they have counted down to 0), that disables all counters.

Meanwhile, once the clock starts, I have three 74LS190 BCD counters that load all zeros, and count up daisy-chained, so that by the time the disable is activated on the counters, it will have counted up to whatever the original 8-bit number is, and latch on to that value. The outputs to these feed into individual 7447 BCD to 7-segment decoder chips, which then go to a 3-digit common-anode 7-segment display.

I'm using a 555 timer for my clock, the nominal frequency is 4.8 Hz (at the moment) which I plan to kick up to about 200 kHz once everything is working. As far as I know both of these frequencies fall way less than the max frequencies for the chips (although I was unable to find a max frequency on the 7447 data sheet).

Below is the schematic. I've simulated it in Multisim and it works perfectly. However when I build it, I find that the BCD counters have a problem once it counts from 19->20 (it goes from 19->0), and sometimes even from 9->10 (sometimes going from 9->0). It seems to me that I have a problem somewhere in my daisy-chaining of the counters, but my connections on my breadboard seem fine to me. The binary counters that count down are totally fine.

Does anybody have an idea of where my circuit may have gone wrong? I'd take a picture of my breadboard, but it's a complete rats nest which I don't plan to tidy up until I get everything working properly. Grazie mille!


texts: We have a task to design IEEE 61850 compatible board. So we considered several options for MCU for the board: stm32f7xx series or something more powerful like NXP MVF6xx series or Sitara AM3358 series. The question is how to design software for these platforms, if for the stm32f7xx it is quite clear for me (we can use either HAL/StdPeriph libraries and FreeRTOS) then for more powerful MCUs it is unclear because they all appear to run under embedded Linux. So as far as I understand if we for example choose NXP TWR-VF65GS10 platform as reference design we are bound to use embedded Linux and systems like buildroot/Yocto project to create our own embedded Linux Image and there is no way to use such platforms without embedded OS? Also which is the best option for fast proccessing of TCP/UDP streams - stm32f7xx with LwTCP/IP (without OS) or more powerful platforms with embedded Linux? Thanks)


texts:
I need to know how much electricity a machine uses in kW please.

On the machine information plate it states: 460 volts, 60 Hz, 161 amps, and it is a 3 phase.

I took the readings for the volts and amps:
Phase 1- 271 volts & 37.68 Amps
Phase 2- 271 volts & 37.62 Amps
Phase 3- 273 volts & 38 Amps

I cannot figure out the Power Factor to apply to the formula I am using:
kW=  (Volts x Amps x Power Factor x Sqrt 3) / 1,000

I know Power Factor = Real Power/ Apparent Power, however I cannot figure out the real power. I believe the apparent power is (460 x 161 x Sqrt 3) / 1,000 = 128.27 kVA?

Could I just average the voltage readings and then average the amperage readings for the 3 phases and then do (Avg volt x Avg amp x Sqrt 3) / 1,000 to get the true/real power without using the Power Factor?

Are my assumptions correct? Can someone please help me calculate the electrical consumption please! Thank you


texts:
I need to run a 2 meter data cable from an Arduino UNO to a series of 40 RGB LEDs with integrated WS2811 drivers. What kind of cable do I need? Do I need something between the cable and the first rgb LED to "clean up" or enhance the signal?

The 2m cable goes to the first LED only. Between each LED there will be 10~20cm of cable. What cable should I use for that connection?

So absolutely worst case (40 LEDs, all 20cm away from each other), that's 8 meters of cable in total (in practice I think 6-7 meters will be the maximum). Is this doable or will the LEDs misbehave? I know that these LEDs are very timing sensitive because they are sending data to all the LEDs on one line.


texts: Are MOVs and Inductors good enough for power supply protection?

texts:
I want to know if MOVs (Metal Oxide Varistors) and Inductors are good enough for power supply protection from surge.

I'm trying to design a power supply but our power distribution network is plagued by frequent power outages, surges, harmonics, which claims the life of many power supplies.

What protective components will provide best protection?

I would also like to know if an SMPS (Switched-Mode Power Supply) will be better than a standard transformer based power supply in such an area as this.

Thanks


texts: What is default Clock Frequency for Atmega8

texts:
I was upto use the UART of my Atmega8 but when i looked at the formula for UBBR, it asks F_CPU(frequency). I have made my own board and havent connected any external clock so what is the frequency my atmega8 runs on?

Further when i looked up to datasheet it says that it has upto 16Mhz, So am i running it on 16 Mhz or what?


texts: Lower than expected power consumption from speaker drivers

texts:
I'm using two Visatron FRS 5X-8 Speakers in a project. The amplifier being used is a Dayton KAB-215. Powering the whole thing from my power supply at 12V, I see a current draw of ~50 mA even at full volume. I'm a bit confused by this result.

My math suggests that for the two 5W RMS (8W Max) speakers I should see around 10W of power draw or ~.8A @ 12V. While I realize they may not operate continuously at this power during music, there is a big spread between 600 mW and 10W.

It seems like both the power supply (150W) and the amplifier board (2X 15W @ 8 Ohm) have tons of headroom here, so I don't really understand the low power draw. The bluetooth board doesn't have a volume knob on it currently, which the datasheet indicates should result in "full volume" on the amplifier side. My phone volume is maxed (when testing), and yet the power draw is super low. The speakers are fairly loud but not insanely so. I do have SPL measuring equipment that I can use to try to validate if the output is close to what it should be, but I'm still a bit perplexed.

I look forward to your thoughts on what is limiting the current draw, and whether this is a surprising result or not.

Update 1

I tested this with a couple other devices, and agree that it my phone bluetooth output is quite low.

Source:
Galaxy S10, Via Bluetooth, "Audio Tools" App 100 Hz Sine Wave

Drivers:
2 Visatron Drivers, one in a 3D printed enclosure, one with no enclosure

Power Supply: In constant voltage mode at 12V, supplying power to both speakers
Voltage: 12 V
Current: .313 A

Single driver measurements + output:
Voltage (Measued with true RMS meter in AC mode): 4.1V
Driver impedance from datasheet: ~22 ohms
Volume: 81 db @ (roughly) 1m, measured via the same phone app

I'm not quite sure how to translate the AC voltage at the speaker into wattage, given that the impedance is likely complex (right?). I read this post, but didn't gain a lot of insight from it.

The more I work on this the more I realize I don't understand, but I suppose that's part of the process. I also have a better measurement mic/setup, but I feel like I'm chasing bigger issues rather than small optimizations. I'm going to trace the graph, put it into WinISD and see what it expects from an SPL standpoint. I think that probably I just don't have that much input voltage from the bluetooth chip, and that everything else is behaving as expected, but I also don't understand the system well enough to conclude that.


texts: How do I copy a hierarchical module in KiCAD?

texts:
I have a schematic where I'm using hierarchical sheets. I'll have five same sheets and I'd like a way to make one and somehow just copy it for the other four sheets.

Any ideas how to do that? I can't find any obvious way to do so.

UPDATE: Just to be clear: I'd like to copy not just the sheet symbol but the whole sheet and all components in it.


texts: What is the voltage of the output in the following circuit?

texts:
I am trying to find Vout for the following circuit. Unfortunately, I do not get the right answer. What am I doing wrong?  Here is my circuit:

simulate this circuit – Schematic created using CircuitLab

Also the source voltage is +14v/-14V if that helps.
And here are my calculation :

A=Vin/Vout = -R2/R1
VinR1 =-R2Vout
-VinR1/R2 = Vout
-5*1/4 = -1,2V

The problem is the answer is supposed to be Vout=25V. But I do not understand how to get to that answer. Any help would be greatly appreciated.


texts:
I am beginner in Verilog. So my question may seem easy to you, but I have difficulty in understanding structure of Verilog.
I have one module which works in two modes: read and write. In write mode, it must assign value on positive edge of clock. In read mode, it must give output in any time without clock.
Can I use always statement in case?

 module EncodedRAM (input EncodingMode, input [2:0] EncodingIndex, input [7:0] EncodingNumber,
input [7:0] EncodingMask, input CLK, output [7:0] EncodingResult);
initial begin
    EncodingNumbers[0]=8'b00000000;
    EncodingNumbers[1]=8'b00000000;
    EncodingNumbers[2]=8'b00000000;
    EncodingNumbers[3]=8'b00000000;
    EncodingNumbers[4]=8'b00000000;
    EncodingNumbers[5]=8'b00000000;
    EncodingNumbers[6]=8'b00000000;
    EncodingNumbers[7]=8'b00000000;
end

case(EncodingMode)
0:
    always @(posedge CLK)
    EncodingNumbers[EncodingIndex]=EncodingNumber ^ Masks[EncodingIndex];

1:
    EncodingResult=EncodingNumbers[EncodingIndex];

endcase

endmodule


texts: Control two LEDs with two wires and inverter

texts:
I have a door sensor (magnetic Hall Effect) that I want to use to build a simple indicator: red LED if closed, green LED if open.

Here's the tricky part: I want to run only two wires to those LEDs, and I'd like to do it completely in analog circuitry. Here's the approximate outline:

I've tried putting something simple together with BJTs (an inverter, a bistable multivibrator etc.), and I feel like this is the right track -- that there's just one small tweak I need to make -- but I'm stumped as to how to get the voltage to flow. I've done extensive Googling and reading up on tutorials and I've found nothing close to what I'm looking for.

How do I get voltage to flow one direction if the switch is closed and in the other direction if it's open?


texts: UL Testing for low voltage battery powered devices

texts: Is UL Testing needed for a 3.6 V battery powered device that is totally enclosed in ABS platstic with no electrical terminals outside?


texts: Finding Current through element that offers some resistance and only permits current in one direction

texts:
Suppose
An alternating voltage e=200sin(314t) is applied to a device that show a resistance of 20 ohm and only permits the current in only one direction and entirely preventing the current the flows in another direction then the value of the current through resistance would be...i simply put use ohm law but the answer is wrong i.e 200/20=10A..And what would be the average value then...any one have any conceptual idea..thanks in advanced


texts: Where does -1 in BJT’s Ies equation come from?

texts:
I don’t know whether there is already a question and answer to this but I couldn’t find one yet. Regarding the following information from a text:

The equation for emitter reverse saturation current Ies shows that the Ies is directly caused by Vbe in non-linear way. But where does -1 in the parenthesis come from?


texts: How is the amount of outgoing power controlled in a grid tie inverter?

texts:
I'm trying to figure out how grid tie inverters work on a basic level. From what I understand, the inverter would have to

monitor the grid wave
create its own wave exactly like the grid
make it a little bit higher voltage
connect the two and then the power would flow into the grid

What I don't understand though is how it controls the amount of current going into the grid. Current is determined by voltage / resistance right, so, does the grid have a set resistance and does it just raise the voltage until desired amount of power flow is reached?

The grid having a set resistance makes no sense though, maybe it measures the resistance very quickly and then creates a tiny bit of charge at the appropriate voltage that gets dumped into the grid at that instance?

That option seems like it would make the grid wave messy though since there would be little discrete bumps on an otherwise nice sine wave.


texts: What are those nonlinear loads in real microgrids/grids?

texts: I have read in literature that nonlinear loads can impact on the operation of the so called microgrids. However, when I heard nonlinear loads I think in electronic devices such mobile phones or computers, but it seems to me that those loads are not "big" enough in terms of power demand for a grid where perhaps it is expected to be linear loads of hundreds of KW (such as industrial motors). So, what kind of "big" nonlinear loads is expected to be connected in the grid? Can you name some please?


texts: Signal that changes (depending on different key presses) is not working

texts:
I am writing a code for my FPGA that sends a signal 10 us wide every 2 ms. The code is working great, and now I am trying to implement some new code that will allow me to change the pulse width and delay using 4 different buttons on the FPGA. What I have seems to work when using modelsim, but not in testing on the FPGA with an oscilloscope. Here is the code:

library ieee;
use ieee.std_logic_1164.all;

entity GPIO_Voltage_Test is

port(
    CLOCK_50:in     std_logic;
    GPIO_1  :out    std_logic_vector(35 downto 0);
    KEY     :IN     STD_LOGIC_VECTOR(3 DOWNTO 0)
);

end GPIO_Voltage_Test;

architecture arch of GPIO_Voltage_Test is

shared variable PhaseShift      :integer := 0;
shared variable Period          :integer := 100000; -- *20 ns, Period is 2 ms
shared variable PulseWidth      :integer := 500;    -- *20 ns, PulseWidth is 10 us
shared variable count           :integer := 0;      -- one count for every rising edge of 50 MHz clock (20 ns)
signal          KEYPRESS        :std_logic;

begin

KEYPRESS <= KEY(0) or KEY(1) or KEY(2) or KEY(3);

process(KEYPRESS)

begin

    if (rising_edge(KEYPRESS))then

        if (KEY(0)='1')then
            PhaseShift := PhaseShift+500; -- Increase PhaseShift by 500*20 ns
            PulseWidth := PulseWidth+1000;-- Increase PulseWidth by 1000*20 ns

        elsif (KEY(1)='1')then
            PhaseShift := PhaseShift+250; -- and so on
            PulseWidth := PulseWidth+500;

        elsif (KEY(2)='1')then
            PhaseShift := PhaseShift-250;
            PulseWidth := PulseWidth-500;

        elsif (KEY(3)='1')then
            PhaseShift := PhaseShift-500;
            PulseWidth := PulseWidth-1000;

        end if;
    end if;
end process;

process(Clock_50)

begin

    if (rising_edge(Clock_50))then

    -- Begin by setting the output pulse to 1
        if (count=0)then
        GPIO_1(16)  <= '1';
        GPIO_1(17)  <= '1';
        GPIO_1(18)  <= '1';
        GPIO_1(19)  <= '1';
        end if;

    -- Increase the count by one every time there is a rising edge on the 50MHz clock
        count   := count+1;

    -- Each pin is triggered once the count reaches a certain time delay, set by PhaseShift
        if(count=1+PhaseShift)then
        GPIO_1(16)  <= '0';
        GPIO_1(17)  <= '0';
        GPIO_1(18)  <= '0';
        GPIO_1(19)  <= '0';
        end if;

    -- Once the pulse has reached a set amount of time PulseWidth, the pulse is then turned back to 1.
        if(count=1+PhaseShift+PulseWidth)then
        GPIO_1(16)  <= '1';
        GPIO_1(17)  <= '1';
        GPIO_1(18)  <= '1';
        GPIO_1(19)  <= '1';
        end if;

    -- Once the pulse has finished its period, the count is reset and the process begins again.
        if(count=Period)then
        count   := 0;
        end if;

    end if;
end process;
end arch;

There is a little more code after, but it isn't necessary.

Like I said before, this code runs properly in modelsim, but nothing seems to work when I press any of the keys on the board. I've rewritten the first process several different ways, but to no avail. I have gotten it to work with one button, where process(KEY) is the sensitivity list and the if condition is if (rising_edge(KEY(0))), but there will always be an error if I have multiple rising edges from the different keys.

Am I just going about this the wrong way? What would be the proper way to change the variables using 4 different keys on the FPGA?


texts: Choosing a current sensor based on mV per amp

texts:
I want to measure AC current with an Arduino-type device.

I am currently selecting a current sensor.

A 10 bit ADC gives 1023 points. At 5v that is 5v/1023 = 4.9mV

A current sensor with 185mV/A thus gives 26mA (4.9mV/185mV/A) per step.

A current sensor with 800mV/A gives 6.125mA per step.

Does this mean that current sensors with a higher mV/A are better in terms of accuracy of results?

(Obviously a ADC with more resolution would help)


texts: Can Lithium-Iron-Phosphate or LiFePO4 batteries be stored in cold?

texts:
According to this site, you can store in -40°C/-40°F just never charge them below freezing.
I have a E-Bike in cold Canada and taking the battery out is a pain.
The link says just make sure it's disconnected with a 50%-60% charge.
I cannot get answer on the internet. They just keep saying do not use in cold weather ONLY.  I just want to store in cold, not use the battery.


texts: Can Partial Discharge occour in DC circuits?

texts:
Partial discharge is a localized dielectric breakdown (DB) (which does not entirely bridge the space between the two conductors).
Hence, there will not be a global flow of current between the two conductors, as there is still isolation, but a local flow between two regions of the isolation (i.e., where the void starts and ends).
Over time partial discharge can erode the isolator and eventually turn into an electrical breakdown.
Now my question: As this process occurs over time, am I right to conclude that only an AC can sustain it, as there is a constant change of electrical potential between the two conductors.
On the contrary, in the DC circuit, partial discharges cannot occur as the potential difference between the two conductors is constant?
As an example consider an insulating solid material (dirt) with gas-filled voids.


texts: 12V Alternator charger using MOSFET with 3 x 12V output charging serial connected batteries ( 3 x 12V)

texts:
I am planning of building charger for trolling motor that will charge from single alternator 12VDC three serial connected batteries with three individual 12V outputs. This is something that is available on market (and I have Promariner ProSportHD) and most probably I will get DC as well, but I would like to try and make it by myself. I found already circuit with MOSFET and driver for charging two batteries but not in serial connection. Is anybody is able to draw or have already simple electrical drawings for this circle?

Batteries will be 120Ah charged with 2x60A alternators with 12V output.


texts: Is a hole in a conductor the same thing as a positive ion?

texts:
The flow of current in a (semi-)conductor is often described as holes and/or electrons moving between atoms. In this context:

Is an atom with a hole the same thing as a positive ion (cation), and
Is an atom with an electron the same thing as a negative ion (anion)?

I already understand what cations and anions are. And I am not asking about current flow. I just want to know if the two questions in the above list are true or false.

However you answer, kindly explain your reasoning (why is it yes, or why is it no)?

I have already searched related questions here, but none of them seem to answer this.

EDIT: I screwed up when I asked this! I just added the text in italics "an atom with" above, which is what I had in mind from the start. Sorry.


texts: Clarify multimeter current reading range?

texts:
I'm a bit confused about the range on my multimeter. I have connected the multimeter to a 5V USB wall charger rated at 1.3A.

When I'm measuring voltage, everything makes sense. It shows a 1 for 200m and 2000m, and 4.98V for 20, 200, and 500.

I'm confused with the current range. When it's connected to the 10 range, it reads 1.33A.

However, if I connect it to the 200m setting, it reads 13.3. How does this make sense? Shouldn't the display read "1" because the current is greater than the range (200mA). Furthermore, the 20m setting reads 1.33, 2000u reads 133 and 200u reads 13.3.

What do these numbers mean in terms of units (apart from when it's connected on the 10A range)?


texts: Preserve a LED ON after the activation of a reed switch

texts:
I came across a simple circuit in which when a reed switch (which is normally closed) is activated then a LED is being turned on (the LED turns ON when the switch in closed as it is depicted in the schematic). Obviously the led is ON only when the magnet is away from the switch.

My question is how can the LED stay ON even when the magnet comes close to the switch after the first activation? I would like a solution without the use of a microcontroller.

In order to make things clear: If the magnet is next to the switch the LED is OFF. If the magnet goes away the LED is ON. As long as the magnet is away the LED is ON but I want the LED to remain ON even if the magnet comes back next to the switch as long as the switch has been activated once.

simulate this circuit – Schematic created using CircuitLab


texts: 7mm, low-cost, Linux-capable ARM SoC with stacked RAM?

texts:
I'm designing an ultraminiature monocopter drone that will transmit 720p, 30 FPS, MJPEG aerial video over 802.11n (UDP) and a high-gain antenna, to a laptop.

I've found camera modules that can already output each frame as a JPEG, doing the image compression on the sensor die.

And there are several wifi modules that are small enough (<= 18 mm x 12 mm) to fit that size constraint.

Placing components on both sides of the PCB, I am left about 7mm x 7mm for an ARM SoC to run the wifi stack.

I plan to install an embedded linux distro, and use it only for its network stack. Lots of module drivers can then be found at http://linuxwireless.org/en/users/Drivers

Sadly, I'm new to the embedded ARM world, so I am wondering if anyone with more ARM experience can please suggest an ARM SoC as close as possible to these criteria:

fast enough to run Linux wifi stack w/ payload throughput of 20 - 40 Mbps
<= 7mm x 7mm
stacked RAM die
MMU
two 4-bit SDIOs, including SPI support
USB host
GPIOs

If not all constraints can be met, then design advice on which constraints can be sacrificed would be appreciated. Thanks!


texts: How more accurate in practice will a STM32 become if we use HSE?

texts:
Everybody talking about that HSE (External crystall) is much better than internal RC-oscillator in a STM32 microcontroller. But how much better is it and how?

Is the ADC more accurate?
Are the timers more accurate?
Does the controller stand against more noise?
Will the ADC be more correct?

According to STM32F373CC, the accuracy of the internal RC-oscillator is -1% to 1% at 25C.
I don't know if that is good. If I measured at 100C and got 1% error. I think that is good.


texts:
What is the T1 and T2 setup called?

I'm sorry if the question is vague because that's how it was presented in the exercise


texts: SC16IS740IPW alternative - want DIP housing

texts:
I am working on Infrared receiver based on Vishay's TFBS4711 and I've added SC16IS740 Single UART with I2C-bus/SPI interface for simplyfing communication with Vishay's IR transciever. Now, I am working on this subproject in Altium, and therefore I've varianted the PCB to through-hole and smd variant (for the sake of learning Altium and testing purposes of PCB once it is finished - through-hole variant will be used) and I cannot find alternative to SC16IS740, which resides in DIP/DIL housing. I've been searching on internet for about a week, without results, can someone help me.

P.S.: I am aware this is rather stupid question on the verge of downvoting, but I am getting simply desperate!


texts: ADC amplifier gain dependence on microcontroller operating voltage

texts: I was just curious about how dependent the gain of an internal ADC amplifier of a microcontroller is on the supply voltage? The variation I was thinking is 3.3V instead of the values given at 3V. The microcontroller I am using is the MSP430F427A (datasheet here, user's guide here. The value I am looking at is SD16GAINx = 32 on page 29 of the datasheet.


texts: Why is there a 0R resistor linking GND and AGND in analog voltage reference circuit?

texts:
This is related to another question I've just posted (What's the purpose of a ferrite bead inductor on this circuit?), regarding the battery charger described in the AVR450 Application Note - Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries, which one day I hope to build.

On page 40, there's a schematic showing the MCU connections (picture below). Marked in red is a 0Ω resistor that is puzzling me. I suspect that it is just a wire jumper linking AGND and GND. But I don't understand why there's a jumper there.

My questions:

What does the jumper represent?
Why are AGND and GND separated like that?


texts: Power HC-SR04 from microcontroller pin and MOSFET

texts:
simulate this circuit – Schematic created using CircuitLab

I'm working on a proximity sensor for my garage, and I'm using a HC-SR04 ultrasonic sensor to measure distance. The microcontroller I'm using to control it all is a PIC16F88. I have a first version that's working perfectly fine, the distance is accurate and consistent.

However, I am planning on powering the project from a battery (not sure what kind of battery yet), and so I'd like to reduce the power consumption as much as possible. In idle state, the distance sensor draws about 3mA, which is too much. I started modifying the project to use the sleep mode of the PIC, this part is working fine.

I am now trying to power the HC-SR04 from a pin of the PIC, and a MOSFET (2N7000). I have the sensor wired as follows:

Vcc: +5V
Trig: Output pin of the PIC
Echo: Input pin of the PIC
Gnd: Drain of MOSFET

The MOSFET is wired as:

Drain: Gnd pin of the HC-SR04
Source: Gnd of the circuit
Gate: Output pin of the PIC

The logic of my C program is the following:

Apply logic level 1 to the gate of the MOSFET
Measure distance
Apply logic level 0 to the gate of the MOSFET
Put the PIC to sleep for a little bit (about 500ms)
Repeat

The problem is that the distances measured are not consistent at all. It seems to vary around the correct distance, but goes 10 to 20 centimeters above and below the actual distance. If I connect the gate of the MOSFET to +5V, then it works perfectly fine and I have consistent, correct distances. I tried waiting for up to 500ms after setting the gate to +5V before measuring the distance but it didn't fix it.

Have someone experienced something similar, or has an idea what I could try to power the HC-SR04 this way?

Thank you for your help!


texts: simulate a thyristor triggered load having a RC branch

texts:
In the following picture you have a simulation to figure out the voltage on a Thyristor triggered load. The current of triggering on the thyristor gate is 300 mA. What I am looking for is a signal on the load which should provide no voltage on the negative half-wave, while on the positive half-wave a load triggering from a proper instant of time (when the gate reaches 300 mA) up to the time in which the Thyristor changes its polarity.
The real behavior (blue line), only vaguely resembles what I expect. I think I should have to properly choise the right values of resistances and capacity. I guess that could be done by properly choise

the impedance on the RC branch
the constant of time of the two resistances in series with the capacitor

but I really could not figure out a set of resistances and capacitans values for which the system should properly work.
Could you help me to understand how to choise these values, please?


texts: how do I put this schematic into a breadboard?

texts:
I need for a project to make an electrical dice in a PCB, but first I need to prove the design in a breadboard, I really don't understand all the schematic, so I need a huge help on this. Specifically, I don't know where is the trimmer, and how to plug the PAL22V10.

The schematic:

(Click the image for the full size version)


texts: how to Get a high output every third high input

texts:
I'm trying to get a logic circuit that will input high after 3 high inputs from a single source. I have tried using flip flops but the system activates closer to every 2nd input instead of every 3rd. could it be that im not using enough flip flops in the circuit ?
also it stays high for longer than i would like. could I please get some advice on how to fix these issues ?


texts: How to make the code run only on interrupt?

texts:
I have the following code which is supposed to count the number of interrupts on pin P3.2 (external interrupt) and display it on UART. But this code is doing exactly opposite of it i.e. it's running when the interrupt doesn't occur (count gets incremented when there is no interrupt and count stops when there is an interrupt). Any advice on it on where I'm going wrong ? I'm using P89LV52RD2 micro controller. Thanks in advance!

#include<reg51.h>
#include<stdio.h>
#include<stdlib.h>

/* function prototypes */
void delay(unsigned int ms);
void putc1( chr);
void windspeed_read( void);
void initialize(void);
void record_wind(unsigned char c);
void puts1(char* p);
void send_data();

// global variables declared
unsigned char buf[1]={0},*ptr;
int c=0,i=0;

/* delay function to create a delay of 1 sec */
void delay(const unsigned int ms)
{
 unsigned int x;
 unsigned int y;
 for (x = 0; x < ms; x++)
 {
 for (y = 0; y <= 113; y++)
 ;
 }
}

void puts1(char* p)
{
 char *temp = p;          /*temp pointer so that the actual pointer is not displaced */
 while(*temp != 0x00)
 {
  putc1(*temp);
  temp++;
 }
}

/* function to detect the wind speed */
void windspeed_read( void ) interrupt 0
{
EA=0;
c = c+1;
sprintf(buf,"%d",c);
EA=1;
}

/*init the TIMER and etc*/
void initialize()
{
 SCON  = 0x50;   /*SCON: mode 1, 8-bit UART, enable receive      */
 TMOD |= 0x20;   /*TMOD: timer 1, mode 2, 8-bit                  */
 TH1   = 0xFD;   /*TH1:  for 9600 baud                           */
 TR1   = 1;      /*TR1:  timer 1 run                             */
}

/* to print the character in UART and serial window*/
void putc1(chr)
{
    initialize();
  SBUF = chr;
  while(TI==0);            /*Wait until the character is completely sent */
  TI=0;                   /*Reset the flag */
}

/* main function */
void main()
{
initialize();
IE = 0x81;
EX0 = 1;
while(1)
{
send_data();
delay(100000);
}
}

void send_data()
{

sprintf(buf,"%d",c);
ptr = buf;
P2 = buf[0];
puts1(ptr);
}

Here is the link for the data sheet of microcontroller I'm using.


texts: How to read data from slave device using i2c?

texts:
I am trying to read cell voltage 1 value with CRC over i2c. I am using bq76942 EVM(BMS) module as my slave device. Following is the code I am using :

The CRC I am getting through response is 0x45.
But, the correct CRC value is 0x2B according to the CRC function.

For the second byte of data, the response value is 0x23 which is correct. Any help will be appreciated.

Datasheet Please see page number 76.


texts: Creating a basic ab + a'c circuit on a breadboard, how are the inputs placed?

texts:
I am supposed to design my first circuit on a breadboard and the output will be defined by the logical formula:
ab + a'c

The problem is I don't understand how are the inputs placed, a b c as inputs are three connections to the main power souce? or what?

I tried to test a simpler circuit:
a+b

But my simulation doesn't light the led. Can someone tell me why is this wrong?


texts:
I am trying to understand the mechanism and characteristics of Weidmuller surge arresters for control and measurement signals.Wiemuller has presented two types of surge arresters for such signals: VSSC4 and VSSC6. But there's something kinda basic about these surge arresters that makes me confused.

I can't get what is the third line in VSS6 for?
Here is the data sheets and photos of these 2 arresters.
http://catalog.weidmueller.com/procat/Product.jsp;jsessionid=5CE47B92400AB638C2D6EBC242B522DE?productId=(%5b1063730000%5d)&page=Product

http://catalog.weidmueller.com/procat/Product.jsp;jsessionid=5CE47B92400AB638C2D6EBC242B522DE?productId=(%5b1064170000%5d)&page=Product


texts: How do op-amp output add to/substract from the input voltage in postive/negative feedback?

texts:
Unlike for current, I don't understand how voltages add up or cancel each other.

simulate this circuit – Schematic created using CircuitLab

With negative feedback, Vout will try to make V- and V+ equal but 'taking away' or 'adding' voltage to the inverting input.

You have this essential equation for op-amp:
$$V_{out}=A_0(V_+-V_-)$$
Because the output is connected to the inverting input, you now have:
$$V_{out}=A_0(V_+fV_{out})$$

$V_{out}$ can be less of more than $V_{-}$.But my question is how does Vout does take away or add to the V- to make it equal to V+.


texts:
Well I was just wondering, a capacitor is made of 2 metallic plates separated by insulating material. During the charging of the capacitor electrons flow towards the opposite direction the battery's electric field.

The electrons flow through the insulator at a very very slow speed causing some of the charge, which was supposed to be stored, to be lost?

More specifically the electrons from the metallic plate which accepts the electrons start to flow ( more slowly) and it shouldn't be negatively charged.


texts: Having trouble determining circuit purpose

texts:
My apologies if this is the wrong section.

I am having trouble trying to determine the purpose of circuit. As in, what would this circuit be useful for, if it was installed in a logic board.

The circuit is as follows:

simulate this circuit – Schematic created using CircuitLab

I believe that the truth table is as follows:

I will admit that this problem is based on previous exam papers the lecturer has set, but I can't seem to find an answer anywhere.

Any help would be gratefully appreciated.


texts: How to determine whether I need ESD protection? (MOSFET H-Bridge)

texts:
I am designing a H-Bridge using IRLZ44N MOSFETs, IR2104 driver ICs and UF5401 diodes.

The current circuit looks like this:

It will be used on a battery powered device, so no real grounding available, the casing will be plastic or close to nothing.

The only place a human could touch is the motor terminals and the power connector.

I have read in many questions that proper ESD protection is very important and such components are very sensitive, but even so I am confused as most H-bridge tutorials don't include anything about being ESD-safe.

TL;DR: Do I need additional protection for the average use case with these components?


texts: Webcams and Nanos. Cabling and interference advice sought

texts:
4no. USB webcam, 2MP modules into a Jetson Nano.
The cameras are to be positioned between 7 and 14 metres from the Nano. The cables will be fed through conduit together.

Distance:

Would you advise USB extensions, hubs or ethernet?

Would the webcams work with USB to Cat6 cable converters, (ethernet cable used as extension for these distances) with no appreciable loss in quality? is it that simple?

Interference:

Is interference between the cables likely, and can I mitigate against?


texts: Will optocoupler work if I use 4.7 k resistance to limit the current to the input of optocoupler from logic supply 3V

texts:
I am giving 3.3 V input to the optocoupler from my MCU and using 4.7 kΩ resistance in series to the input of the optocoupler will it work?

R1 = 4.7 kΩ
R2 = 4.7 kΩ
Optocoupler: PC817
Vcc = 5 V
CTR: MIN. 50% at If = 5 mA
Vce = 5 V


texts:
I'm currently learning electronics and I have some difficulties to understand capacitors in direct current circuit. I read a lot on it and I understand the basic principle but I don't understand why I should use one.

I made a small circuit:

A 9V battery, a capacitor, a resistance and a LED. When I plug the battery, the LED lights few milliseconds and then stops lighting when the capacitor is charged. If I plug the capacitor in another circuit composed of a resistance and a LED, OK, the capacitor discharges itself and the LED lights a few milliseconds...

The good thing is that I understand why it happens and it was what I expected but... I don't understand how a component that blocks current once it is charged could be useful. I guess that alone, a capacitor is not overly useful, I guess its utility comes with other components...

Could someone enlighten me a bit by explaining me a basic circuit where the capacitor is mandatory?


texts: what is the transformation ratio of squirrel cage Machine?

texts:
typically Induction machine also called rotating transformer so what is the ratio of stator numbers of turns to rotor number of turns (from the design point of view i.e we can't directly measure secondary voltage) ?

what is the number of effective rotor(cage) turns ?


texts: How to determine required voltage of a lightbulb

texts:
I have a bulb here that has no markings except it says 25 watts, I just wanted to know what voltage does it need to power up. Our standard voltage here is 220 V, I tried plugging it on a 110 V transformer and it powered up.

Is there any way I could determine if it could take 220 V?


texts: Temperature specificiations on MOSFET Safe Operating Area

texts:
Here's a SOA graph:

What I don't fully understand is the notes area at the bottom:

  *Notes:

  Tc=25°C
  Tj=150°C
  Single pulse

Every MOSFET datasheet seems to have a similar set of notes, where Tc (case temperature) is 25°C, and Tj (die temperature) is the maximum operating temperature.

However, it seems unrealistic to keep the case at 25°C--how would I determine the safe operating area, for example, a situation where the case temperature is 60°C?


texts: Finding the Voltage source function when the function of voltage across inductor is given in SPICE

texts:
My circuit contains a voltage source in series with an inductor and a resistor. I am given the voltage function across the inductor. How to I get the voltage function across the source from this using SPICE?

Here is a circuit diagram regarding the same. The voltage function across the inductor is given as:

1V for 0

0V otherwise


texts:
I know this is a commonly asked question but most of the answers I got are more than 5 years ago.
So basically, my friend found a ATX power supply and was going to give it to me. Since I already have a power supply for my computer, I planned on turning it into an overpowered bench power supply. It has 1x 3V3, 1x 5V, 2x 12V and a -12V. It also have a writing in the corner v2.2. [That's what he said.]
Also, I was going to turn the 2nd 12V into a power source for my to-be-created DC soldering station. So it's going to be a DIY bench power supply + soldering station hybrid.
Can anyone tell me anything about the minimum load for each rail?
I found something on the internet that it needs 10ohms on the 5V. So that's 500mA. I also found that it needs 2-4A on the 5V rail as the minimum load. Almost all threads are contradicting each other so I felt I need to ask a new question.


texts: Can’t seem to solder vertical plug mount USB C connector

texts:
I’m trying to re-mount a vertical style USB C connector, but I can’t seem to make a strong physical connection. After soldering, the connector comes off fairly easily.
Upon closer inspection, there seems to be some silver-colored metal on the copper mount points that doesn’t appear to be solder (I tried melting it and nothing happened). I’m not sure if it’s safe to scrape off, but willing to try.

But before I do that, I’m wondering if there’s a better way that I’m not familiar with, such as some kind of adhesive? When I inspect the other three functional ports, it doesn’t really look like solder was originally used (also, the metal plugs aren’t long enough to reach the other side, so there’s no solder on the other end either, as you can see with the two sets of four copper holes in a square pattern).

This is for an LG 27MD5KA for anyone else with the same issue.


texts: How to Determine a PCB's Power Requirements?

texts:
Disclaimer: I have very little (almost none, really) electronics experience.

I purchased a set of IR illuminator boards off of eBay. The only information that the seller provided was that the board had an operating voltage of 12 VDC and that the board has a built-in auto protection circuit that prevents damage from high voltage.

I have two questions. One directly related to this PCB, and one general:

How can I figure out how much current these boards will draw?
Suppose the seller omitted the required voltage information. How would I go about figuring out how much juice a certain board needs without frying it?

The board in question is sold by a lot of eBay sellers. Here's one listing with decent pictures.

EDIT: Thanks for your answers everyone; you were all helpful.


texts: Can AC current be switched using SPST EM-relay controlling "live" wire alone?

texts:
Perhaps the most fundamental question of the day, but here goes.

Assuming that I wish to switch (ON/OFF) 3 AC loads, using EM-relay, can a SPST EM-relay (or appropriate rating) be used where only the "live" AC-wire undergoes make/break under microcontroller control, but "neutral" isn't switched ? Or, is it that for AC, we must use a DPST EM-replay only and both "live" and "neutral" must be switched ?

Here is a highly simplified schematic of what I am trying to achieve using the SPST EM-relays. There is a single AC source (230VAC, 50Hz - India), and the 3 AC loads are actually a bunch of 'Christmas Rice-lights', i.e. each AC-load is actually 4-5 rice-light set. Idea is to switch them under microcontroller logic. Nothing novel, perhaps done a zillion times, but first time that I am trying!


texts: What to consider when come to value of capacitor selection for C2

texts:
For the circuit below, noticed the bypass capacitor C2 will pull down the amplified voltage if the reactance is too big but the node voltage R7, R8 and base of Q2 will increase on the other hand if using too small reactance, the voltage drop at node R7, R8 and Q2 will increase but the amplified signal will decrease.

So do we consider formulae below in obtaining to suitable capacitor?
on the 1st stage amplifier Q1, the gain will be

$$A_v=\frac{R_3||X_{c2}+(R_7||R_8||\beta_{Q2}(X_{c3}+r_{eQ2}'))}{450}$$
Then by voltage divider rule the node voltage R7,R8 and base of Q2 will be
$$V_{output}=A_v(Vin)(\frac{(R_7||R_8||\beta_{Q2}(X_{c3}+r_{eQ2})}{(R_7||R_8||\beta_{Q2}(X_{c3}+r_{eQ2})+X_{c2}})$$
Finding $$\frac{dV_{output}}{dC2}=0$$ to obtain the value of C?


texts: LMR62421 Boost converter short circuit issues

texts:
I simply don't know what I'm doing wrong... I'm trying to use LMR62421 boost converter (schematic) and I'm trying to boost Li-Po battery voltage levels to 9V. I just copied the schematic from example from datasheet and created the PCB, and getting short circuit problems when I connect my PSU. When PSU is not connected and I go through circuit with my DMM I cannot find a short...

I've highlighted rather ugly looking connection in red circle just to clarify this ugly soldering job...