MyRaspberryAndMe

Tinkering with Raspberry (and other things)


1 Comment

GPRS/GSM via Serial (again)

I recently stumbled over a cheap GPRS/GSM shield made for the Arduino platform, of course on ebay, of course from China. As it was priced at a very reasonable 20 EUR (25 USD), I thought I’d go with the risk and order from China. Several weeks later it finally arrived and, I couldn’t believe that at first, worked out of the box.

This is how it looks. If you get interested in one of these gadgets, just search for “GSM Arduino” on ebay, that should do the trick.

P1010427

It’s a SIM900 based design and has a real time clock (plus buffer battery) on the back. A full description of all the possible AT-commands can be found here. It is basically the same shield that can be bought from Seedstudio, but much cheaper. A description with some sample sourcecode (that is working!) can be found at the Geeetech-Wiki pages. Continue reading


Pi-Hicle final – motor-control and autonomous driving

So this is going to be the final part of the “Pi-Hicle” series (here are Part 1, Part 2, Part 3, Part 4). There is some good news and some bad news… But first a video of the vehicle moving:

The good news is that the BigTrak is in fact runnning on its own, avoiding obstacles with its three IR sensors. The bad news is that I have discarded the Raspberry Pi for this project. The vehicle is controlled by an Arduino mini now and there won’t be a Raspberry Pi in it in the near future. Now why this?

  1. I fell in love with the BigTrak and I simply can’t make any more holes in it, let alone ripping the keyboard off
  2. My plan to decrease the speed gradually as obstacles are detected does not work. There is not enough torque to move the wheels when the speed goes below 60% (and that is still too fast indoors, at least at my home)
  3. With the vehicle moving that fast a video camera is obsolete, one wouldn’t get a clear picture of anything (and I don’t have pets to annoy…)

So I am going to share the last steps in making this project. This involves mounting the sensors and putting everything together and the simple, yet working, code for making the BigTrak drive. Continue reading

pihi3_header


4 Comments

Pi-Hicle part 4 – Sensor Phalanx

I finally had the time to do some more work on my Raspberry Pi controlled Big Trak. So this is all about sensing the environment, well, avoiding obstacles, that is.

My idea is to have the vehicle measure the distance to any obstacles in front and to both sides. If it can’t move any further in forward direction, it will be turned in the direction (left or right) where there is the biggest distance to any obstacles. Very simple but that should be very effective. And it gives the impression of “real autonomy”, because the vehicle will turn in different directions to avoid a collision.

To get this done I ordered three Sharp GP2Y0A02YK0F distance sensors. They are well documented and used by many people out there, so I thought they should do for me, too. The sensors translate the distance into a voltage, so there is an analog value to be mapped to the distance. There is a data sheet with a nice graph showing the expected output voltage oder distance. According to the specifications the sensor has a range of 20 to 150 cm. That quickly proved to be a little too optimistic… Continue reading

pihi3_header


2 Comments

Pi-Hicle part 3 – Big Trak autopsy and findings

This part is about the internals of the 2010 model “Big Trak”. I intend to use this toy as a base for my raspberry Pi powered vehicle. In part 1 of this series I covered the basic idea of my “Pi-Hicle” and recreated the Big Trak logic in Python. Part 2 was about displaying the programmed path on a display. Now I am lucky, because the “best girlfriend ever” gave me a real 2010 Big Trak for christmas. She even made a label, reading “Present for disassembly”. So I am doing nothing wrong here…

There are numerous resources out there about disassembling the Big Trak models, so I won’t cover this. Locate the screws and pay attention for those hidden under the grey rear bumper, then lift the top carefully and continue. David Cook from “The Robotroom” (www.robotroom.com) has extensive material about the original 198x Big Trak. For the new series of Big Traks you can find modding instructions with lots of pictures at srimech’s blog and some analysis of the circuits at the “Singleton Miller Wiki“. I am going to concentrate on my additional findings in this blog post. Nevertheless, here’s a quick overview where the screws are located. Blue arrows are “visible” screws, the red arrows point to where the additional screws are hidden under the bumper thingie:

chassis_bot

Continue reading

robot_header


3 Comments

Pi-Hicle part 1 – Touch Screen support

So here’s the first real part of the “Pi-Hicle” series. As the final goal is to control my vehicle from a touch screen, getting that to work is the first task.

The touch screen I have lying around is a 4DSystems μLCD-32PT type. ulcd_backIt is controlled via a serial port and that means: 4 cables only.

Have a look at the dimensions. This thing is a 3.2″ LCD and the control board is not bigger than the screen. The processor on this display supports a lot of commands for graphics primitives, like drawing lines, circles etc. You can even select from 4 different font sizes.

It is equipped with a micro SD-card reader from which it can display graphics files and even play wav-sounds. My display is the “SGC” type, that means “Serial Graphics Client”. So the display only serves as a client, meaning that all calculations need to be done by the controlling program. For real-time updating of complex graphics or such things this may be a major drawback, but I won’t need that.

Controlling the display

As the display itself is more or less “dumb”, let alone being a “legacy product”, there are no libraries around which I could have used. Some time ago I found a CPP library for an Arduino but it seems that this library (supporting my old display) is no more. So I started from scratch with only the technical manual and the description of all supported functions and began coding.

My python class does not support the complete command set, I concentrated on the things I am going to need. And I do not need low-level support for reading/writing the SD-card slot. Continue reading


1 Comment

New Project: The “Pi-Hicle” – What is is about

Well, sooner or later it had to be. I am going to build a vehicle that is controlled from my Raspberry Pi. I know, there are tons of such projects out there, but this simply is a must. And I think I am doing things a little different…

This blog post is meant as a short “introduction” on why and what. The actual documentation of my efforts will go in blog posts with a “Pi-Hicle Part xx – some description” title.

bigtrakThe idea started the instant I saw a “Big Trak” toy vehicle in a shop. Back in around 1980-1982, I can’t remember exactly the year, this was the toy of dreams. I wanted one for christmas but then I met a new boy at school who was deeply in electronics (we were about 13-14 years old and he was repairing TVs and even built an 30-channel analogue mixer!). His bigger brother had an ZX-81 and we spent every afternoon programming that thing. So I opted for my own ZX-81 for christmas, the “Big Trak” was history.
Fast forward more than 30 years: The “Big Trak” is back in shops. I am still tinkering with electronics and, even better, I can buy my own christmas presents… Hooray!

So the plan is this: take a Raspberry Pi to control a vehicle. The keypad on the “Big Trak” will be exchanged for a touch-screen. The actual driving – and later environmental sensing – will be done by an Arduino. This way if I do something wrong, it’s just a new Arduino for 10 bucks, not a 40 bucks Raspberry Pi.

Continue reading

header


2 Comments

AM03127 LED marquee + Arduino + Bluetooth = RaspberryPi remote control

After some days of soldering, testing and coding I am now able to control my LED marquee remotely via bluetooth from my Raspberry Pi. Using an Arduino Pro Mini (5V model) and the HC-05 module mentioned in my last blog post, I was able to mount all components inside the sign’s housing.

Some features of the bluetooth enabled display:

  • send messages to display (up to two messages with a length of 360 characters each are possible)
  • select display mode (message – time – off)
  • set time from and to Real Time Clock
  • set display intervals
  • increase/decrease speed of marquee

The sourcecode consists of the Arduino sketch to control the sign and a Python class that encapsulates the communication and message handling to the LED sign. As always, the sources will be available in my GitHub repository (direct link to sources). In this post I will describe the hardware and software developed to accomplish this. Some soldering skills may be required… Continue reading


10 Comments

Bluetooth Serial Communication with HC-05

Adding bluetooth support for a mouse or keyboard is easy with the Raspberry Pi. Things go a different route as soon as you’re trying to communicate with other electronic gadgets. There are numerous howtos and instructables out there that do serial communication via bluetooth. But all of them (at least those I have read) use bluetooth modules connected to the serial port of the Raspberry Pi. I had a similar solution at first, but then I accidentally connected one of my bluetooth modules the wrong way and fried it…  Here’s a picture of it. Before frying it, I added a sticker (“S” for Slave) that is now burned, too.

hc05-fried

In the lower right is the voltage regulator that literally exploded. However, these specific modules are cool for tinkering, as they allow TTL (5V) levels!

The HC-05 modules are very clever pieces of hardware, as they translate incoming bluetooth communication to serial data. So once configured this gives the tinkerer the possibility to achieve serial communication over bluetooth. The HC-05 acts transparently, meaning that you just communicate with the serial port it is connected to and the module then sends/receives via bluetooth.

To be able to continue tinkering with communications I gave the “Bluetooth USB Dongle” with Raspberry Pi alternative a second chance. Weeks ago I have not been able to get bluetooth running using a serial communication protocol. In fact, I was not even able to pair any of my computers and the Raspberry Pi.

My plan is to modify my LED sign to wireless communications. As a proof-of-concept I am going to use my Raspberry Pi – with attached bluetooth USB dongle – to communicate with a HC-05 bluetooth module connected to an Arduino.

To quote from “The Big Bang Theory”: “Everything is better with bluetooth!” Continue reading

led_pcb_head


2 Comments

LED marquee – Teardown

Recently I saw an outdated (I thought) LED marquee sign in a thrift store. As these things make great tinkering objects I went inside and took a closer look. The sign looked fine and (tinkerer’s heaven) did have a serial port. Complete with RS232-to-USB adapter, remote control and power supply.

I did a quick research and decided to buy that thing. The technical data I found on the Internet were talking about up to 26 “pages” of text with 420 characters each, multiple effects and so on. Simply a must have…

led_sign

The most interesting thing was, of course, the serial port. The idea is to have multiple RSS feeds on display. The news, the weather and so on. Everything controlled from a Raspberry Pi.

To understand how I can interface with the sign I will (of course) open it and take look at the insides. I thought I make this a blog entry to let you participate in my findings and (hopefully) show you something about “reverse engineering” electronic devices.
Continue reading

board_real_blog


3 Comments

The “All-Out” Board – Part 3 (a closer look)

I finished testing my All-Out Board today and was very glad that everything from I/O to the level shifting interface connections works as planned. So I decided it is time to get to the more technical stuff. In this post I am going to introduce the board, its features and some basic configuration possibilities. Then we’ll take a look on how to test communications (therefore an Arduino board is needed). And finally I’ll explain some of the electronics that is happening on the board. I am going to split the electronics part as this post is long enough by now…

Continue reading