Bus Pirate Edu Kit Exercise no.5
From DP
Contents |
Overview
The Bus Pirate features and onboard voltmeter which can read signals up to 6.6 volts, at a resolution of ~7mV. To test it out we'll use a single turn potentiometer to generate a voltage which we'll read out using the Bus Pirate.
This exercise uses the 'd' and 'D' command which are the single and continuous voltage reads respectfully.
The potentiometer is a resistive electronic element which is in essence a variable voltage divider controlled through a mechanical nob.
The Circuit
Breadboard legend
| IC Location | Breadboard wiring legend | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
- The (+) and (-) next to PIN1 and PIN2 are intended for devices such as LEDs, where PIN1 should be the anode and connected to a higher potential then PIN2.
Bus Pirate Terminal
This exercise is pretty straight forward. You simply turn the potentiometer and read the voltage with the Bus Pirate.
HiZ>m<<<the mode command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>8<<<select the LCD mode
This mode requires an adapter
Ready
LCD>W<<<turn on the power supplies
POWER SUPPLIES ON
First we need to enter any mode, to enable the power supplies. We chose the LCD mode as it doesn't require any additional setup. Once you are in it you can turn on the power supplies with the 'W' command.
LCD>d<<<the single voltage probe read
VOLTAGE PROBE: 4.90V
To take a single reading from the ADC pin enter the 'd' command. The Bus Pirate will print out the read value in the format seen above.
LCD>d<<<the single voltage probe read
VOLTAGE PROBE: 2.32V
Now turn the potentiometer and read another value. You can do this as many times as you like.
LCD>D<<<the continuous voltage probe read
VOLTMETER MODE
Any key to exit
VOLTAGE PROBE: 3.69V
If you'd like to see the voltage change as you turn the potentiometer, you can enter the 'VOLTMETER MODE' using the 'D' command. To exit it simply hit any key.
LCD>m<<<the mode command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>1<<<select the HiZ mode
Ready
HiZ>
Once you've had enough you can shut down the Bus Pirate by entering again the HiZ mode.
