2020-10-27 Ordered modules to play with:
- AZDelivery ADS1115 ADC Analog to Digital Converter 16bit 4-Channel Module (pack of 3)
- AZDelivery I2C 0.96-inch OLED Display SSD1306 128x64 Pixels IIC 3.3V 5V White Character Display
- AZDelivery MCP23017 16-bit Bidirectional I/O Port Expander I2C Serial Interface Module 2.7V - 5.5V (pack of 5)
- AZDelivery GY-521 MPU-6050 3 Axis Gyroscope and Accelerometer 6DOF Sensor Module 16 Bit ADC I2C(pack of 3)
- AZDelivery TXS0108E Logic Level Converter 8 Channel SPI 8 Way 3.3V 5V I2C IIC 8-Bit Bi-Directional Converter Module
- XLX MINI MCP4725 Module I2C DAC Breakout Development Board 2.7V to 5.5V Supply with EEPROM (pack of 5)
That should be enough to get on with. The level shifter is for interfacing to 5V devices.
2020-10-27 Setting up R-Pi with fresh installation of Raspbian on Micro-SD card.
Had some issues with this. Installed Raspbian and Kodi from the NOOBS card. After updating itself, Raspbian fails to boot, producing repetitive 4-flash sequence on green LED, indicating it cannot find the loader program. I used the Windows Raspbian disk-image creator, which produced an SD card that booted reliably.
Second issue is that my display (Dell) goes blank every few seconds. Google results suggest this is due to inadequate earthing of the monitor. It looks fine to me. Other results suggest changing the HDMI drive boost settings of the Pi.
I guessed that the USB PSU could not supply enough current, and thus the Pi failed while re-writing the card. I have replaced it with a bigger PSU. Swapped displays - my LG 2753EV does not blank.
2020-11-02 Set Locale Country and Keyboard to GB.
In Settings-->Configuration-->Interfaces tab, enable I2C and SPI.
Run Thonny IDE interface for Python. Ran the example program LED.py and this seemed to work.
Opening a console to run from the command line,
i2cdetect -y 1
returns a scan of devices like so:
0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
All seems ready to proceed. I2C devices cannot be plugged in while the Pi is running, so they must be connected to a bit of breadboard and connected first.
Looked around for existing software for the devices I bought. No point reinventing wheels! The manufacturers provide documentation and sometimes Pi Python code examples.
2020-11-03
Quick check of expected addresses, in case of conflicts. None apparent.
Addresses from https://learn.adafruit.com/i2c-addresses/the-list
010 0xxx = 2x = MCP23017 011 110x = 3C = SSD1306 100 10xx = 48 = ADS1115 110 0xxx = 60 = MCP4725 110 100x = 68 = MPU6050
2020-11-12
Googled for further information, there is plenty at Adafruit:
https://learn.adafruit.com/search?q=MCP23017
https://learn.adafruit.com/search?q=ADS1x15
https://learn.adafruit.com/search?q=SSD1306
https://learn.adafruit.com/search?q=MCP4725
https://learn.adafruit.com/search?q=MPU-6050
At this point there is not much I can add to this project that is not already on the web.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.