Saturday, 12 July 2014

RC Car - Part 2

If you haven't read it, you might want to read the first part of this weekend project.

I finally got the time to continue my RC Car project. This time my goal was to control the car from my laptop. Continuing from my last design, I tried to communicate with the car via radio frequency using nRF24 module. This was an easy task as we already made a chat app via radio frequency using the same module. I used an Arduino Nano to communicate serially with my laptop, then attached an nRF24 module to it.
Arduino Nano + nRF24 module
Then for the receiver (the car), I used Arduino Pro Mini (much cheaper than Arduino Nano) + nRF24 module. Then I attached it to an H Bridge module, L298N to control the motor so it can go forward and backward. H Bridge is a module that allows you to control high current voltage in or out of the circuit. For our project, it allowed me to control the motor to rotate clockwise or counterclockwise and allowed me to power the motor (which wasn't sufficiently powered via Arduino). Finally, I connected the H Bridge with the Arduino Pro Mini and two motors.

Oh! Almost forgot the battery. I connected them with the H Bridge since we needed its high current to flow to our motors.

From left to right: nRF24 module, Arduino Pro Mini, H Bridge, awesome chassis, and LiPo battery
The last piece was the code. From my Arduino Nano (the one connected with my laptop), I read 4 serial input: w, s, a, d (I know, I'm a gamer). Then I mapped each input to binary output, then sent it to the Arduino Pro Mini. The Arduino Pro Mini would then control the H Bridge and consequently control the motors.

InputWhat It DoesOutput
aTurn Left0110
dTurn Right1001
Anything elseStop0000

Finally, not so awesome demo:

My right (or left?) motor was broken after 2nd attempt so it wasn't spinning at all.

The project was depressing, but ultimately fun. If I were to continue this project, I would try throttling the speed of each motors for more stable movement and trying more sophisticated transport layer, Bluetooth. For now I'm just content that my design worked :)

Sunday, 22 June 2014

RC Car - Part 1

My friend and I were working on a weekend project. We have successfully made a chat app over radio frequency easily one weekend and decide to take the project one step ahead. Our goal was to remotely control an Arduino-brained car from the internet. The car will optionally have a live video camera that's going to be broadcasted to internet. The grand plan is something like this:

We use Arduino for the car because it's more energy efficient compared to Raspberry Pi. On the other hand we use Raspberry Pi to interface the car with internet because it's much easier to program, thus allowing us to rapidly iterate the code. Everything looks good, for now.

Problem With Connectivity

Then we realized that we might not be able to send the video over radio frequency because it's too slow. Fortunately, I have MRF24WB0MA WiFi module by AsyncLabs for our disposal. I tried to assemble it with Arduino Uno and program it with AsyncLabs' WiShield library.

It's... not working.

I tried to debug it for hours and found that it got stuck trying to execute DRV_STATE_START_CONN. Later on I found that the WiFi module is sending an unrecognizable byte: 14
Where are you "14"
To date I haven't found the solution. My ultimate goal is controlling the car, with or without the camera. But I'm still confused for why do the WiFi library fails for me. And I don't even know whether the camera will work with Arduino Nano. Will it have enough computing power? For now I'll give up on this one and probably fallback to Bluetooth for future work.

Problem With Power

Of course with my (kinda) Computer Science background I have close to zero knowledge in hardware (even though my FYP is hardware related). I unashamedly bought 15 motors from eBay, not knowing what are they for, what the working voltage is, what the required current is, what the torque is, or any hard stuff I don't even know what the meaning is. All I knew was: all motors are equal; give high voltage on one end and low voltage on the other one it will spin. I was half-wrong.

First I need wheels. I want to understand the physics behind a car as much as I can - and that's why I won't buy a ready-to-go Arduino Robot Chassis. My friend suggested an awesome solution. I "sew" this together:
Yes, those are bottle caps

I did a test run. I gave the motor a go by connecting it to my Arduino Nano. Then...

It is not strong enough

When I tried to press the wheel against a plane, the wheel was not spinning. I tried to connect the motor directly to battery. It was a lot faster than the last one. Still, it wasn't fast enough. Then I checked the documentation of the motor.

FOR HOLY GOD SAKE, it was an RC aircraft motor, not an RC car motor. And the working current is merely 0.03mA. I'm sure it's not even enough to cut a paper.

Fortunately I have some spare motors from Hubsan X4 quadcopter which seemed more reliable. I connected it directly to the battery - my hand could barely hold the motors. "Looks good," I thought. But when I tried to connect it to my Arduino, it was weak. Then I began to wonder.

What makes it slow on Arduino?

Apparently, Arduino pins only gives out 40mA of current. We might be able to increase the current output by serially combine the pins. But that's not a scalable solution. What if one day we need to power a monitor?

Then I consult the internet (which doesn't really help), then my friends. They suggested that I use transistor as a switch so the motors can be powered directly by the battery while allowing us to control the on-off logic using Arduino.

It worked! Finally, something worked. This weekend is not lost! Though I need new transistors because I just busted 3 of them.

That's for the first part of it. Hopefully we can finish this project. If you have similar experience please kindly leave comments and help us :)

Tuesday, 13 May 2014

Remaking of All Manga Mobile

Hi guys, it's been a while.

All Manga Mobile has beed suspended for almost forever and I'm super busy with life that I don't have the time to manage it. Since I'm pretty leisure right now, I can now announce that I'm in the middle of remaking All Manga Mobile. Tentatively, this manga reader is called Gogo Manga.

I'm scraping all source code from previous manga reader and its server. The server is so expensive and the revenue from the ads doesn't cut out for its operation. If you live in 3rd world country, you might notice that All Manga Mobile is considerably faster than other manga reader (except for the reader itself, sorry). It's because we do lot of awesome stuff on the server side and we'll keep it (or even improve it) in our new server.

The main feature of Gogo Manga is its cross-platform-ness. Its first version is going to be available in your browser, as a desktop app and as an Android app. You can sync all your favorite manga across platform by logging in using Facebook. But that's not all.

Sadly those who have paid for Pro Manga Mobile will not be able to easily migrate to Gogo Manga and will probably have to pay for the pro version. I deeply ask for your apology for this inconvenience.

If you have any feedback for our current All Manga Mobile / Pro Manga Mobile, feel free to comment or email me at Who knows we might incorporate it in Gogo Manga ;)