Author Archives: marcoaltomonte

How to fix wrong SD card size when formatting…

My SD card became corrupted… again! When I tried to reformat it with the SD formatter tool (from the sdcard.org site) I always got the wrong size (even if the FORMAT SIZE ADJUSTMENT was ON). Googling for a solution did not help: I tried diskpart and other freeware tools, nothing helped.

At the end I found a solution by my-self: start the usual format with Windows (using the slow full format mode). While the format is in progress, physically remove the SD card from the drive: this will corrupt the data on the card. Now insert the card again: Windows will ask you to format the card since it cannot read it. Format it again: this time the card size will be correct!

Learning Game Physics with Bullet Physics and OpenGL

It’s 1879OS _Mini.jpgfinally out: Learning Game Physics with Bullet Physics and OpenGL.

It’s a simple and complete book for starters (that I reviewed): it explains how to create an app that shows a 3d scene with an interactive physics simulation (with OpenGL and Bullet libraries). Take a look at the table of contents and the sample chapters!

http://goo.gl/I9kW22

Noise, noise everywhere! Or not?

I played with my little robot for a few days, discovering some issues:

  • The two motors are not exactly the same: so the voltage should be controlled by a “complex” algorithm based on encoder values.
  • When motors are at high speed, Arduino resets it-self or halts completely after a few seconds.
  • Sometimes, when motors are at high speed, they start spinning in opposite directions or halt or decelerate.
  • When a motor is at high speed the encoder of the other motor starts triggering interrupts even if the wheel is not rotating.

Google-ing around I found out that those issues may be related to dc motor noise. To reduce it one has to solder some capacitors directly on the motor:

  • 1 47 nF capacitor connected to one motor pole and to the motor chassis
  • 1 47 nF capacitor connected to the other motor pole and to the motor chassis
  • 1 470 nF capacitor connected to the two motor poles.

I ordered those components and tried to solder them but nothing changed.

I was a bit lost so I decided to do some experiments. While the motors were running I started disassembling some parts and I found that the issus disappeared when I removed the screws that attach the power switch to the top metallic platform. The problem was caused by the distancers that I used to fix the Arduino PCB on the robot’s platform: one of them was touching a capacitor on the bottom of the PCB. The on-board power switch is not electrically isolated so +5V current was flowing from the batteries to the switch, then to the metal chassis, then to the distancer and finally to the capacitor on Arduino. So I simply removed the distancer and I placed it in one of the other holes of the Arduino’s PCB.

Everything works now!

DFRobot’s 2WD Mobile Platform: The beginning!

I decided to use my little Arduino to make a robot. After a few days of Googling I decided to start with a small 2 wheel robot: DFRobot’s 2WD Mobile Platform (link). It should be easy to control, it can turn on its center (with a small turning radius), it is compatible with Arduino and its big library of freely available samples, and there are a lot of compatible sensors.

After a few hours spent with screws, cables, and batteries it is already wandering around the room! But a small issue appears: it can’t go straight as-is, out of the box! Motors are not created equals: one may be a bit more efficient than the other, the motor shield may give a bit more voltage to one of them, and so on. So the must-have accessory to let it go straight is a couple of Wheel Encoders (link): one can easly extract them from an old (ancient) ball mouse!

Triggering Pusher client events from Arduino

With Pusher service one can send push messages from a mobile app (or a web page) to an embedded system to trigger some action, such as power up some lights or open a door. The system is quite simple: the webpage registers itself to send a message that is triggered on an user action, the embedded system registers itself to receive that specific message and waits for the message to arrive on a socket. But what if we want the embedded system to answer to the web page?

Continue reading