Eco-friendly hardware hacking with android
summary
Uses a regular Android phone/tablet plus plain Java and an OTG adapter to control scrap hardware no firmware just Java and USB OTG keyboard LED via control transfer — writes to endpoint 0 (HID set_report) to toggle keyboard LEDs, measures roughly 1 kHz signal (≈2000 API calls/sec for on+off) but with jitter, adds a scavenged optocoupler for galvanic isolation and drives an ATX PS_ON line to switch 12 V to a motor, digital inputs come from keyboard matrix scan codes, and the build works with caveats about charging and noise.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:11Code in Movies
- 0:33Super Heroes
- 1:53mission
- 3:35Choices, choices...
- 4:55LEDs in common USB scraps
- 5:39And the winner is.
- 7:09OTG Adapter (make or buy)
- 10:20The software side
- 11:47The missing endpoint
- 14:227.2.2 SET REPORT
- 15:16For LEDs / Keyboards
- 16:03Sending the report
- 17:02Sketch of the code
- 23:36Kill the noise
- 24:58Conclusions from detour
- 27:41The ubiquitous optoisolator
- 28:33A small step forward
- 28:49A level of indirection...
- 29:48ATX is your best friend
- 30:11ATX starts in stand-by
- 32:46What about inputs??
- 33:22Relevant code
- 35:35Missing galvanic isolation!
- 36:26Charging while in host mode
- 37:57May or may not work for you
related talks
24mLearning How Android Controls Hardware via GPIO
19mAgile hardware development (as an Android dev)
24mLearning How Android Controls Hardware via GPIO
27mPrinted Circuit Boards and Android: A Love Story Between Two Engineering Disciplines
25mProbably Not Scary: Android and Hardware
51mDiY Android Kiosks: Turning a Raspberry Pi into a Modular Workhorse
39mThese are a few of my favourite (Android) Things
29mBuilding Industrial-Grade RFID Systems with Android and Ko…
