View Single Post
Posts: 20 | Thanked: 18 times | Joined on Sep 2009 @ Valencia (Spain)
#144
Originally Posted by TemeV View Post
Even the most low power microcontroller doesn't match even near the current consumption of the TCA8424 and like. With mobile devices energy preservation means everything.

And if I understand correctly, you don't have to use TCA8424 as I2C HID device, you can use it like any other I2C device. Just read the data after the interrupt line goes up.

I don't actually understand how using a microcontroller would be easier. You'd then have to write a custom driver for sailfish, which would be a same amount of trouble as writing a driver for TCA8424.

If the I2C HID driver appears to be too difficult task and custom driver is not tempting, e.g. ADP5588 has a linux driver available.

IMO using a microcontroller for this kind of task does not make sense.
Yes, I agree with the statement that a microcontroller requires more power. But I prepared some numbers and the results are interesting.

TCxxx requires only up to 70uA @ 3.3V 1 MHz. Very good.

Now, we can elect some ultra-low power microcontroller of the ARM Corte-M family.
For example, a bit old ST's STM32L100C6 that has 32KB of flash ROM and 4 KB of RAM, 2 I2C, DAC, ADC, USB, SPI, UART, RTC, LCD DRIVER, TOUCH SENSING, ...

http://www.st.com/web/en/catalog/mmc/FM141/SC1544

-Run mode @0.5MHz, 150 uA
-Assuming a well designed firmware, you can sleep the micro and awake for scanning the keyboard. I estimated around a rough 500 instructions for scanning completely the kbd.
-This is around 2 ms of work, including awake and return to sleep.
-Now, assume that you scan the kbd at 50 Hz rate. That is, every 20 ms.
-The remaining 18 ms (20-2), you can maintain the microcontroller in low-power mode.
-Low-power mode: 9 uA

-In average the requirements are: (2*150) + (18*9) = 23 uA

These numbers are only for the CPU. You need to add the current drain of the powered peripherals: I2C, GPIO, ... so I estimated around 200 uA of draining in the worst case. Excellent for the kind of power supply of a smartphone.

But you can do better thing. Put the micro in Stop mode and awake it when the keyboard is opened:
-Stop mode: 0.6 uA far better than the TCA.

So, numbers shine for microcontrollers. And possibilities also: 2 I2C, DAC, ADC, USB, SPI, UART, RTC, LCD DRIVER, TOUCH SENSING, ...

I have experience with USB-HID on microcontrollers, so I2C HID should be easy.

In any case, I think the ST's micro is not adequate here, it'a a hell soldering it by hand.

An interesting thing using a microcontroller, the M7 coprocessor inside the iPhone 5S is a simple Cortex-M3 from NXP.

The only problem for putting this working is that I have no money for buying a Jolla. I will continue with my belowed N900.

Regards,
Àngel
 

The Following 4 Users Say Thank You to aperles For This Useful Post: