Posts

Showing posts from May, 2013

TV output from Arduino

Image
Little video showing a 7-inch LCD monitor connected to an Arduino running the TV-Out library.  For this test I connected a Manifold Air Pressure (MAP) sensor directly to the Arduino using analgue pin 0 (AN0) to create a bonkers boost graph.  Sucking and blowing on the pipe makes the bar graph change.

Start Up Logos & Tachometer

Image
 MR2 Black-and-White Image I got bored today and started mucking around with a start-up logo for the vehicle data system.  The Arduino TV-Out library has a neat 'Bitmap' function that will load a properly encoded 1-bit image into the image buffer.  I spent a bit of time on PhotoShop working on a photograph of an MR2 until I got reasonable 1-bit black-and-white picture.  This was converted to a C++ style array using Image2Code, a neat little application and with a bit of editing, this was included into the Arduino sketch (program). The result is pretty good for a 1-bit picture at 184 x 72 pixels and extremely Sinclair ZX81 retro.  The idea is to have this as a start logo and also for display when the system is in any idle mode.  It looks a lot sharper on a 6-inch or a 7-inch screen too. I also got the Tachometer routine working on the 18F4520 PIC microcontroller.  It counts the time between pulses arriving on the INT0 interrupt pin and the i...

Battery Conversion

Image
I have nearly finished converting the battery in the MR2 from the piddly little 35Ah to a bigger 55Ah one. There were a few considerations with this. The battery terminals were too small, but I got the big ones in Halfords along with new earth cables. I also discovered that all the time I've owned the car the engine earth strap was disconnected which explained why the car was so hard to start! A trip to a scrap yard got a battery bottom clamp (off a Citroen) for a fiver and I made up my own rear clamp. The battery is clamped in securely and isn't going anywhere, but the big problem is the intercooler which is supported by the existing battery top plate (red thing below). If this wasn't the case I could lose the plate because it isn't really necessary, but then the intercooler would be flapping about a bit. As a stop gap I've bolted risers onto the plate because the new battery is 20mm lower than the old one and the top plate needs to be level, but I'm g...

Where it all began

Image
This is pretty much where my interest in microcontroller, computer interfacing and all the rest of it really began, way back in the Spring of 1989.  I had been interested in electronics since I built my first radio when I was about 13 or 14 in the late 1970s and I'd learnt to program on a borrowed ZX80 a couple of years after that, but this was my first proper interfacing project. I was living in Wembley at the time, an impoverished student teacher and one of my tutors suggested a cheap robotics project might be interesting as a way into Logo and this was the result.  I used to make weekly trips on the Tube up to the Maplins in Edgeware to buy whatever I could afford.  I already had the Spectrum and brought that over on the 'plane from Belfast at some point.  The 'monitor' is a Sinclair Microvision, no word of a lie.  I used a 12-inch portable for the programming, but designed a user interface with huge characters, 4 times the height of the normal ones so th...

Shady tree mechanics

Image
  My 2001 Skoda Fabia workhorse started acting up today.  It is a very reliable wee car with 155,000 miles on the clock now.  The engine is the simple and tough 1.9 SDI diesel so there are few things to go wrong with it and the same engine in the Octavia is much sought after by taxi companies where the cars go on to 300,000 miles in some cases.  Anyway, it was doing the kangaroo diesel routine again and the usual suspect for this is the exhaust gas recirculation valve (EGR) which becomes clogged up with soot especially if there is poor fuel or crud in the tank.  It's a 30-minute job to clean it out with some carb cleaner, but you need a 6mm hex bit to get it off and when I went looking for mine I realised I had lost it down in the engine the last time I did the same job.  Clever. Anyway, after some standard swearing at self and some pondering it dawned on me that I have a wee box full of Allen keys that I have kept from flat-pack furniture jobs and...

Power Of Three (Things)

Image
  I finally got it working tonight. PIC --> Raspberry Pi --> Android App PIC is reading 8 analogue ports and outputting the data every 0.1s via serial over USB.  The Raspberry Pi is running an Apache server and in response to an HTTP request to a PHP script, it reads the serial data and re-formats it into a simple fast JSON array.  The Android tablet is running a custom app from App Inventor to make the HTTP request, get the JSON response and display the data. The next step is to get a nice bar graph interface working and set up the Manifold Air Pressure (MAP) sensor I have in the car so that the thing can be tested reading boost from the supercharger. Oh yeah and I have to get the Raspberry Pi working as an Access Point (AP) again.  I did this before okay, but with a different wi-fi dongle.  This is critical to using it in the car to send point-to-point data to the tablet.

PIC Datalogging With Added Raspberry Pi

Image
Here we have a PIC 18F4620 in data logging mode collecting analogue values from 8 ports and outputting them serially via the USB bridge.  The software formats the 8 10-bit analogue values into a 'frame' like this - {HLHLHLHLHLHLHLHL}[CRLF] and these are sent every 1/10 of a second at a baud rate of 115,200.  The H is the top 5 bits (most significant) of the analogue value and the L is the bottom 5 bits (least significant).  To add clarity when testing, I added 40h (64) to these values to make them printable characters instead of control ones so the data frames can be viewed in the Putty terminal program. This is Putty running on the Raspberry Pi receiving the data frames from the PIC.  The text 'SERIAL READY' is sent after a reset and is also a useful test. What next?  Wait and see, but the clues are Apache, PHP5, Android and access point. Need a cup of coffe now.  And some heat, for May it is freezing here in Northern Ireland a...