Ping Robot Car 2

In the previous post about the Ping Robot, I created a small hardware platform for the robot recycling an old RC toy car.

For some reasons of simplicity and available electronics I decided to use as controller an Arduino Leonardo and to construct a shield that will contain the ultrasonic sensor and the motors drivers.

So there are two parts which still need to be developed to obtain a ping robot:

  • the hardware to mount on top of the robot, corresponding to an Arduino Shield with all the circuit’s components needed to drive both DC motors;
  • the software that will be used to read the ping sensor’s signal and to drive the DC motors.

In this post I will describe how to realize the hardware part for the Arduino shield, that it will be  mounted on the top of the robot platform.

First problem that I had to solve was the power source, in order to create a small (but completely) autonomous ping robot. So I decided to use a 9V battery to power Arduino Leonardo, ultrasonic sensor and DC motors. I couldn’t use directely 9V on DC motors and ultrasonic sensor, so I had to buy a voltage regulator (L7805CV) that will return a constant 5V power signal from 9V battery.

After I had to decide how to control robot moving using available DC motors.  My robot does not have stearing wheels on the front, so when it must turn on one motor and turn off (or invert the rotation of)  the other one. It will be drived like a tank! 😀
For simplicity this small robot will turn always on left when it will detect an obstacle, turning off the right side motor. When I was making some test I had to solve the second problem: Arduinos (all models!?) are just microcontrollers, they have to be used only to define the logic of a device; electrical values on pins are just to interact with external world. This is why the TOTAL max output current for ALL pins is 500mA.
So I cannot use directly output voltage/current provided by an Arduino board to turn on DC motors, but I have to use another circuit like a rele to provide the current.
Remembering that I want to maintain the project low cost, I decided to use 2 NPN transistors (2N2222) like switches (a well known practice in DIY projects) like explained here.
I used a 330Ohm resistor between each Arduino output pin and the base pin of each transistor. Moreover, due to the fact that I used NPN transistors, each collector pin must be connected to the motor while the emitter pin is connected to ground for a correct switch circuit.

Finally I created a shield for my Arduino using a prototype breadboard like this one and some male pins soldered on it. I disposed, soldered and connected all components on this PCB, including also  the ping (ultrasonic) sensor used for the obstacles detection creation is the HC-SR04 (just few dollars on Ebay) and two SMD LEDs necessary for debug purposes.

Here there are front and rear pictures of the (bad-soldered low-cost DIY-ugly) shield containing all componentes stacked, in a mess of wires and pins 😀

20140512_205133          20140512_205121

At the end it is possibile to connect the shield to my Arduino Leonardo and test if there is any explosion or short circuit 😀 (seriously I always control all connections to don’t damage Arduino board).

That is a picture reporting the entire “system” (Arduino Leonardo + Shield) and the 9V battery.

20140517_180857          20140517_180813

Next post will be about Arduino code necessary to control robot movings.

Custom cool key chain

I usually publish most of my software projects in this blog. But in this last period I’m creating a lot of hardware stuff, following the DIY mentality. Some of this projects are not very useful but they are very funny to realize and to complete (I really like start from an idea and arrive to the final ‘product’).

One of my many (unuseful) ideas is the creation fo some cool design, custom and nice key chain. There are a lot of key chains, differing for size, materials and logos drawn on them. But with the new maker tools (like 3D printers, millers, laser cutters) it is possible to realize complete custom and nice objects directly from your notebook and only with modelling software knowledges!

The main purpose of key chains is to find, distinguish and catch keys in a simpler way and they are necessary in most cases (until we use keys to open doors 😀 ). Another useful function could be to have some light attached to the key ring that could be used to find the keyhole, in particular when you come back home in the night and there is no lights near the door…

Most key chains allow just one of the two possibilities as you can see at this link. My idea was to combine both of them, using the light refraction phenomena to display custom pattern on the key chain and use the light when necessary.

There are already a lot of key chains with some light included but they are:

  • objectively ugly! There are big bunches of plastic with another bunch of metal including LEDs and batteries that is attached to the plastic with some glue…
  • they are three-dimensional objects, very cumbersome and not nice to see…
  • they aren’t customizable, in some cases it is possible to draw a custom image inside the plastic but it is an expensive service..

Here there are some images about existing key chains using lights and drawn images:

That’s why I decided to try to create a new type of key chains which uses the light’s refraction to visualize some custom images/drawings/patterns, made by a layer of plexiglass (any shape is possible)  integrating lights and batteries inside the piece of plexiglass.

The process flow necessary to obtain “my” key chains is the following:

  1. select the LED color (any of the existing ones, most common colors are available);
  2. select the key chain shape (usually is a rectangle with rounded vertices);
  3. select a custom image to draw in the plexiglass surface;
  4. mount and connect battery with the LED;
  5. isolate the electronic part (with some tape?);

Steps 2 and 3 can be done in a simple way using a laser cutter, that allows to shape the plexiglass key chain, make holes for the battery, the key ring and the LED, and draw the custom image.

I’m waiting the opening of a near FabLab the week to access to some professionals tools at affordable prices. I hope to get some nice alpha prototypes.  I will upload them as soon as possible and after I will upload also all projects and details (maybe some tutorial or production flow).