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 ...
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
...
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{...
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 ...
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 ...
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, ...
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] = [...
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 ...
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:
...
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 ...
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 ...
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 ...
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 "...
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).
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.
...
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 ...
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 ...
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 ...
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-...
5
votes
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 ...
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 ...
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.
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 ...
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. ...
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 :)
...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
conversion × 235voltage × 24
adc × 21
power-supply × 19
ac × 17
power × 16
dc × 15
analog × 10
binary × 10
arduino × 9
vhdl × 9
operational-amplifier × 8
batteries × 8
usb × 8
dc-dc-converter × 8
frequency × 8
microcontroller × 7
digital-logic × 7
transformer × 7
converter × 7
watts × 7
raspberry-pi × 6
signal × 6
resistance × 6
amperage × 6