Category Archives: raspberry pi

Oculus Rift DK2 on a Raspberry Pi3: towards untethered VR.

I’ve been long dreaming of connecting these to important technologies and run them in way that I actually understand. I’m not good at Android programming (for those cardbox VRs) and not really good at Unity (although that would be fun to dive deeper) and somehow my driver situation with the DK2 and windows 10 deteriorated.

There have been earlier attempts to run the Oculus on a Pi, but in my eyes the latest iteration I found is the most fitting to me (including Python bindings and 3d libraries).

So recently, I came across Wayne Keenan’s blog how actually did exactly what I’m dreaming of, namely to run the DK2 controlled by the Pi3. I’m not so much interested in maximising the complexity of geometry in VR but really more in the interaction design and what untethered VR (or even AR) can actually feel like.

His github recipe really works nicely, and so the installation was really a matter of 30min:

Pi3, DK2 and mini keyboard

Continue reading

my first self-made usb plug

for trashbot 6 i planned to change the arduino nano into a raspberry pi 2. i also moved the board below the hips as luckily, the three mgr 996 servos of the hip are as wide as the raspberry pi:

raspberry pi 2 and the hip servos

but as you can see on the lower left (where the edimax wifi plug is inserted), the usb ports are pretty much flush with the outer servos, i.e. the attached legs will not leave too much space for usb plugs. Continue reading

trashbot 6, quick video walk through

most of this work has been done over christmas, but only now i found the time to at least do a quick tour around the bot. here are some highlights:

  • arduino nano changed to raspberry pi 2 & wifi
  • moved controller from back to hips
  • added 16 channel i2c servo controller
  • new foot construction adding an additional degree of freedom (DoF)
  • reconstructed legs that are lighter and now take up new batteries
  • power distribution board including i2c current / voltage measurement
  • accelerometer and gyro sensor (i2c) moved to “belly” instead of neck
  • added arms with shoulders (two DoF)
  • changed spine, reduced complexity
  • removed head for now (being redesigned)

Babble Pi vs Jimmy Fallon

So, here’s BabblePi’s software: CMU Sphinx running in a phoneme detection mode, i.e. it is not recognising text or words, but really phonemes (transcriptions of speech sounds). It is then speaking this sequence back using espeak again running in phoneme mode:

So when we’re looking at BabblePi and how it is listening and repeating words and sentences, we see that Continue reading

slaughtering external USB batteries to keep robots alive

current discussions are revolving around when and not whether ai will supercede us human beings. i learned the following lesson: we need to slaughter for them first! it’s about batteries, power!

after my last research on different options to power the raspberry pi, i wanted to invest some time into the external usb batteries that power our phones when we’re out and about.

it’s actually hard to find people who have invested time to decompose such devices but i actually think, it’s worthwhile because you learn a lot. so in this case i invested some time into two batteries to learn how easy / complicated it is to get to the innards: a little 2600mAh battery and a 4000mAh battery both i received as gifts on conventions (thanks techniker krankenkasse and telefonica germany!)

i haven’t documented the blood, sweat and tears process when applying both smart and raw power to the devices, but the 2600mAh by the techniker krankenkasse seems to be a first generation of the anker device i found on amazon.  the second one was really a b*tch. here is the end result:

usb battery power supplies slaughtered

one the left is what i really love mechanically, you just unscrew the cap and get the innards out. SO NICE! however, Continue reading

Smart powering the Raspberry Pi using batteries

I’m looking for options how to power the Raspberry Pi using batteries for my Babble Pi project. Actually, it seems that it’s not as simple as I thought to find something and many solutions are also pretty extensive for their feature sets. I’m looking for a couple of features:

  • power the Pi from battery
  • charge the battery
  • shutdown when the battery is low
  • in order to do this, monitor the battery and ideally access the data using Python
  • ideally power up the Pi using the solution (it’s a pain in the butt that you can power down the Pi but now up)
  • possibly power it up using a RTC (real time clock)

I’m not really happy with all the external batteries for smartphones. They certainly can be charged and also deliver constant voltage for the Pi, but they are usually in some enclosures and they don’t communicate.

I haven’t found any extensive list of solutions out there so I researched one myself, additions VERY welcome!

https://pi.gate.ac.uk/pages/mopi.html
DC/DC converter (TPS5430 or TPS5430) with the ability monitor the voltage level via I2C and a python lib. It also has a shut-down button and can power up the Pi with the same button. You can add two batteries for hot swap or even a battery and a solar cell. It won’t charge the batteries, though. Price 35.50€

http://www.piups.net/
Can control and monitor voltage. Seems more like a UPS, not so much the concept of powering the Pi via battery (i.e. battery kicks in whenever the primary power source fails), but I’m not sure as they are not talking about the primary source. Furthermore, it can also charge batteries, but it can’t power up the Pi. It uses I2C for communication like the MoPi. Price: 29.99€

https://www.adafruit.com/products/1944
adafruit power converter is boosting your 3.7V lipo to 5.2V using a TPS61090 boost converter from TI. It also can charge your lipo which is very nice, however no level monitor and no power options for switching on/off your Pi. Price for 500mA: 13.37 Euro

https://www.adafruit.com/products/2465
PowerBoost 1000C can charge your battery while powering your Pi, pretty cool. The 500C can’t charge while powering, as far as I understand. Price for 1000mA: 17.84 Euro

https://www.piborg.org/battborg
DC/DC converter based on OKI78SR that turns many power sources to 5V. It’s not charging the battery and can’t monitor the voltage level. Also, it can’t shutdown the Pi. Pretty expensive for the features, esp when you consider the next solution. Price: 20.65€

http://hobbyking.com/hobbyking/store/__54275__HobbyKing_8482_Micro_UBEC_3A_5v.html
A battery is loosing voltage when powering a computer. However, the Pi has a quite limited range of voltage (4.75V and 5.25V) where it runs stable compared to Arduinos (7-12V). A simple UBEC (Universal Battery Elimination Circuit) I also use for my Arduino projects to power my servos with constant voltage. Simply constant voltage, nothing else. Price: 3.28€

https://www.adafruit.com/products/904
Using the INA219 current monitor, you can monitor your voltage via I2C on the Pi. No charging, no power supply, but possibly in combination with the UBEC from hobby king above at least the Pi can know when the battery’s gonna be empty and power down gracefully. Or I could imagine that you hook it up the PowerBoost charger to have charging, powering and monitoring. Finally, we’d need powering up again. Price: 8.90 Euro

https://www.kickstarter.com/projects/shahiddarbar/raspberry-pi-case-with-real-time-clock-battery-and
This is an unsuccessful Kickstarter campain that wanted to combine UPS, a real time clock and monitoring. I’m not sure it would also allow for charging the battery.

 

In sum, I think, there is still not the perfect solution out there, I like the simple UBEC in conjunction with other parts so I can build the perfect system myself, possibly also the PiUPS (which doesn’t really seem to be a UPS but really an intelligent battery solution).

Any systems I forgot? Any other features you’re dreaming of?

power consumption of the rapsberry pi and the sound board

okay, i have a samsung charger for the first 10.1 inch tablet they had, usb 5.0v, 2.0a. the analyzer however shows 5.37v when nothing is connected. i think that this is even above the rasperry pi’s spec / acceptable voltage, but i have a 1.5m amazon (“premium”) usb cable and i assume that the voltage drops along the way to a non-lethal level.

i’ve connected the edimax wifi usb plug and a tiny mouse and an external, laptop sized mini-keyboard as well as a 7 inch hdmi display (touch controller not connected):

raspberry pi setup with keyboard, mouse and display

raspberry pi setup with keyboard, mouse and display

during boot up and seeking the wifi connectivity, the pi draws 0.33a. same after booting to the linux terminal.

next up: adding my sound board, but only the amplifier connected though the 5v rail of the pi’s gpio. the loudspeaker does a slight whizzing sound, but not hearable from 40cm away. the pi now draws 0.36a after booting when the pi isn’t playing a sound. phew! first boot with the sound board connected survived, so it seems that the wiring is ok or at least not destroying the pi 😀

okay, so i soldered a cut-off usb plug from a recycled old memory stick to the usb edge connector of the prototyping board and plugged it into the last free usb port of the pi.

sound card connected via home made usb cable

sound card connected via home made usb cable

after boot up, the amp meter shows 0.38a and after a while (linux working background?) it settles around 0.40a, which to me means that the sound card actually is connected decently on the power side.

linux command  aplay -l actually lists one usb audio device, yay!

second thing i notice is that there is a acoustic feedback loop when i turn up the volume without playing a sound. interestingly, the power consumption also goes up to 0.57a and the little rainbow colored square appears on the screen (indicating that power supply is shakey afaik).

and now the final test for today:

arecord -D plughw:0,0 -f cd ./test.wav  followed by
aplay ./test.wav