Plane | Adding an LCD to the controller, and using Visual Basic for feedback

So here’s a video:

So pretty easy but important step here. For a while I’ve known that I need to have some more feedback from the robot that just LED brightness levels on the controller. This VB program allows me to get analog values from the vehicle and interpret them in any number of ways. You can download and run that program HERE, and like I said in the video I’ve refrained from going open source with my VB programs in the past because they’ve never really had any polish to them. But now I think it will be good to keep this all open.

I also added a 16 * 2 character LCD to my controller. I’ve sacrificed the 6 pins because hopefully in the long run it will be a better experience for the user. I may go back, but for now I’d rather build around something that’s a little more constraining as it will force me to innovate a little bit more. Here’s a picture of the new controller:

Here’s the program:

I didn’t mention in in the video, but I moved the mux from the controller, to the vehicle. It allows me to have 22 analog inputs, and the reason I took so long to finally add it was primarily laziness on my part. Aside from the the code is still very similar but close followers will notice that I cleaned up the way the program receives and sends code. It is much much more organized, and much more expandable. Here’s the “new” controller:

Here’s the new program:

Like I promised in the video, here are a few more properly focused pictures:

Plane | List of things to do [Documentation]

So as school and sports start to ramp up, it’s going to get harder and harder to make time for this project as I want to complete it by the first week of summer.

I made some huge progress today, but it’s really still a baby step, the proof of concept using a brushless motor was reassuring that this will be expandable into something  that is powered by brushless motors (some kind of tricopter) but there’s still quite a lot to get done.

 

First things first, I’d like to get started on re-tooling “Vehicle_Companion” to fit the needs of this new communication protocol I’ve established. Before it acted as an intermediate between the Arduinos, and now it shouldn’t have any effect on that at all, and should only supply visual feedback from the controller.

Reason being is that I need to get more feedback from the drone than led brightness levels. Plus I’m getting a little tired of C, it’ll be good to get back into VB for a while.

 

I also need to come up with a way to power the controller. Plain and simple it doesn’t make sense that it’s still tied to a computer.

 

After that I need to start locking down the vehicle’s PCB. I don’t need to do this to the controller as it’s BOUND to go through countless revisions as the vehicle does. Since the RC car is going to be able to be operated basically with just the joystick, It wouldn’t make sense to over complicate things. Here’s a preview of what it may look like.

 

After that it’s time to make some decisions on what the final form of this thing is going to be, I go back and forth because of a few reasons but for now I that some sort of multirotor is going to be the best.

Plane | Ground based system all working! [Demonstration]

Pretty big day for me today. Here’s a video:

I’m pretty proud of this one, the only problem of this is that the l298N get’s too hot, you can see in the pictures that I’ve installed a makeshift heatsink but it still get’s really hot:

Motor Driver 1

I also installed the 5v@3a regulator I mentioned in the last post, here are some pictures:

 

Here’s the vehicle code:

Here’s the controller code:

I’m verrry proud of the progress thus far. As for next steps, I need to lock down the vehicle circuit into a soldered perf-board, and I need to come up with a better power solution for the controller. Thanks for reading!

Plane | Powering and Dual Motor Speed + Direction Control [Documentation]

Okay this post is going to be pretty media heavy, here’s a video of the overview of the system:

There are 4 main systems at work here, and like the video said I’ll be going over all of them.

The first is the power system. At it’s core, it’s a Turnigy 5000mAh 3S 20C Lipo Battery Pack that is fed through two voltage converters. The first is 12v-9v@3A and the second is 12v-5v@3A. They are connected all via screw terminals in case they blow out. This all is fed through a large switch before it is fed into the controller and the motor driver, so it can all be cut off at a moments notice.

Here’s a video of me explaining that:

And here are some more detailed pictures:

This is the bottom, I’m still not great at going from breadboard to perfboard so bear with me.

And here’s the top without the 5v module installed, but it would be exactly the same as the 9v one that is:

Power_Top

From there we go to the controller. It’s an Arduino Micro connected to a UartSBee V4 with a XBee Pro 60mW Wire Antenna – Series 1 (802.15.4) installed (the same goes for the controller). It also has a 74HC595 to free up pins which drive LED’s and the motor driver:

Here are some pictures:

Here’s the code:

Next is the motor driver. It’s built around the L298N. Here’s the video

Here are pictures:

It’s my first real use of a perfboard to make a project more permanent which is why it looks awful, but this is what it should look like:

Image generated by fritzing.

The last system is the controller. It’s an arduino micro hooked up to the same xbee system as seen earlier with a joystick and a multiplexer for more inputs. Here’s a video:

And some pictures:

So basically it receives and sends data to and from the controller as seen in the following code:

All of the parts listed in this video can be seen here which is the parts list.

That was a huge post! Thanks for reading and leave a comment if you have any questions.

PiPlanter | Going from analog data to the web using python, mysql and php

Here’s a video:

Essentially, the adc reads an analog value and sends it to python. Python connects to a mysql database and adds the data to that. Once the user accesses the php script, a table, containing all of the values, is rendered.
First of all, you’ll need to make a mysql table with the correct specifications:
This creates a table that is found in the python script so it is very important that the TABLE values match as well as the column names.
Here’s that python script:

This reads the values from the adc (it is wired up as seen in this post)
Here’s the php, it reads the values from the adc_input_data_10 table on the adc_database.
This is all very preliminary stuff, and I’ll tighten up the code as time goes on.

PiPlanter | Graphing With PHP 2

This is a much more refined version of that graph I created earlier.

This one is much more detailed, and the sizes of the graph can easily be controlled with the imageSizeX and Y Vals.

This program will render:

This image:

And by modifying the values mentioned above to:

You will get this image:

PiPlanter | Graphing With PHP

Again, short post. This php code:

will produce this graph:

I learned this using this resource:

http://phpmaster.com/charting-with-pchart/

PiPlanter | Interfacing an ADC, Python, and MySQL [Documentation]

As this post is more of an update, I won’t be adding any explanations, just giving the python code.

This will read 3 values from the adc and put them into the database “adc_database”. It will put them in the table “adc_input_data_4” in the columns “Channel_1″,”Channel_2” and “Channel_3” respectively.

There you go, bigger post coming later tonight.

Simple ADC with Raspberry Pi using MCP3008

Hello!

So for my own benefit, here’s the steps you need to take to get analog inputs working with a Raspberry Pi.

I’m grabbing most of this from: http://scruss.com/blog/2013/02/02/simple-adc-with-the-raspberry-pi/

The first thing you’ll need is an MCP3008. Using jumper wires, hook it up to your pi using this diagram.

Power your RPi up and run the following commands to get it all set up.

First thing’s first, you’ll need to enable SPI in the kernel so:

Comment out the spi-bcm2708 line so it looks like this:

Then run this to make it more permanent.

Now for the real meat of it. You’ll need these packages for SPI and the WiringPi library makes things a whole lot easier for us.

Now everything should be good to go, now for the python.

You can debug this any way you like, but my favorite way to do it is using the program geany. I like to start up a VNC server with root so I don’t get into any trouble with the GPIO permissions.

But here’s the program.

And that’s pretty much it, the result should look something like this:

There you go!