Ad

Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Thursday, July 1, 2010

Power pack!

While the rear wheel traction motor provides plenty of power for normal operation, the curiosity of obtaining some extra power through a different propulsion method is appealing. Since I had some parts from a unfinished airplane project, the materialization of another exclusive idea became real: to build a special trailer for the car, with a single purpose - to push the car even faster, with the help of a propeller instead of traction wheels. Featuring a 9x6E propeller, a 150 Watt brushless motor, an 18 A ESC, and a 1300 mAh LiPo battery, this trailer provides the closest one can ever get from raw rocket power, with controller propulsion.



Wednesday, June 2, 2010

Sensors are never too many



While it is important to design a autonomous rover capable of performing even under the worst conditions and with the least available information from the surrounding environment, if we can provide good information, it will certainly lead to better results as long as we have a good software implementation behind it.

Tuesday, May 4, 2010

System override

Unlike some other domains, with robot software bugs can have expensive outcomes. In order to avoid unpleasant mishaps, I have decided to implement a hardware solution for preventing software originated problems that could cause a calm, boring robot to become a runaway beast hitting hard against walls, people, animals and anything that is in its way. To achieve this I have built a PWM control source multiplexer:



Sunday, May 2, 2010

Almost autonomous

With all the hardware prepared (except the quadrature encoder on the wheels, which is still to be implemented and installed), all conditions were met in order to be able to write some code and make the car finally move on its own.

I have first added the sonar module (the previously mentioned SRF02). This implied making a small aluminium support to fixate the sonar to the servo, while still being able to slightly adjust the tilt:



After installing it, made a quick check and read the ranging data directly through the MuIn original Windows application:



Every thing was fine. It was time to add more code to the MuIn PIC, implenting useful functions for the robot. A singe command returning both range data and the servo position would be useful, so I implemented it. It essentially consists of the following structure:


'@''F''S'I2C addrservo nr00'#'


Each element is 8 bytes long. The PIC responds with the following answer format:

'@''F''S'I2C addrservo nrRange HBRange LBServo HBServo LB'#'Checksum


This allows a measurement to be taken, while the servo is sweeping.

A small video of the car in action:


Sunday, April 25, 2010

More stuff on the pipe


The good work goes on, and the objective of achieving a fully autonomous rover is closing in. In this article I present 3 hardware additions:

First I found that the 1300 mAh LiPo battery could not be enough for long endurance roving activities. So I decided to add a pack of 4 NiMh AA batteries (2500 mAh each) dedicated to the Fonera. With this extra power, control and communications autonomy is guaranteed even if the powertrain pack becomes depleted. Additionally the efficiency is improved, because considering the fonera input voltage (5 V), and the voltage of the main pack (11.1 V), a regulator would be necessary, to properly drop the voltage. A linear regulator would not be a very efficient solution, and a switching regulator, in spite of being more efficient, is more complex and expensive. So with this separate pack, which provides around 4.8 V when fully charged, is enough for the Fonera (in fact the Fonera can be powered to a minimum of 3.5 V thanks to its internal low dropout regulator).



Thursday, March 25, 2010

Cognition on Wheels



Last, but absolutely not the least, is adding intelligence to the beast. Considering the budget constraints and simplicity of integration I decided by using a Fonera 2100 router as the workhorse for processing data. Equipped with a single chip Atheros solution, the integrated 32-bit MIPS R4000-class processor runs at 183.5 MHz, and is tipically enough for most network processing that is required. Additionally the IEEE 802.11b / 802.11g WiFi interface provides the means for remote communication with the vehicle. For local communication it features both an Ethernet interface, and a 3.3 V serial port.

Thursday, March 11, 2010

Let there be light!

One of the most pleasant situations is when can execute an idea without using any of your budget. It occured to me that having some onboard lightsource could be useful for the car, specially if you plan on doing night driving. Well I took a look at my repository of electronic junk, and found a pcb with 9 white leds from a broken flashlight, and a bunch of broken 9g microservos.



So I thought, well...if I could get the leds to be turned on and off through a free channel on my radio, it would be sweet.. And then took a look at one of the servos, and thought: I remove the motor, replace the encoder pot with a set of resistors, connect the leds in series with a small value resistor, and it should do the trick.

And so I did it: first analysed the servo operation in its original form. Connected the motor to an oscilloscope, and verified that a PWM signal that varies in duty cycle is fed to the motor. The further you move the stick, the more the duty cycle approaches 100%. Without surprise the peak voltage would be 5 V at the motor terminals (the same voltage that powers the servo).

Measured the pot resistance, which was 2 KOhm. Measured the current consumed by the leds while being fed with 3.1 V (minimum voltage for enough luminosity). It would draw 60 mA.

Then all I had to do was applying Ohm's law to find the appropriate resistor to drop the voltage, given the current that we know the LEDs consume. Found that the ideal value was 52 Ohms (V=RI <=> R = V/I <=> R = 3.1 / 0.060 = 51.66 ~ 52 Ohms).

I did't had this value (the closest resistor is 51 Ohms), so I used the closest resistor I could find at hand. Found a 47 Ohm, which in spite of being slightly smaller, it shouldn't harm the leds as I was being conservative with the voltage in the first place (these were being used in a flashlight powered by 3 AAA batteries - meaning that the voltage could be up to 4.5 V). The typical voltage to which white LEDs are rated is 4 volts.


With a bit of experimentation found an appropriate value for the resistors replacing the pot. One 2 K resistor between pin 1 and pin 3 of the pot terminal, and a 1 K resistor between pin 1 and pin 2.



By doing this I trick the servo controller into thinking that the motor is always in the same position, while the user commands it to go to a different position. This causes the controller to continuously provide current to the motor, in an attempt to reach the desired position. Here instead of the motor we put the LEDs. The result is the LEDs being constantly lit while the stick is in a given region, and off in the remaining positions (because a negative voltage is fed to the LEDs - if a motor would be present instead, it would cause it to move in a different direction).

A little bit of soldering, and it was done! This way I had the cheapest possible RC headlight without spending a single cent.



And finally, after putting heatshrink around the PCB, the work was done:

Wednesday, March 3, 2010

Intelligence on wheels

Robotic vehicles are not a novelty. Initial attempts to create autonomous roving machines date back to the 1970's, with examples such as Stanford cart in 1961 and Shakey, Moravec in 1979. These were simple machines. Digital computers were not yet miniaturized to the point of enabling interesting computing power onboard a vehicle, regardless of its practical size. Even so, the state of the art of the technology at that time proved sufficient to allow the mankind to explore new fronteers of a universe never before crossed by human artifacts. Two such examples were the NASA Voyager I and II missions. Having passed the 30 year mark in space, these prodigious machines still beam back health reports to earth, and should continue to be up and running until the energy generated by the plutonium based RTG (Radioisotope Thermovoltaic Generator)is insufficient to power the essential electronic systems onboard (of which one of the most important ones is the radio transmitter). This should occur anywhere in the next 10 years.

Today we have the result of tremendous technological improvements since the time the Voyager spacecrafts had been created. However, achieving the same degree of reliability is a milestone not always achieved in every case, regardless of how much extra knowledge the humanity have been gifted with.

While trustworthiness is not necessarily a consequence of innovation, it must be in the agenda, as long as the outcome is intended to be a dependable solution.

Anyway, the focus of this post is more on innovation itself rather than discussing trustworthiness and reliability. I am presenting a small part of what one day will be with us everywhere.

We are surrounded by automatic machines in our daily lifes. Even where it's less obvious. The small capsule called elevator, that takes us from one floor to another is one such example. While it doesn't look like a robot, it is a very autonomous machine. Equipped with clever microcontrollers, elevators are capable of making logical decisions, while multiple users request its attention. It's a simple example of a machine that in its current state of evolution is driven by an electronic computer, has sensors, and is capable of triggering actions (e.g.: activate a motor) based on a predefined plan, or in response to external input (e.g.: pressing a button). It can be enabled with useful optimizations such as having the ability to position itself automatically in different floors, depending on the selective demand at diferent times of the day, within a building.

Robots are intended to be useful for the human being, not to replace him. Through automatic machines we moved from one point to another in our ability to produce more and better artifacts, and to provide better services to people.

In this blog post I am presenting you with a machine that, while functional, is still the first step for achieving a helper robot, the hopefully will be the base platform for making very interesting household applications for machines this size.

I started from buying a cheap supermarket toy RC car. It called my attention the fact that besides its low cost, it was large (1:10 scale), had very nice looking wheels, and featured a 850 mAh 10 Volt lead acid battery (so most likely it also had a motor rated for 10 Volts or more):





Of course the lead acid battery would not be very interesting as my future power solution, but we'll return on that later on. I decided to buy this car for the features managed to discriminate.

After fully charging the lead acid battery, I tested the car, still in its original form. I noticed that it really had nice torque and plenty of raw power. However, it lacked the ability to harness the beast. Like with most toy R/C cars, it's circuitry only allows zero or full throttle to be applied, both in forward and reverse directions. This, of course besides being very limited, also translates to prematurely worn and damaged gears. On the other hand the steering was also very poor. It was also zero or full travel in both directions. Of course we cannot expect proportional controls for a 25 Euro car! Well, I tested the car for, say, 1.5 minutes, and the battery soon started to gradually drop the delivered power. I was admired, either the battery had very poor quality or the motor was an animal.

I decided to start the transformation. I had a few spare hobby R/C parts such as a few microservos, a Art-tech 41 MHz 6 ch. receiver used in model helicopters and planes and a 11.1 V 1300 mAh battery (the stock battery from my Falcon 3D heli).

I started by removing all the crap out of the car, until I got this:



Here is the circuit board with the receiver and motor control. Here I had already removed the two SPDT relays used for reverse. Take a look at the big resistor (feer):


The original steering motor:



It hardly had torque to turn the wheels, specially after 1 minute of battery use.

The transmission motor yes, had quite a punch. I measured it's current while connected to the fully charged battery, it draws 1.5 A free running, and 13 A under full load (zero RPM on the shaft). So it consumed 130 Watts of power. The output power should therefore be around 100 Watts, assuming it's a reasonably efficient brushed motor.

I still needed a brushed motor ESC and better servo for the steering. I searched the web for DIY ESC solutions, and found this, which seemed interesting:

http://www.designsoft.com.au/ahome/rc/PIC-ESC/ESC.html

It featured design variations for both cars and planes. It seemed exactly what I needed, and I calculated that it shouldn't be hard to build and expensive. I had the option of choosing the relay or the H-bridge reverse. As I still had the two SPDT relays from the original circuit, I decided to try this version, as it would be slightly cheaper. Already in an advanced stage of the assembly:



And the top view, with the two white relays:



After building the hardware it was time to program the PIC:



I had to build a small board with the ICSD socket for the PIC, as the ICD 3 is not provided with one:



Mounted the 41 MHz radio and the LIPO battery. Both fitted nicely into the original
battery compartment:



Mounted the 43 g standard servo (it has 6.5 kg of torque). Replaced the original links with ball links. Adapted the steering bar in order to attach the servo arm through a ball link:



After a few more assembly iterations, mounted a virgin pcd board to be used as a plate for scientific instruments, and attached a gymballed support for a 1.2 GHz wireless camera. The gymball was assembled manually with aluminium. It uses two microservos to provide pitch and yaw for the camera. This is the result:



A detail view of the camera, which is also powered from the LIPO battery, through a regulator board I have also assembled (located in the bottom of the virgin pcb). It provides +5 V and +9 V necessary for the camera (camera and transmitter respectively):



The car is then controlled by a standard PPM 6 ch transmitter (41 MHz):



After the assembly, it was time for a test drive! Turned on the camera, connected the 1.2 GHz analog video receiver to a home made patch antenna, and time to hit the road..errmm...the wooden pavement..

As the car moved away from the place where I was controlling it, signal weakening and multipath interference became apparent. Some servos glitch violently under signal interference...dumb radio... The ESC on the other hand doesn't react because it properly filters occasional glitches.


Thursday, January 14, 2010

Ion Motor

Ion motors are very cool stuff. So cool that Nasa decided to invest research effort in this subject since the early 1960's when the physicist Harold R. Kaufman achieved the first design. In spite of the small ammount of thrust (when compared to conventional rockets), ion motors are capable of a very large exhaust speed, being equivalent to ten times the exhaust speed of a high quality rocket (the later can only achieve between 3-4 km/s). This means that ion motors are capable of continuously accellerating an object up to the exhaust speed (considering the space environment, where drag is practically absent). The time for exhaust speed to be reached depend of the mass being moved.

Saturday, November 14, 2009

Home Built Hovercraft

While not being the most efficient means of transportation, hovercrafts impress by the ability to operate both in land and water.The inherent maneuverability is also an interesting characteristic. While the driving is entirely different from a vehicle with wheels, hovercrafts are able to change direction very quickly, given the fast rudder response (usually located in the rear, and close to the propulsion source).

Sunday, October 5, 2008

Carjacking - shortening the path for justice

As automobiles become more sophisticated, direct theft by tampering with the ignition system becomes a nearly impossible task. This narrows down the choices left for the criminals, who end up adopting the only choice where successful access to the vehicle is guaranteed: threatening the occupant(s) with a weapon in exchange for the car.

In general the criminals can get away with this type of crime if they are efficient and careful, leaving the victim with few evidence to help in the investigation and tracking of the vehicle.

However, once again we can put technology on our side, and in an attempt to be resourceful enough, take advantage of two broadly available devices: a cell phone and a GPS module. These devices
are becoming cheap enough to have dedicated in a discrete location inside the car for a single purpose: on demand location.

By being able to query the location of the car just by sending an SMS message to it and get a reply with the corresponding GPS coordinates, this could be a useful tool in the police work, as real time location would always be possible.

Following this idea, I've decided to attempt a simple implementation of one such system which I have designated "Vechicle Finder". Having as a platform a Nokia smartphone and a Bluetooth GPS device (both sitting on a board for convenient fixation of the apparatus), I have developed a Java application which reads the GPS coordinates and sends it as an SMS to the originator of the request SMS:



Upon receiving an SMS containing a special command and some optional parameters, this onboard device will reply with another SMS containing the following data:

Saturday, March 15, 2008

Long-haul WiFi - new developments

Returning to the WiFi topic, here is the new antenna development that I had promissed in the early post, once the dual "cantenna" design was finished.

The dual cantenna is quite efficient, as I realized by connecting it to reasonably distant access points (in excess of 200 meters, with many obstacles between, including houses). By verifying the antenna efficiency was the expected, I assumed that in better conditions the range could be far greater, by establishing a link between two antennas of this type or other type of optimal configurations.

However, I knew I could push it a little further, so I decided to buy a 12 euro 45 cm dish from a regular satellite TV system, and the materials to build a biquad feed. I installed the dish on top of the tripod used for the cantennas, and attached the biquad feed (built according to these instructions) to it:



Monday, December 17, 2007

Starting to bust water into its basic elements

The basic electrolyser design is finally finished. After a lot of steel cutting and drilling, I've finally finished the first prototype of the machine which will tell wether or not pulsed electrolysis of the water, through special frequency and pulse duration control, can by itself be the key to making the process several times more efficient than conventional DC electrolysis.

For now there are a few issues to resolve, namely:
  • Make the seal on the top cover air tight - even though the container was bought under the premise that it would be air tight, in practice is was verified that it was not;

  • Control circuit FET transistor is heating up too much under a 4 Amps load - must check if the gate voltage is being enough to cause it to switch from cutoff to saturation and not somewhere in between. According to the device datasheet, it dissipates up to 150 Watts of power. In this case it has to dissipate around 40-50 Watts of power (10 to 12 Volts at 4 Amps), which is probably too much for the 25 cm^2 heat sink installed.
This is the complete setup (electrolyser + control unit + DC power supply):



Thursday, December 6, 2007

Water - alternate fuel source and a panacea for mankind?

When it comes the time to pay after filling up the tank, you dearly wish your car could run on anything cheaper than stinky old gasoline (or diesel). Wouldn't an entire global economy depend on this precious product, and you could establish a parallel with other things like drugs, where the desperate sense of necessity leads to the unavoidable obligation of paying a large sum of money just to obtain a given ammount of it.

Sunday, June 10, 2007

"Long-Haul" point-to-point WiFi links



I start this blog with a great, not so new idea that I decided to reimplement and see working with my own eyes. The principles behind it are not new at all and go back to the early days of RADAR technology (1930's), in a time where microwave radio research was taking place to improve the accuracy of this type of equipment. The need for guiding radio waves through a low loss medium and to be able to selectively pickup signals coming from a particular direction (in this case echoes from the emitted pulses) led to the design of different types of microwave antennas. These antennas had to be both compact (in order to fit into small airplane compartments) and efficient (output most of the signal from the transmitter in a particular direction and receive with exceptional gain the signal returning from that same direction).