On Friday I received my Serializer board, and today (Sunday), I decided to spend a little time on it to get it up and running at the very least.
Now, the first thing you must realise about any of this stuff, is the mini-ITX board and the Serializer board require power. Now, when you’re in the development (or R&D) phase, you don’t want the extra hassle of working off rechargeable batteries, because you’re going to burn time playing with them and not the bot, so you’re going to need a mains powered solution during development.
The easiest way to do this is to create a power hole (like that found in laptop computers) to your boards. This is actually really easy!
You pop along to Dick Smith (or your local geek store) and buy:
- 1 x Socket Line Cable Relief
- 1 x Length (depends how long you want your power cable) of Medium Duty Power Cable
OK, when you open up the Socket Line Cable Relief, you will notice there are two connection points, one is ground and one is positive (+ve). You cable should be colored red and black, use the red as your +ve and you black as ground, and wire the cable relief.
Now, there is a trick to doing this. The cable relief has two parts, the inside bit and the outside bit. When you wire up your cable relief, keep in mind which you made +ve and which one was ground, and make sure you connect the other parts of the power cable to your Serializer board (or Mini-ITX board). It should look like this:
Look at the pic above, see the cable relief, there is a little pin inside and a metal ring outside it. Now see my Serializer board, the left side of the power connector is ground (hence my black part of the power cable running into it) and the right side is +ve (so it’s red!).
Now I can power the board using a standard power adapter (similar to a laptop style one) or a rechargeable battery with the same connector head. I want this so I don’t have to change my power connector to the board, just the power supply. Same goes for the mini-ITX board (the brain).
The next step is to get some power. I bought a Regulated Multi-Voltage Power Adaptor because it allows me to change the output voltage from 3V to 12V, which is the highest allowable input voltage to the mini-ITX board and the Serializer, and it’s got a bunch of connector heads, with one that plugs perfectly into my cable relief! Voila, we have power!
Next, I had to make sure my Sharp GP2D12 sensors would work with the board and the Serializer .NET library…as I was to discover, not all is as it seems 😉
So I hooked up the board to my laptop using a USB to RS232 convertor (because my laptop doesn’t have a serial port!!!), fired up the power (lights on), opened up Visual Studio, and got ready to crack!
Now, I won’t bore you with my fumbling’s, except to say a few things:
- In your program load, set up your Serializer object with a PortName and a BaudRate, or it has some issues with other ports, etc
- DO NOT EXECUTE THE RUN() METHOD IN YOUR PROGRAMS PRIMARY THREAD! This is a blocking call, and hence your program will block. Instead, create a new thread, with the Serializer.Run method as the start method, then start it
- Make sure you execute the Serializer.Shutdown() method on exit, or you’ll leave your Serializer board in a dirty state, and will have to reset it (cycle the power) otherwise it won’t respond when you next run your program
So I now have my three sensors running, they are recording input, and the board is powered and running sweet. Next step is to start to cobble together a rolling chassis for the electronics!
Btw, if anyone wants any help with this stuff, drop me a line, I’m trying my best to keep this stuff up to date on my blog, but am more than happy to field open questions 🙂