Hardware Hack: Pandora RUMBLE Edition


The vibration is really good and goes through the whole case. The motor can be operated with the values ~50 - 255 in /sys/class/leds/pandora::keypad_bl/brightness.
Does that actually change the amount of vibration? I know the power LED is at 100% brightness at about 54 or so (and 55-255 don't make it any brighter) so I'm just wondering if this is the same and the motor only works when getting 100% power. I know you can control motors with a PWM in general but I wonder if the motor is attempting to draw more power at lower values than the PWM can produce. If so, maybe we can find a different motor, or perhaps soldering it to one of the spare LED pads on the top of the board might make more sense. In any event, an excellent experiment and something that can probably be recommended for the P2 :D

The video (actually the audio) demonstrates that there are certainly different amounts of vibration, because at higher values the sound has a higher pitch.


As for the script vs library: library would be better, calling scripts has some overhead (forking a process, loading bash, etc) which may not be a good idea if you want get good performance and low latency.
 
Nicely done! Welcome to the KB_BL Abusers Club ;-)


I wonder how this will develop. I mean with support in apps.


Soon we might need dedicated HW hacks section :)
 
If you get a phone call your Pandora can do some vibrations and play music.


Maybe bluetooth allows such stuff :) .
 
The vibration is really good and goes through the whole case. The motor can be operated with the values ~50 - 255 in /sys/class/leds/pandora::keypad_bl/brightness.
Does that actually change the amount of vibration? I know the power LED is at 100% brightness at about 54 or so (and 55-255 don't make it any brighter) so I'm just wondering if this is the same and the motor only works when getting 100% power. I know you can control motors with a PWM in general but I wonder if the motor is attempting to draw more power at lower values than the PWM can produce. If so, maybe we can find a different motor, or perhaps soldering it to one of the spare LED pads on the top of the board might make more sense. In any event, an excellent experiment and something that can probably be recommended for the P2 :D

Yes, as the LED has a resistor, that takes away current over a certain limit, it won't go any brighter. Here is no resistor and the motor needs a certain current to start at all.


It starts with a value of 50 and gets faster until 255 are reached.
 
If only I had time to build some proper 3G stick as I tols you on Gamescom.


That phone stuff would be really nice with vibration :) .
 
Just added support to rRootage.


It will vibrate, if you use a bomb and when you destroy a Boss.


Very fun.


If anybody wants to add rumble, too.


Here is a pnd:


http://mcobit.openpa...tage_rumble.pnd


Of course this needs to be started as root, else it won't do anything ;)
 
Last edited by a moderator:
Nicely done! Welcome to the KB_BL Abusers Club ;-)


I wonder how this will develop. I mean with support in apps.


Soon we might need dedicated HW hacks section :)

We had such a section on gp32x but not here :(


Maybe a hw switch to choose between rumble and light would be good.
 
Oh come now.. no one thought of floppy-disk-grind -> rumble yet?


Come now, C64, Amiga, Atari ST, atari 8bit.. we demand satisfaction ;)


jeff
 
Yes, as the LED has a resistor, that takes away current over a certain limit, it won't go any brighter. Here is no resistor and the motor needs a certain current to start at all.


It starts with a value of 50 and gets faster until 255 are reached.
PWM doesn't vary current, it pulses voltage. The LED requires a resistor to limit the current, otherwise you'd risk blowing out the LED and the shorting the battery with unregulated current; a motor is its own resistor, so it doesn't need such a limiter. The fact that it doesn't start until 50 means the aggregate voltage is too low below 50 to turn the motor. If you used a constant voltage, you'd probably see it needed at least 0.7 volts to turn as well. There are motors that have lower voltage requirement to get a fuller range, or a P2 which intentionally takes advantage of such a feature could have the driver modified to scale the values differently, starting with a value of 1 actually being 50 or something.


Regardless, this was my mistake, the LEDs (or more specifically the PWM that MWeston selected for the Pandora) are variable through the full 0-255 spectrum, it's the LCD backlight which maxes out at 54 (a different module than the one installed on the Pandora). I should have checked that instead of letting myself get all confused.


I didn't even realize there was a video, something screwy going on with my browser methinks. :p Would've saved some face. ;)
 
Well, this is a quote from MWeston's Hackerguide:

PWM control is available in the Linux kernel which can be used to
set the LED current from zero to the maximum value set by the


external resistors.

Also, there is less voltage if the current is lower and less current, if the voltage is lower ;)


Edit: Also I measured the motor with my benchsupply first, so I know, that it starts at about 1 V.
 
Last edited by a moderator:
I don't feel confident enough to try this myself (I'm too clumsy), but it seems to be a nice little feature for the Pandora 2. Not just for games by the way: it could also be useful in an alarm clock application (when you carry it in your pocket and want it to be silent and/or noticeable in noisy environments) or for any kind of notification (e.g. incoming mail/message/internet phone call).
 
This is as easy as it can be as a hack.


You don't even need to take the boardnout of the case to do it and soldering 4 points to a small cable isn't hard at all.


But I understand, that some people might even hesitate to open their Pandora at all.


As I never wrote a lib for such stuff, I will wait with that until there is more demand.


The bashscriptsolution works great though without any slowdown in rRootage.
 
I would not hesitate to hop in rumble hack. What holds me back is that I would possibly have to mangle with my existing LED cable which could lead to opening the lid case again which in my case always led to either damaging the case or LCD cable. I have some spare cases now but don't want to replace LCD cable again :-D


Yes, switch between LED and vibro would be necessary for me and that could be placed in this lanyard hole (it's inner cube which would have to go away). Hmmm ... I'm really tempted but for me it's attractive as the notification feature only, btw good point _wb_. Gaming rumble is not what I miss.


But is it even possible to invoke any scripts when the Pandora is standby mode?
 
Not in suspend mode afaik, but you can have wakeup events or you can wake up from time to time to check if something new is there and go back to sleep, if not.


Edit: Maybe even led and motor are possible. Blink the led and vibrate when there is new mail :)
 
Last edited by a moderator:
Yay, I like how all those ideas are iterated and grow, heading into unexpected directions and realms :-D


Wakeup events? Have to investigate in this!


Blinking in some specific pattern (i.e. waves from side to side every X seconds) with inbuilt LEDs might be optimal.


Btw, mcobit, is the bottom left corner of your screen cracked?
 
Yes, it is cracked, as mentioned in the first post.


It is only the touchscreen tough. The LCD itself is in tact. I cannot use the touchscreen atm, but don't have the money for a replacement either.


Will have to wait until I can order a new screen...
 
Here is a example for a script (small_hit.sh)



Code:
#!/bin/bash

echo 200 > "/sys/class/leds/pandora::keypad_bl/brightness"

sleep 0.1

echo 0 > "/sys/class/leds/pandora::keypad_bl/brightness"



You can call this in your program like this:





Code:
system("sh small_hit.sh &");


it will rumble for 0.1s with a force of 200.


The value can reach from 50 to 255 with this motor.
 
Last edited by a moderator:
Cool, apparently the PWM being used does have a "vibrator control driver". Uses a variable voltage, constant current drive, bunch of useful features. It's probably not wired to anything, or if it is it's probably used for something else (MWeston would have to chime in on that) but at least it's there and people actually wanting such a feature definitely encourages making it available to hackers in the P2.
 
If this could be accessed on the current board, this would just be great.


Can we maybe use it with a gpio and direct current from the battery?
 
Back
Top