Stefanica Matei-Costin, 331CB
Brief presentation of the project:
What I want to achieve with this project is a device that is small enough to fit into a pocket, costs less than 50 euro (the average ebook reader price is ~150 euro) and allows the user to read any book, as long as it can be stored on an SD card. The target is to create a MVP, but if all goes well I will also try using a battery and I hope to have at least 12 hours autonomy.
In the middle of the project it the ATmega328P Xplained mini, which will be the brain of everything. Using SPI, it will communicate with a MicroSD Card Adapter to extract from the MicroSD card the book in byte chunks. Also using SPI it will send the information to the Display for the user to see. On the other hand, I want the device to be as easy to be used as possible, so the Display will also have an autorotate feature, for which I will use a gyroscope that will communicate with the uC using I2C. For the user experience side of the project I will also use a few buttons that will be used to navigate the book and a some other options and settings, as well as a buzzer, used to make a sound similar to the one of pages turned.
After I encountered the Hardware issues described down below, I am now using Arduino Uno R3 instead of ATmega328P Xplained mini and ST7735 instead of the original ILI one
Details regarding the hardware implementation:
A diagram of all the HW involved can be seen in the following diagram:
The user will turn on the device and will see the current page of the current book. He will be able to press one of the Next or Prev buttons to turn pages and will hear an audio feedback (one for valid and one for invalid page turns). The user will also be able to press the Menu button, that will save his progress and take him to the menu screen, where he will be able to navigate through books and choose the one he wants to read. Thanks to the MPU6050 sensor and its accelerometer, the device will be able to detect its spatial orientation and autorotate if being held in different positions.
| Module Pin | Connected To | Notes |
|---|---|---|
| VCC | 5V | Power supply |
| GND | GND | Common ground |
| CS | D9 | Chip Select |
| RST | D8 | Display reset |
| D/C | D7 | Data / Command |
| MOSI | D11 | SPI MOSI |
| MISO | D12 | SPI MISO |
| SCK | D13 | SPI Clock |
| LED | 3.3V | Backlight |
| Button Pin | Connected To |
|---|---|
| 1.r | D6 |
| 2.l | GND |
| Button Pin | Connected To |
|---|---|
| 1.r | D2 |
| 2.l | GND |
| Button Pin | Connected To |
|---|---|
| 1.r | D4 |
| 2.l | GND |
| Module Pin | Connected To | Notes |
|---|---|---|
| CS | D10 | Chip Select |
| SCK | D13 | SPI Clock |
| DO | D12 | SPI MISO |
| DI | D11 | SPI MOSI |
| VCC | 5V | Power supply |
| GND | GND | Common ground |
| Sensor Pin | Connected To | Notes |
|---|---|---|
| VCC | 5V | Power supply |
| GND | GND | Common ground |
| SDA | A4 | I2C Data |
| SCL | A5 | I2C Clock |
| AD0 | GND | I2C address configuration |
| Buzzer Pin | Connected To |
|---|---|
| 1 | GND |
| 2 | D3 |
For the most part, the project is similar to the schematic. The only different piece is the lcd, which is not an ST7735. I have also soldered the buttons to a protoboard, as can be seen in the following image
In the beginning, I used PlatformIO, but as I mentioned in the Journal, that caused some issues with the SPI of the MicroSD card (not sure why), so I switched over to ArduinoIDE. In my project, as can be seen, I have implemented functionalities from those labs: L0(GPIO), L1(USART), L4(ADC), L5(SPI) and L6(I2C). Initially, I planned to also implement some of the functionalities using registers, not higher level libraries, but as my project would be what I could called 'Software oriented', this task would have made the code almost impossible to debug and understand(Neither was this a requirement for the final grade). I used the following libraries:
One issue I encountered multiple times was the lack of RAM, as Atmega328P only has 2KB of it, so you can fill it out quite easily. The first time I encountered this issue was while prototyping the project on Wokwi. That's where I also found out that an easy way to move strings from RAM to the Flash memory is by using the `F` prefix before them, so you will see that a lot in my code.
The device has 2 operating modes: reading mode and menu mode. It uses the SD card to store the books (in .txt format) and store the progress of the reading. It stores the current page for all the books the user has stored on the SD card.
It is worth mentioning that most of (if not all) of the components I used are chinese fakes, not original components, therefore the values I have extracted from the datasheets may not be really accurate.
total 41.2mA
I_avg = (100mA * 0.1s + 1mA * 29.9s) / 30s = 1.33mA
I will consider that the buzzer consumes too little current to be taken into consideration
Total = 41.2mA + 20mA + 1.33mA + 5mA = 67.53mA
Even though I did not have enough time to also implement a battery, the one I would have used would have been a Li-Po 1000 mAh type battery. The one i intended to use is 2.5 x 62 x 58 mm, so it is also small enough for the purpose of this project.
Autononomy = 14.8 hours
Despite the fact I don't even have a battery, I want to specify some of the improvements I believe would have been useful for achieving a longer battery life:
I encountered numerous Hardware issues:
Therefore, I lost a lot of time trying to understand why things did not go as expected, so I lost precious time. Because of this, I will not be able to also integrate a power supply or 3D model the case, as I have planned a few weeks back
13.05.2026