Skip to main content
16 votes
Accepted

How to deal with signed int overflows

Clearing up some misunderstandings will probably help. First, your data is a 16-bit value. There's no "overflows" and "actual data" -- the 16 bits are just divided into two 8-bit pieces (bytes). To ...
Adam Haun's user avatar
  • 22.3k
15 votes
Accepted

Convert VAh to kWh

You need to know the power factor, which is highly depedant on your application. Then you simply use this formula: $$ P = S * PF $$ where ...
Christian's user avatar
  • 1,283
11 votes
Accepted

Why high impedance source in ADC input causes error?

A simple model to show how an ADC behaves is this: simulate this circuit – Schematic created using CircuitLab There, you have a source (\$V_{\text{Analog}}\$) and its impedance (\$R_{\text{...
Big6's user avatar
  • 5,764
11 votes

In digital systems do we discretize both time and magnitude or only time?

An analog signal that is sampled is called a discrete-time signal. An analog signal that is quantized is a discrete-valued signal. A signal that is discrete in time and amplitude is called a ...
Mario's user avatar
  • 8,235
10 votes

Converting 3V3 PWM to 5V analog

simulate this circuit – Schematic created using CircuitLab The 74HCT1G125 buffers and level-shifts the 3.3V to 5V (Vdd should be +5) and the RC filter converts the 5V PWM to analog with a sub-mV ...
Spehro 'speff' Pefhany's user avatar
9 votes
Accepted

Can I convert to less AC volts to get more amps?

Assuming no losses, yes. 120V x 10A is 1200W. This could be converted to 12V x 100A, or 24V x 50A, or any other similar combination. However, losses do enter into it, as do maximum current ratings, ...
bitsmack's user avatar
  • 17k
9 votes

Can I convert to less AC volts to get more amps?

Energy must be conserved. You cannot get out more than you put in. Assuming you are having a constant power draw, the power in is going to equal the power out. Therefore, [Amps in] x [Volts in] = [...
dpdt's user avatar
  • 1,728
9 votes

Converting 3V3 PWM to 5V analog

simulate this circuit – Schematic created using CircuitLab the conversion is not perfectly linear, but this improves the more that R2 has higher resistance than R1. M1 is some mosfet that ...
Jasen  Слава Україні's user avatar
7 votes
Accepted

Decimal conversion of a 32-bit hexadecimal number

First convert it to binary: 0001 1011 0000 1000 1100 0010 0010 1011 Then map it to its fields: ...
jonk's user avatar
  • 78.5k
7 votes

Reading internal temperature sensor STM32

Like PeterJ pointed out, the first flaw is that you have to set the ADC_CCR_TSVREFE bit and not reset it. I've no idea how you set the sample and hold time, but I ...
Arsenal's user avatar
  • 17.9k
7 votes
Accepted

How can I tell what amperage a 12V rated electrical device will run at 5V?

From the datasheet: The table in the datasheet specifies the module resistance to be 1.9 to 2.3 Ohms. it gives a ball park figure. I say ball park figure because the current cannot be predicted ...
User323693's user avatar
  • 9,351
6 votes

What value to use to convert ADC value to voltage?

Ignoring the harsh reality of the performance of ADCs which can be cheaply built into MCUs, in the ideal case each output count represents a possible well-defined range of input voltages. Here is an ...
Spehro 'speff' Pefhany's user avatar
6 votes
Accepted

How convert kWh to W

If something uses N kWh in a 30-day month, has an average consumption of $$N \frac{1000\text{ W/kW}}{720\text{ h/month}}\text{ watts}$$ In other words, to convert "energy" to "power", divide by "...
Dave Tweed's user avatar
  • 177k
6 votes

How convert kWh to W

If energy consumption in one month is 305kWh the mean (i.e. average) power consumption during that month is \$\frac{305kWh}{30 \times 24h}=\frac{305000}{720}W\approx 423W\$ (assuming a 30 day month).
Curd's user avatar
  • 16.4k
6 votes

Inductor Symbol? What does this symbol indicate?

The symbol represents a common mode choke. They look like these: (Source) There are SMD versions as well. They are used to block common mode noise i.e. noise incident on both lines of power supply. ...
Whiskeyjack's user avatar
  • 8,379
6 votes

Converting 3V3 PWM to 5V analog

Since there is 5V supply available, one solution would be to use a logic gate to convert 3.3V PWM signal to 5V PWM signal, and then RC filter the 5V PWM signal to analog with the requirement of the ...
Justme's user avatar
  • 165k
6 votes

Converting square wave into a sine wave

But a square wave is already a sine wave. Or to be more precise it is a infinite sum of sine waves. Just feed the output of the square wave to a filter which will cutoff all the unnecessary ...
Jun Seo-He's user avatar
6 votes
Accepted

Scaling DAC voltage to smaller range for controlling gate of transistor

As your load is the gate of a FET, so very high resistance, it's appropriate to simply use a resistive divider here. Three resistors and a 5 V reference, possibly available from your DAC circuit, will ...
Neil_UK's user avatar
  • 171k
5 votes

In digital systems do we discretize both time and magnitude or only time?

The answer depends on what you are doing. A sample and hold circuit will sample the analog signal at discrete time points, hence converting to digital in only the time (X) axis. An analog-to-...
OneOf6inMD's user avatar
5 votes

How to deal with signed int overflows

You're over-complicating this. ...
brhans's user avatar
  • 14.8k
5 votes
Accepted

Mathematical conversion of hex to decimal

The number appears to be encoded as a fixed point similar to Q1.30 Q-format by Texas Instruments If you take the 0x26dd3b6a and divide it by ...
Martin Vana's user avatar
4 votes

Convert VAh to kWh

You can’t convert them. All you know is that the actual power(’s absolute value) is ≤ the apparent power. The actual power might be 0 (purely inductive or capacitive load) or negative (if you are ...
user2233709's user avatar
  • 1,745
4 votes

Systemverilog to Verilog translation

I recently released an open source tool for converting SystemVerilog to Verilog. It covers many of the differences highlighted by the other answer. Check it out at https://github.com/zachjs/sv2v.
zachjs's user avatar
  • 141
4 votes
Accepted

Convert ps/2 to usb using ttl to usb converter

I have a ttl(V G tx rx) to usb converter too. Can i use this converter to connecting my keyboard to USB port? No. What about RS232/RS485 to USB converter? Can i use that to this convertion and ...
SamGibson's user avatar
  • 18.3k
4 votes

How can I convert a VGA signal to work with an old CRT monitor

From the nomenclature describing its inputs, and the ancient jack, and having a CRT display, am guessing that this accepts video from long ago. Long ago, video with NTSC timing format was very common. ...
glen_geek's user avatar
  • 27k
4 votes

Reading internal temperature sensor STM32

// Disable Vbat signal from input channel and wake up temp sensor from power down mode ADC->CCR &= ~(ADC_CCR_TSVREFE); It actually right opposite :) ...
0___________'s user avatar
  • 2,594
4 votes
Accepted

Need advice on power supply for a device in India purchased from USA

First of all, what says on the cable has very little to do with anything. You didn't buy it for the cable. From the manual: Power Supply Voltage 100 – 240 V AC +/-10%, 50/60 So you just need ...
pipe's user avatar
  • 14.5k
4 votes

Why not produce household electricity with natural gas generator?

Considering the investment for the generator, its maintenance, etc, the only way this would be viable would be to use cogeneration. This means using the waste heat from the generator to heat your home ...
bobflux's user avatar
  • 80.3k
4 votes

How to deal with signed int overflows

The most likely explanation for why one byte seems random and one is changing linearly is that the linear byte is the higher order byte (the overflows). The lower order byte appears random because it ...
user57037's user avatar
  • 29.4k

Only top scored, non community-wiki answers of a minimum length are eligible