Saturday 6 February 2016

Updates

(1) Raspberry Pi case & Kodi
      (1a) Make shift case


Once day I went to school to watch Star Wars, and only brought my RPi with me. So I transported it in this case (originally a case for cards). Used tissue to keep it from moving around. Decided to get a proper case. 


      (1b) Perm case


I have decided that one of my Pis will seat permanently beside my monitor. This case will hold it. I will use it to watch movies and also host PiHole (an ad blocking tech that I recently learnt about, will post more when I implement it). I pasted the heat sinks (not necessary but for the "cool" factor), and it has a fan too.


       (1c) Failed travel/holding case




This is a second case I bought, it was really cheap, just under $3. Was planning to use this for a travel case (to hold my second pi when moving around) but after I got it I realized you can only securely close it by using screws. Not suitable for the purpose I intended it for; will sell it off. 




        (1d) Kodi



Tried out all the players I wrote about in my previous post, I like Kodi the best. However I also like playing videos using the terminal command in Rasbian. Here I was powering the Pi using an external charger.

(2) SUMOBOT!
      
A friend who visited Silicon Valley got this for free and passed it to me. After I got it, I went to search Youtube and watch some videos about Sumbot competitions. Basically who of them are placed in a circle, and they are supposed to push the other out. How exciting! The board however is BASIC Stamp, which is coded in STAMP, which I don't really like (I find writing code for the Arduino a faster and more intuitive process).

And just my luck, a few days later I was walking by the school of EEE (Electrical and Electronic Engineering) , and saw a poster for a Sumbot competition! The registration deadline was over but I called the number and managed to weasel my way in (they needed a few people to top up one or two teams). Most people in the competition are from EEE or REP (Renaissance Engineering Programme). I'm the only one from Mech. Good news is that we will be using the Arduino Uno! It is supposed to be fully autonomous. What I was not expecting, however, was that we were supposed to build the whole bot ourselves (I was under the impression everyone would start off from the same base and do modifications. I could use the one my friend gave me, but in the spirit of fairness I shall build one as well. Sure this will take longer, but would probably be fun. Will dedicate a post to it after the competition ends. 




(3) Google Cardboard

 
Finally bought it. Virtual Reality for those who virtually have no money (Copyright pending). Lol jk.



It was really fun to assemble. 


Unfortunately this one did not come with the NFC tag to launch the app (I bought a really cheap one from China, as usual). I tried it on, and for some reason Google apps (the samples and Youtube) seems to not be in focus. However third party games are working perfectly. I would have to try and rectify this problem when I have the time, because I really wish to use this for Youtube videos as well. Games can keep you occupied for only so long. 




(3) Misc
      (3a) Repaired the washing Machine


So my washing machine was not working, it kept beeping after drawing water. I spent an hour fiddling at the back and searching online for solutions. Needless to say, the washing machine hackers community is pretty much non existent. However the few forums that did exist, were pretty helpful in informing me of common problems, which helped me narrow down the problem.

Finally I decided to open the control panel. The circuit board is protected from water using some very thick wax like substance. I realized there was a catch under the lid, which was empty. Realizing it was probably used to hold a sensor which indicated if the lid was open or closed, I went to Google again and realized it was a case of a missing <strike>sensor</strike> magnet. After unsuccessfully trying to find a strong magnet around the house, I asked my mom and she said she found one in the wash. It turned out to be the one which had fell off (not sure why I didn't think of where it went earlier, guess the excitement of finding a replacement got the better of me). I fixed it on the inside of the control panel this time, instead of under the lid, so now the machine can run without having the lid down (not a very useful feature, I admit, but at least the magnet won't be going anywhere anymore).



      (3b) Purchases


Bought a 2.5" HD case, so now I won't have to switch around. 


I didn't buy this, but it was a gift from the friend who visited Silicon Valley and got it from Facebook's gift shop. Facebook HQ. Who knows, maybe MZ had glanced at it before? Haha. 


      (3c) Autonomous Car

I have a project to do this semester, which should be about sensors and one of the themes given is future mobility. I have decided to expand upon my internship knowledge and build an almost fully autonomous car. And by car I mean I am going to use the chassis of a big but cheap RC car. Now this is a difficult project, so I hope I would be able to complete it in time. Will dedicate a post to it once I am done. 

Wednesday 30 December 2015

RPi for watching movies.

So I brought to watch Star Wars and has agreed to watch the other movies. Tomorrow we are going to watch Episode 4 and 5, but since it is New Year Eve, I do not want to carry my laptop to school. So I downloaded a MKV 1080 (the format the movies are in) sample and booted up the Pi.

I couldn't find a video player so had to search online to see if it had one. Only two players work well, Omxplayer and XBMC player (both use hardware accelerated GPU). Omxplayer comes preinstalled but has to be launched with the terminal, simply by typing omxplaer file.mvk. Before that I would recommend typing oxmplayer -h to see a list of options (especially if you want audio through the HDMI).

When I typed omxplayer -h, I learned that omxplayer is sort of a test bed for the XBMC player.
Opon more reading, I found out there are three (popular) versions of XBMX players for the RPi;  Raspbmc/OSMC (newer version is called OSMC), OpenElec, and XBian.

Raspmc is simply Raspberry with XBMC, OpenElec is simply XBMC (no full OS under the hood) and Xbian is XMBC built upon Raspbian, making it in between Raspmc and OpenElec.

OpenElec boots the fastest, Raspmc the slowest, and Xbian is in the middle (note: boot time. Performance is the same for video play back.) Same for amount of space needed for OS, with Raspmc being the most, and OpenElec the least. One interesting thing to note however, is that Xbian receives updates much faster and more frequently than Raspmc. 

Conclusion: Xbian seems to be in between and perfect, if you have a spare memory card lying around. I shall give it a shot.

Thursday 24 December 2015

Updates; Hackathon, purchases, Kali Linux, death of RPi B+

(1) Finally threw away my old CPU tower while cleaning up my room. Savaged the hard disk, power supply, two fans (sadly 12V), and some buttons.

(2)Bought a 27" monitor to replace my 20"

(3) Bought a HDMI switch. It only cost me $16 and makes life so convenient. No more plugging in and out wires. I set it up at home, one input is the computer, second is PS4, and last one is empty for now. Will purchase one more cable and attach it for my RPi.

(4) Took part in an experiment to find the threshold where a human wrist will no longer be able to differentiate between angles. The machine in question is pictured below. Had to wear modified goggles that ensure my vision was removed from the equation.


(5) So I bought this dongle as I wanted to try out Kali Linux on RPi 2. However once I set everything up and running, it turns out that the chip set does not support network monitoring, which is something quite essential for Kali. I did a search on chips that support it, and will go buy another one. Hopefully I can return this while at it.

 (6) One of my previous blogpost was about trying to read an old drive.
So I brought it home and manage to get it spinning but am still unable to read from it. I'm afraid it might be damaged. I will try again this weekend, last week I was very tired and sleepy so I decided to go to bed after I managed to get it spinning.

(7) Another purchase. Now not only will my siblings, dad, and I no longer have to "fight" for the favourite charging spot (beside the computer), but I can also use it to power the RPi.

(8) My brother gave me this, which he got from a trip to SP. Thanks for the spare parts. 

(9) So I joined my second hackathon, DBS PayLah hackathon. It was in the first week of Dec and was 3 days of training followed by two days of hacking. Nights were not included, even for the 2 days. The training was basic HTML, CSS and JS, which I knew due to bootstrap. So I took to LyndaCampus and learned Ionic, which we used to develop our app. I also integrated the DBS PayLah API into our app. End of the way, we had a presentation and I'm glad to announce that we won first place! =D

(10) Someone I know is selling his B+ with power cable, case, and memory card for $30. It is a good deal at that price, but I'm not sure what I will do with another B+. The RPi2 is so much faster. Ever since I got it, I have been using it exclusively, swapping memory cards when I have to, and only touched my B+ yesterday, when I was at home and wanted to try out Kali (don't bother trying it on B+, use 2 instead). If I find a use for it (them) I guess I will buy it.

Tor relay? Guess I can consider this, relay only, no exit node.

Tor router? Sounds cool but I if I really needed so much privacy there are other ways to achieve it. Can't think of when I would need a tor router.

Rebuild or improve the arcade machine and leave it in it permanently? I think this sounds like the best idea, especially if I used a transparent/translucent box to house everything, possibly add on a fan or two.

I'm glad I booted up the B+ before committing to buy another and before the Zero came here.

Wednesday 16 December 2015

Saving the Nexus

Not a project per say but my phone had ended up spinning around in the washing machine for a few minutes and I needed it saved. I tried a method recommended by friends, keeping it in rice for a few days.


Unfortunately that didn't work so I decided to take matters into my own hands and open it up. I opened everything, used nail polish remover to clean some dirty parts and finally used a hair dryer to get everything dry.

There are some marks visible against white, but I believe that is just water under the screen that will eventually dry out.




Monday 9 November 2015

fired up NFC reader


So I went home and tried the Pi, it booted up just fine. So the HDMI-VGA adapter I have is the problem. Not sure if I should
(1) get a new one (not sure if it will work)
(2) get a small screen just for the Pi, about 5 or 7 inches, seems to sell for about 50sgd on DX.com
(3) get a new (and bigger) hdmi monitor :p
(4) just switch my monitor with the one at home
(5) get a new dongle and continue using SSH. This isn't ideal when I need to fire up the GUI as it isn't stable over SSH.

Anyways, photos.


Booting up the RPi

The NFC board did not indicate power so I realized I need to solder them (the bending for contact method did not work). 


Luckily I was at home and my soldering kit was available.


All soldered up. Did not do a very good job. Think I will buy a thinner solder as well. 


It now indicated power when connected to the RPi.



Here I have managed to recover the keys of a old NFC card I had lying around. 
I had some issues with installing this MFOC library. I will experiment more after the exams and explain in detail my issues when I do so.



Wednesday 4 November 2015

trying to fire up NFC

So I hooked up the NFC reader with my RPi2, to communicate with it over UART. I decided to try this before trying SPI/I2C with the Arduino, because this will give me more direct control. However I was unable to get my RPi to boot up. At first I thought it was a power supply issue (RPi was only drawing 30)mA, regardless of what was plugged in. Then I noticed that my phone was drawing 1.3A so it could not be an issue with the power supply. I checked online and by the behavior of the LEDs (the green blinks for a while before going off, red is on all the way), it is possibly booting up. As I do no have my Wifi dongle or a spare LAN wire with me, I could not check using the network. Then it hit me, it must be the HDMI-VGA causing the issue. Now this converter works with my laptop, but I do not recall it working with the RPi before. Probably cannot draw enough power from it? However it still does not explain why the RPi is only drawing 300mA, even without anything plugged in. I guess I will have to monitor or check online if that is its standby power requirements (at 5V).

Anyways, here are some photos.

The package

The bill

The goods, all sealed up. Good thing is that the bad is reusable. 

All the things it came with. at first I did not know what those two black things on the top left were for, but then I realized they were to switch between ON and OFF for two variables. 

Hooked up to the RPi2. I did not have my soldering kit in hall so I had to improvise. It was a little hard as not everything was spaced evenly (between different sectors).  I have bend the jumper wires to try and ensure contact but won't know until I fire up the RPi.

After trying everything and before packing everything into the box so that I can bring them home and try them on the HDMI monitor. Ignore my watch.

Friday 30 October 2015

To the skies...after some repairs

I bought these two spoil quadcopters on carousell. They cost me $18. I figured I can open them up to see how they tick for a low price. Plus, I'm sure not everything is spoil (like the RC controllers might be working). 




Here I have opened up one of them. The frame is surprisingly sturdy.


The motors being connected to the micro-controller.

The battery seems bloated. Might be why it isn't working.


I went to find out what the things written on the battery mean. the 300mAh is pretty standard.
15C, which I originally thought was optimal working temperature, turns out to be 15 capacity. This means it can be discharged at a maximum rate of 15 times its capacity. In this case, 4500mA (4.5A).
Also learned about multiple cells being grouped together in series(S notation), to increase voltage, and parallel (P notation), to increase capacity. The battery I have is a single cell.

Still trying to find out what the first line means (I suspect it is the 'model' number) and the last one (initially I thought it was date of manufacturing but then I saw a picture of a battery with 3 digits in the middle). Once I have done that, I can order replacements.

Edit: Asked a friend. He also thinks it is date of manufacturing. Also suggested that 752030 could be dimensions. Sounds legit.
Asked Reddit (r/diydrones) as well. Waiting to hear back.

Tuesday 20 October 2015

Absence and updates

It has been a long time since my last post and the reason for that is because I was involved in a start up! We taught computational thinking and I was the main Python instructor. Along the way I learned bootstrap and actually set up our website. A few pages are still not done. You can check it out here: www.thekrono.com.


So last week I met up with a friend to help him get his proximity sensor up and running with Arduino. Then I realized how much I missed working with Arduino. My own FYP is purely software(more on that in another post), so sadly I wont get to play with hardware.

I've decided to hold some Arduino workshops for Open Source Society, since so many people seem to need to learn Arduino. I will start on Sunday (trial class with friends) and then hold the first proper one on Thursday. I will be calling this series 'Tinkering Thursdays : Arduino 101'.

Meanwhile I have been eyeing a NFC card reader shied that works with Arduino and Raspberry Pi.
It is called 'PN532 NFC/RFID Controller Shield for Arduino'. I am wondering if I should get the original (will cost me 50-70) or a third party one from DX.com (will cost me 30). Will give an update on it once I have bought it and tried it out.

Tuesday 28 April 2015

2 Wheel Self Balancing Robot - Robot body

So there are three general components to this project:
1) Electronics hardware
2) Robot body
3) PID
4) Code  (other than PID)

I will be making more posts going into details about topics (1) (3) and (4).
For this post I will speak about the easiest part, part (2).

So by this point I had tested everything individually. Had to put it together then start tuning the PID. 


Got a battery holder from Sim Lim tower that could hold up to 8 * AA batteries. Thats a grand total of 12 possible Volts. 



I used solder to complete the circuit, since I was using less than the maximum number of batteries. 



Had ran out of wire so I just used jumper cable everywhere.

 Because I refused to pay $30 for the robot body kit, I had to improvise and build a body from things I had lying around. The major contributors were foam, zip ties and blue-tack. 


The final product.


This made me realize how much resources are at our disposal all around us; we just need to use our creativity. That's the reason why I classified this process as a major section of the project, although it was done in just a few hours. Currently I took this apart so that I could savage the foam and Arduino for other purposes, but I think over the summer I will revive it with a better body. Will take a video then and upload it.