11

Here's a graph I quickly threw together with Excel. Does it look at all familiar? Maybe just a little like your last scope capture? That's because this is what you get when you sample a 13kHz sine wave at 44.41kHz. What you're seeing is exactly what you should expect to see. What you're definitely not seeing there is aliasing. When you only sample 3 or 4 ...


5

You don't need either the 10K or the diode. The gate is insulated and provided you stay within the Vgs voltage rating, driving it higher than the source will have no ill effects. Some MOSFETs have gate protection zeners gate to source, but that's calculated into the maximum Vgs rating. Most are rated for at least 8V. Just make sure your MOSFET is guaranteed ...


5

When you write if REG & 0x10 you're checking whether bit 4 of the register REG is set. If the value of REG is 0x30, then bit 4 is set, and you should do the thing you want to do when bit 4 is set. If the value of the REG is 0x20 then bit 4 isn't set, so you shouldn't do the thing you want to do when bit 4 is set. And that's exactly the behavior you get ...


3

Rule of thumb: Use & when you care about individual bits and only those bits. Use == when you care about the whole value of a variable. You can of course also use & to check a whole variable against a mask, and in that case it is almost equivalent to ==. Except & returns either zero or a non-zero value, while == always returns either 0 or 1. ...


3

The Arduino analogRead takes 100 microseconds per read. That limits you to a sampling rate under 10kHz. You will never reach your intended 20kHz sampling rate. The Serial.println takes time. Since you are using it in your sampling loop, it makes the time between samples longer. You will never reach the Arduino's theoretical 10kHz sampling rate. The Due ...


2

Look here: - The most obvious problem is that the enable pin (EN) is floating. Try connecting it to Vin as per the data sheet: - Other potential issues? Why haven't you got 220 uF on the output like the data sheet suggests? What output voltage are you trying to achieve? What is SW1 all about? Why haven't you got the recommended input capacitance?


2

In a word - filtering. In 2 words - brickwall filter. brhans is on to something when he answered, When you only sample 3 or 4 points for every cycle of the sine wave, you're never going to be able to just push those samples out of a DAC and expect to see something resembling that original sine wave. but he's wrong. What you're seeing is an output which has ...


1

The resolution in volts is the reference voltage of the analog to digital converter (ADC) divided by the number of counts from the ADC. The input voltage of the signal isn't involved. Given a 10 bit ADC (1024 counts) and a 5V reference voltage for the ADC, the voltage resolution is 5V/1024 = 4.8828125 millivolts per count. Your input signal of maximum 1V ...


1

Generally agree with Spehro answer. Where multiple DC supplies are involved, consider what happens when one or other is not active. Since your schematic is incomplete, we cannot guess. Also consider the turn-on condition of the PMOS driver. In most microcontrollers, GPIO pins default power-up condition is to be high-impedance input, not output. So the MOSfet'...


1

Use a relay. simulate this circuit – Schematic created using CircuitLab Figure 1. A possible circuit. The relay separates your 3-phase from your 3.3 V Raspberry Pi circuit making it a safe system.


1

A 2 channel SPDT Relay Board, activated by 2 micro-controller outputs, could do that. Should remote operation be required, a 2 channel SPDT RF relay board, with companion remote, could be used.


1

The notation S5, S8, and S9 are times that are shown elsewhere in a table. S5 looks like the Clock to output data transition time. There are both minimum and maximum times. S8 is the data setup time for the receiver. S9 is the data hold time for the receiver. What you describe as a "Gaussian distribution arrow" are just arrows indicating the times ...


1

You are mixing two completely different things. Writing data to the register makes it shift out, so there is data available for transmission. The data is shifted out by using the clock signal. The devices must operate with the clock so that they have a chance to see stable data, i.e. if the master update the data on falling edge of the clock, the slave must ...


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