Monday, 7 June 2010

House for TS-7300

After some scary moments with things falling over TS-7300 while it was powered up, I made it a new shelter. The Nokia E71 cardboard box was a good start. After some surgery and oddly enough, without blood donation from surgeon, the box was ready.
Inside view. Even though the box has no holes, beside for the LAN and USB connectors, the temperatures do not rise too high. This is mainly due to fact that TS-7300 consumes at most 1,8 Watts. On board temperature sensor measures temperatures between 44 and 45,5 degrees Celsius which should be sufficient, as the device is rated to -40 to +70C environment temperature.

Thursday, 3 June 2010

TS-7300

From time to to time I have been doing (or dreaming..) a MP3 player. A few years ago I bought a small ARM based single board computer, TS-7300. It is a small Linux computer with following specs: 200MHz ARM9, 64MB of RAM, USB, 55 digital IO lines, Ethernet, FPGA, etc. The plan was to add a LCD display, USB sound card and USB hard drive and remote control. I hacked them all together and experimented with each piece alone, but as usual, the integration side started move with glacier speeds.
This week I remembered this project and dug up the dusty computer from closet.
Years ago I had soldered simple interface for a 20x4 char HD44780 display. I also had started writing the LCD display system from scratch, but never had time to complete anything but the basic display code. What was still needed was the display abstraction to make the development easy on the PC side. I now continued by crafting together finally a fully functional LCD driver. What made a good jump start forward was a discovery of the lcdproc project. That really had what I needed; a nice modular architecture, driver for testing in console (win32 and Linux), advanced driver for the HD44780 chip, widgets for UI development and all. The net also provided a lcdproc driver for TS-7200 LCD interface, which only needed some modifications to fit into current lcdproc API and also a few lines for TS-7300 hardware support. After some more testing, I should try to post the patch to upstream.
For the MP3 playing I have been using the MPD. As the ARM does not have a fully functional FPU and is quite slow, it is essential to have a decoder that supports the fixed point calculations. I tested the mpg123 and others but they mostly consumed close to 100% CPU with a stuttering sound output. The MPD had the best performance on ARM I could find and also an documented API one could utilize. It also worked with the old Debian Sarge distribution and vintage Linux kernel 2.4 the TS-7300 had. The MPD architecture is divided into a daemon and client, which communicate each other with a simple text based protocol over socket so the development can be done completely on PC. What it lacks still is a client that fits into my usage pattern; play mp3 files from selected directories, without any playlists or such, be usable with remote control and use  the text LCD as output device. Perhaps some rainy day;-)

Sunday, 25 April 2010

My first motor controller

Next phase produces a L298 based motor controller circuit. The circuit is mainly based on the datasheet, spiced with an additional electrolytic capacitor and a filter capacitor and the recommended schottky diodes. The layout design for perfboard took a really long time, as I tried to minimize the amount of jumper wires and board area. A really useful tool for layout design is the Eagle, which freeware version I used on Ubuntu. Despite its somewhat weird GUI, experimenting with different component layouts is quite easy. Beside the schematic and layout editors, the Eagle has also a circuit verifier/simulator, which finds out mistakes in schematic before they produce smoke on the real life.

Here one can see the too heavy duty rectifier diodes I chose.
Perhaps on next time, I read the component datasheet also on the physical measurement section too. These 1N5822-diodes have really thick (around 1,5mm) leads, which required some drilling to install on a perfboard. As a positive side, this was a good excuse to get a miniature power drill:)


Underneath the components there is the board layout design. At least for me, the schematic diagram itself is not enough to build a board, but the layout diagram helps on building and testing the connections.
On the diagram there are a few mistakes, which I corrected to board, but not yet to the Eagle. For instance, there is one electrolytic capacitor too much on the L298 chip power supply side, which I considered a good idea at first. After studying the electronics a bit further from a excellent tutorial, I got worried for the inrush current draw and left it out.




Phew, it is ready for testing.











And a peek to under the skirt. Perhaps it is not ready for beauty contest, but the functionality is more important than form.
While soldering the first contacts, my relatively cheap soldering station first tip died. I don't know, if the top coating was corroded due to lead-free solder, touches with kynar wire insulator or what, but it really became resistant to solder. The tip rejected the hot solder like it was a mercury and also lost its heat when in touch with component leads. There are a few places in board,where this really frustrating situation can be seen.
Lesson learned, after changing the tip to a new one, I now tin the tip always at the start and end of burning session and also time to time, when needed.

Here are couple of pictures of the Seeduino Mega with the additional connector added. I wrote about it on last entry, but forgot to add pictures.














Monday, 29 March 2010

Mr Robot has entered the building


Today I finally got the Mr. Robot, ordered last week. This little kit will form a base for many joyful moments in future. The Mr. Robot is basically a 4x4 car body with two electric motors. The steering done just as in a Bobcat; braking (or free-wheeling) other side while running the other.
The box contains all (!!) the parts in small plastic bags and a nice instuctions manual in Chinese or Japanese. Fortunately the Google found instructions also in English. Of course, it is a shame to use the instructions at all, but luckily the assembly required also some craftsmanship:) As a nice bonus, there were two extra gears to front or rear axles and quite a few nuts with vinyl locks (so tight that I did not actually dare to use them).

The cheap price of the kit, 19€ could be seen on many parts. For instance, the body and parts that hold the drive shafts required quite a lot of fine tuning with pliers to make the transmission work without too much friction. Bolts and axles were also made from a bit soft metal, but none of them actually broke. Overall, the assembly was easy and resulting car is of better quality than expected.

Almost done. Oops, forgot to add back the two bolts to bumper, which were removed during assembly to make room for pliers holding the axle while tightening the tires.

The three AA rechargeable batteries inserted just to test that the mechanics and motors work. I could not find specs for the two motors, but fortunately they are replaceable. What worries more is the mechanics, if it bears even the current power capabilites.


The front transmission system required some care, as the metal frame at the inner end of drive shafts was not correctly aligned. The end result was that there were so much friction that left side motor could not turn the wheels. Now it works quite smoothly, but I had to leave the left front axle's bolts a bit loose. The chassis plate deserves a bit adjustment (=bending) and perhaps the axles should be greased too.

Ready to rock'n'roll. Next it will get the motor control circuit. To be continued.

Sunday, 28 March 2010

Connection to 8x2 LCD display


Next step is to add a LCD screen. I ordered a cheap 8x2 screen mainly for debugging purposes, but perhaps it could be used for some user interface in next project. Biggest problem in the connection with strip board is that the Seeeduino (and others in Arduino family) have some of their connections in wrong alignment (non 2,54mm). After quite lot of head scratching I finally found out that the holes Seeeduino PWM-side actually have the correct alignment. One only needs to solder new headers next to existing ones. Some soldering is also needed to utilize the IO-pins from 22 onwards.
I created a shield from strip board and pins. This makes connecting to outer world possible with some Kynar wire and ribbon cable connectors. The LCD is connected to 46..53 (d0..d7), 43..45 (control), +5 and ground. V0 has a 10kOhm contrast trimmer between +5V and GND. After downloading a example application from seeeduino website the "Hello world" was released.
The example code had some intrusive changes (it replaces the HD44780 code) to the Wire-library any Arduino system uses. Perhaps one needs to integrate the code better and send it to upstream.


Seeeduino Mega impressions


The Seeeduino Mega is a really neat device. Within the dimension of 71mm*53mm there is a 8bit Atmel1280@16Mhz, equipped with whopping 8KB of RAM and 128KB of flash and 70 I/O pins. The programming is done at PC, using a C/C++ in a bit toy-like IDE. With the help of really simple IDE, and its example applications and system libraries, one can get the LED blinking in an matter of minutes.

On the first inspections I found that the board seems to be fixed with wire cutter at the factory. I assume that the board had some leads connecting at wrong places and they simple cut the joints open, but unfortunately made some scratches over lines too. This was a bit worrying, but closer look with magnifying class and a tests with multimeter revealed no trouble. For testing I used a simple application to turn on and off the PWM-IO-pins
one at time to make sure, that the connections work. Fortunately there is no need to send the device back to supplier, may the play continue.
See the next picture, leftovers of wire cutting at top, right and bottom.

Toyware

Hello world. Welcome to my notebook on the experiments in the world of electronics. One colleague of mine (thanks, Samu) recently introduced me to the world of Arduino. After some research the mailman delivered a shiny state of the art microcontroller, Seeeduino Mega. More of that later.