Monday, November 25, 2013

Lithium-Ion power

Yes, I have a small LAB :).

I used my storage room, which is located in the entrance of the building I live in as a LAB. I don't have too much equipment, after all I'm not a professional.

I do have the basics, an old computer PSU that was modified to a power supply (not in the picture) for 3.3V, 5V and 12V. A computer stand with a screen, keyboard and mouse. A Multimeter and a soldering iron. The software I use is all free software. For the PCB CAD software I use Fritzing and for programming the AVR chip I use the Arduino IDE with the Arduino as ISP sketch via an Arduino UNO board.

For all the boards I create I place an ICSP so I will be able to update the software in place. 

Going back to the project, I finished the main board which has three circuits on it as you can see in the following picture:
The circuit on the left is the missile control driver board. It has two H-Bridge circuits for controlling the missile Horizontal and Vertical motors as well as the missile shooting motor. The Horizontal and Vertical stop triggers are connected to the H-Bridge circuit so that once the missile turret reaches it's limit and the trigger is triggered, the motor is cut off via the driver board so it won't keep rotating in that direction to protect the motor. It seems that during my analysis of the missile launcher which I had to take apart I seem to have caused the Horizontal right sensor to stop functioning. I can fix it, but I'll keep it for later.

The top middle circuit is a 5V power regulator for the micro-controller and devices which require 5V DC to function. The devices are the PS2 joystick wireless plug, the distance Echo sensor and the microchip itself.
During my tests with the board, strange behaviors were encountered which I really have no clue on why they happened. At first the board did function, but then it worked randomly. The missile launcher didn't function, but I later discovered why, and fixed the problem. I forgot to place a 10K resistor to the Base of one of the transistors which caused huge amounts of current to flow into it (I'm using the 2N2222 BJT Transistors) which heated up to a point where it simply stopped working (burned out). I fixed it and replaced it.

In any case, the first tests where really a failure.

I had to leave the project for some time and got back to it later this weekend when I moved all my stuff back home.

I'm still puzzled on why it failed but I do have some possible candidates. The first and most likely is the power supply and it seems I may take my friend's advice and use a different power supply for the micro-controller and devices circuit and another one for powering the motors (car and missile). The second candidate has to do with software.

I'm very experienced in software so I wrote a helping library for Arduino which I call EDA (Event Driven Application). It provides a very easy way to receive events that can occur on different PINs and call a function when the trigger happens. For example, I can set a PIN to call a function once a RISE event happens which means when the PIN goes from LOW to HIGH. It also provides a debouncing functionality which is very useful. The library also provides timed events which are triggered after a certain interval.

The EDA library made my life easier for many other projects, but it was not debugged properly and I have a feeling it may be the cause.

The next thing I'm going to do is connect everything together on the Car and probably start testing to see how well it will function and go from there.

Again, for testing each progress in the Car I have my trusted testing team who likes their job of QA for this project and they do massive stress testing as well :). Here are two videos taken during their fine work. Their names are Karen (my oldest daughter) and Rani (my middle son) - I have another younger daughter named Caitlin which I didn't hire yet ;).

 

Monday, November 4, 2013

Power Supply

It's been some time now since my last post. I was a little busy with work related matters and a trip to Japan which consumed all my time. This post is rather coming a little late as most of the work in this post was done some time ago but I didn't have the chance to document it.

So, Power Supply. The car does require some powerfully power supply that has to be battery based. the motors do require significant amount of power (current) to make it role. Using regular alkaline batteries is one option, but they will get replaced frequently which can be expensive. The SmartCar has a motor for each wheel which sums up to 4 motors, the missile launcher has three motors but only two can run simultaneously, this makes it 6 motors and we are not yet done, there is the processor, echo distance sensor and the wireless Joystick.
Above you can see how I plan to construct everything together. The missile launcher will be placed in the front and the power supply on the back, in the middle the main board with main processor and the supporting circuit for the missile launcher. Currently I'm using regular batteries but I will changing the power supply to Li-Ion batteries.

For now, every attempt to power the entire car with the power supplies failed and in all cases caused either the main processor to reset or the wireless Joystick to loose sync.

Oh well, I still need more lab work to find the correct configuration and I will probably need to add a small circuit for regulating 5V from the power supply.
The first measurements I did with a 9V battery showed that a current of ~60mA was required to power the main circuit (the main processor, the Echo Sensor and the Wireless Joystick connector). the 9V I had can't really supply too much current. Connecting a Voltmeter to the circuit showed the voltage getting dropped on the battery. Adding capacitors did help, but did not solve it, it only delayed the effect.

What I really want is to power everything from only one battery source. Currently I used two power sources, the 9V battery to power the main processor and the 4x1.5V batteries (6V) to power the motors.

I'm still waiting for my Li-Ion batteries to arrive and hope it will do the job, so for now I'm on hold for the power supply - I will do some more tests to ensure that I have everything ready until I get the Li-Ion batteries.

Now to something different:
Let's move to the missile launcher. First thing is first, let's remove the guts of the missile. 
The main board had the wires of the motors soldered to it, so I took a wire cutter and snapped them loose.
I then took a ribbon cable of 16 wires. Why 16?
3x "2 wires for motor"
5x "two wires for motor trigger"  (left, right, up, down and missile launched)

I really could have used only 11 wires if I really wanted to and everything would have worked just fine. All the motor triggers can be connected in daisy chain common ground wire for one end and the other end is really the trigger. As the missile motor does not require an H-Bridge one end is connected to ground so you also save another wire.
One of the best inventions is the Hot-Glue, it simply makes your work much easier. I used the Hot-Glue to stick everything together and keep them in-place.

I made sure to label all the wires to know which goes to which.


Above is the final product. The supporting circuit has been designed but still not built. Making a prototype PCB is really time consuming. It takes me around 3 hours to create one.

I'm dumping more picture of the SmartCar just to give a sense on how it looks right now.
Above is the supporting board for the Car Wheels.


Above you see the Wireless Joystick connector