Raspberry PI hasn't native analog input, but there exist many device that can help to solve this problem. One is the ADS 1115, an 16bit 4 channel low power analog digital converter that dialogs with the board through the I2C protocol.
I choose Windows IOT as operative system and POWER-KI as development enviroment. It is still little known, but very powerful to quickly develop IOT application, and not only that, even with remotable and cloned interfaces.
All you need is freely downloadable from www.powerberry.tech site. Only for Windows IOT, you have to go on the official website of Microsoft, but on powerberry.tech there are provided all references to freely obtain the operating system from Redmond.
Once you have installed Windows IOT on your micro SD and added PowerBerry (it is a simply copy of files to a folder, as explained on the site), you can add my application, named pwb-DVC-ADS1115, that must be copied to c:\DATA\PWK-PRG\powerberry\
.
The app is handled through PowerBerry. After you start the system, you can connect from your PC, using the “POWER-KI ES Loc” desktop icon. To have this command you need to have installed the free development eviroment POWER-KI on your PC, or simply its GUI (this is very small, less than 5 MB).
Clicking on the icon, it should appear the main screen of PowerBerry.
This may be preceded by a board selection screen to choose the Raspberry to connect with, but just in case you have more Raspberry with PowerBerry installed on.
The PowerBerry main screen shows the list of applications on your micro SD, among which there should be out pwb-DVC-ADS1115. Select it and click the LAUNCH button that appears to the right. When the application status change to ONLINE, you can connect with the CONNECT button, that appears when the app is ready.
Pressing CONNECT, it appears the main screen.
In this page you can read the analog input pressing READ, although it is likely that first need to configure the device.
At the bottom there are tho buttons: TERMINATE, to stop the app execution, and SETUP to configure it. You can also simply close the interface by pressing the dot in the upper right: in this case the app keeps running on Raspberry.
By pressing SETUP, the setting screen appears.
The settings are specific for the device and you should read the datasheet for better specifics. You have to consider that the setting, in the image, permits you to acquire an analog reading from the input A0, using the device ground as referral.
Pressing SAVE, it's possibile to save the changes and return to the main page, where to acquire the first value.
Comments
Please log in or sign up to comment.