[Project] E-Book Reader with A13-OLinuXino-MICRO and QT Framework

Started by lordlothar, January 09, 2013, 06:02:12 AM

Previous topic - Next topic

lordlothar

Hello people!

I am a student at University of Patras,Greece and I am currently working on my diploma thesis for my Electrical and Computer Engineering diploma. The subject of my thesis is the one on the thread title. I have opened this thread to present you my progress, so that I may be able to help and be helped by others with similar projects and to exchange further knowledge.

I am a newbie with Linux, so I am taking small steps at the moment. Of course any help is welcomed!

My plan is:

  • Getting A13 to boot correctly till root/password.
  • Find a suitable LCD touchscreen which fits A13 and make it work.
  • Develop an alpha version QT pdf viewer app on PC and cross-compile it for A13.
  • Find a suitable battery for A13.
  • Find an ADC in order to measure battery charge and display it on LCD.
  • (optional) Enable WiFi on A13 via external usb adapter, in order to download e-books from internet.
  • Put all parts together to end up with a final, working product.

Till now, I have not made a lot of progress. My aim is to complete the project by next summer (July 2013 actually).

So, here we go:
I have been able to complete step (1) with one pre-built microSD shipped from Olimex, but after I tried to dd the A13-MICRO Debian image from the wiki on the same microSD card (because it got corrupted), it hangs on 'Starting Kernel...'. I suspect it's due to a faulty microSD to usb adapter of mine, cause I have tried a lot - and I really mean A LOT of things... :P- to make it work, but with no success. I even built everything from zero - u-boot, kernel, modules as described in the wiki - but nothing worked. I will but tomorrow a new adapter and inform you about the results.

That's a first description of my work/plan. I know, it's not a lot, but as I don't have much time at the moment, I will stop here and continue tomorrow, or when I will have some more time. Feel free to ask my anything, I will try to update the thread as often as I can!

Have fun till then!

Update 1 (9/2/2013):
Well, exactly one month after my first post, I have returned to report some progress. First of all, I got a new A13-MICRO board, because the first one got stuck at u-boot loading after some time, due to burnt SY8008C(AA)C IC, which powers the RAM. I don't know how it burnt, but it seems it happened during the first-first boot, when I plugged in the power jack. Maybe some faulty SY8008C(AA)C IC/AC-DC converter/cable or something. I measured all voltages and the only not proper one was that of 1.1V instead of the 1.5V expected. Anyway, let's move on!

-Update Kernel to 3.4 and Enable Wifi-
So, the first thing I did with my new -working- board, was to build an updated version of linux kernel (3.4), following this helpful tutorial. Wifi on target is always useful when cross-compiling -actually is always useful no matter what-, so I also got myself busy with this. Unfortunately, it did not work out-of-the-box with my usb adapter (TP-LINK TL-WN821N) but wasn't complicated either, I had to enable experimental features during menuconfig of the kernel and also enable support for atheros wireless cards, based on AR9170 chipset. After that, I compiled my kernel and modules successfully and loaded the correct module (carl9170 actually) during kernel booting (vim /etc/modules and append carl9170 in file), in order to enable wifi. Finally, I followed step (2) described here to complete my wireless set-up and voila! After rebooting, wifi worked like a charm!

-Toolchain set-up for cross-compiling QT libraries-
Next step after working out numbers 1 and 5 of my starting plan, was setting up the toolchain and cross-compiling QT libraries to run some demos on A13-MICRO. For the first one, I followed these steps over here, under "Setting up Cross Compile Environment" section, except debootstrap installation. That easy, we have a working cross-compile environment. Watch out to use gnueabihf compilers, else you will have to properly adjust configurations for library linking on A13-MICRO (with hf you will also have better performance).

To be continued with QT and tslib cross-compiling procedure...

lordlothar

FAQ



  • Why did you choose A13-OLinuXino? Isn't Raspberry Pi or some-other-platform more powerful/cheaper?
    Maybe Raspberry Pi or some-other-platform is cheaper/more powerful/has larger community from A13, but A13 has some significant advantages which are actually mentioned here. As you can see, the big advantage of A13 is that it is open source, it can be the base of a final-commercial product, and I really don't think it is expensive for what it is offering! Also, I have found the schematics to be really well designed and helpful! But if you are reading this, you probably have an OLinuXino of your own, so there is not much to tell here!

  • Why did you choose A13-OLinuXino-MICRO over the other OLinuXino editions?
    That's a good question. First of all, I found that the iMX223-OLinuXino edition could not fulfill my purposes, as it can not drive any large resolution screens (don't forget we are trying to build an e-book reader here, it must have a decent resolution!) and does not have touchscreen support -actually that happens only on the LQFP edition, the BGA package has more features. So, I thought the best option was to go for A13. About the MICRO edition selection, I thought it was exactly what I needed: more powerful than iMX223, supports touch, enough RAM, easy-to-understand schematics due to lack of AXP209 chip and less usb ports,nice price, what else could I ask for?


jwischka

Quote from: lordlothar on January 09, 2013, 06:02:12 AM

  • Find an ADC in order to measure battery charge and display it on LCD.

How are you planning to do this, exactly? I assume you're thinking you'll use the ADC to measure the voltage, and then as the count goes down, you'll have a percentage (more or less). But ADC measurements assume a constant reference voltage, which won't be the case here, since you'll be powering it from a battery (whose voltage is the same, declining amount you're trying to measure).

Note: there are ways to do this, but I'm trying to see if you've thought of them :).



olimex

A13-MICRO is not best choice for handheld application with battery

A13-OLinuXino have AXP209 power managment chip, it will charge LiPo battery like https://www.olimex.com/Products/Power/BATTERY-LIPO1400mAh/ and will measure the voltage etc, also can run the A13 at lower speed to save power

MICRO is designed for lowest cost, A13 always run on maximum clock and hve no power saving and LiPo managment, please re-consider to move to A13-OLinuXino or A13-OLinuXino-WIFI

lordlothar

Quote from: olimex on January 09, 2013, 07:39:22 AM
A13-MICRO is not best choice for handheld application with battery

A13-OLinuXino have AXP209 power managment chip, it will charge LiPo battery like https://www.olimex.com/Products/Power/BATTERY-LIPO1400mAh/ and will measure the voltage etc, also can run the A13 at lower speed to save power

MICRO is designed for lowest cost, A13 always run on maximum clock and hve no power saving and LiPo managment, please re-consider to move to A13-OLinuXino or A13-OLinuXino-WIFI

Yes, I am aware of this, but the purpose of my project is to construct a pdf viewer for educational purposes, not a commercial product. So the simplest the hardware, the better. I will mention though that it can be improved via using AXP209 chip, but if I use A13-OLinuXino for development the circuit gets much,much more complicated, a thing I want to avoid! Thanks for answering though!

@jwischka
Yes, you seem to have a point about the ADC power voltage which I haven't thought yet :P. Will see, I hope I get that far so that I can starting thinking about this :).

Edit: Main problem atm is booting A13 board, as it still hangs at 'Starting Kernel...'. Tried 2 different microSD adapters, 2 different microSD cards, both dd and cross-compiling everything, still nothing!

jwischka

Can you post a list of the output from the console?

Have you tried compiling a "kitchen sink" A13 kernel that contains support for everything? If I recall, you also damaged your board the first time you plugged it in, correct? Do you happen to have a second board you can test?

lordlothar

Quote from: jwischka on January 09, 2013, 04:49:26 PM
Can you post a list of the output from the console?

Have you tried compiling a "kitchen sink" A13 kernel that contains support for everything? If I recall, you also damaged your board the first time you plugged it in, correct? Do you happen to have a second board you can test?

http://dpaste.com/867450/

I don't have a second board, though I don't think it is damaged, as I did everything correctly on the first boot.It just smoked a bit :P,do not know why, but seemed ok after this! I think it wouldn't boot at all if it was damaged...

lordlothar

Got some time past week and a new A13-Micro board, so I experimented with it a bit and made quite a progress. More on the updated first post!

lordlothar

Well this project took a bit longer to complete, yet it is not dead! I am currently writing my thesis, so I am going to update the first post when I am done with it, with more info. Till then, here is a small demo video of the e-book reader application running on A13-OlinuXino-MICRO:

https://www.youtube.com/watch?v=FxUoU3rQh_c

Some noticeable features:

  • Custom made A13-OlinuXino-MICRO to Friendly Arm 7" LCD breakout board
  • Custom made root FS using buildroot, including Qt libraries among others (~42 MB size)
  • Compiled kernel with custom made boot screen, for minimal resources usage (~1.6 MB size)
  • PWM driven LCD backlight adjustment
  • USB Mass Storage Support, like Android
  • Full 256MB RAM available, no memory reserved at all!
  • 3 sec boot-up time from poweroff
  • 5 MB RAM usage when no application is running
  • 30-50 MB RAM usage when e-book application is running
  • Custom designed portable power supply subsystem, not yet implemented

If there is demand, i will share whatever is needed. More details coming later!

JohnS

I reckon you'd be helping people if you provide sources and enough hints how to build them.  Various things you list have been mentioned in other threads, for example.  So if you've the time and are willing, go for it!

When you're done, Olimex may even be willing to host it - try asking them, they're quite approachable.

John

davidefa

I think this is great news. Could you share with us the details ( for ex: 3sec boot time, kernel with boot screen... )

Quote from: lordlothar on October 24, 2013, 10:09:51 AM
Well this project took a bit longer to complete, yet it is not dead! I am currently writing my thesis, so I am going to update the first post when I am done with it, with more info. Till then, here is a small demo video of the e-book reader application running on A13-OlinuXino-MICRO:

https://www.youtube.com/watch?v=FxUoU3rQh_c

Some noticeable features:

  • Custom made A13-OlinuXino-MICRO to Friendly Arm 7" LCD breakout board
  • Custom made root FS using buildroot, including Qt libraries among others (~42 MB size)
  • Compiled kernel with custom made boot screen, for minimal resources usage (~1.6 MB size)
  • PWM driven LCD backlight adjustment
  • USB Mass Storage Support, like Android
  • Full 256MB RAM available, no memory reserved at all!
  • 3 sec boot-up time from poweroff
  • 5 MB RAM usage when no application is running
  • 30-50 MB RAM usage when e-book application is running
  • Custom designed portable power supply subsystem, not yet implemented

If there is demand, i will share whatever is needed. More details coming later!

lordlothar

Quote from: davidefa on October 30, 2013, 01:12:21 PM
I think this is great news. Could you share with us the details ( for ex: 3sec boot time, kernel with boot screen... )

Of course, I can. But right now, my free time is quite limited, so it may take some days till I'll do this! As regards the boot time, I have included in the kernel only what is necessary for my system. More info in the future, sorry!

P.S: Filesystem is now even smaller, actually less than 30MB  ;).

lordlothar

Hello Everyone,

Guys, sorry for not updating the thread, but it has been a looong and busy year for me (fortunately!). I do not have much of free time, so I cannot guarantee any more updates for now if there is no further interest on this one (like from someone who could make use of this in a project or so).

Still, here is a link to my completed diploma thesis. I know it may be of not much use because it's written in Greek, but all the code is included with many pictures which describe the process and the results. Again, if this could help someone, I am more than willing to translate a part of it or explain it.

Cheers!