Archive

Author Archive

Full size DIY Balancing Robot

July 6th, 2014 4 comments

It has been quite a while since my last blog post, but I am finally ready to reveal what I have been working on the last months. Ever since I made my first balancing robot: http://blog.tkjelectronics.dk/2012/03/the-balancing-robot/ and the Balanduino I wanted to build myself a full size version which I would be able to ride just like a regular Segway.

Finally I decided to make one together with a good friend of mine Mads Friis Bornebusch in a course at my university DTU (Danish Technical University).

Video demonstration

Mechanical construction
The main frame is an aluminium checker plate that is 500x360x7mm which the motors are bolted onto. This width was chosen, so it would be able to go through a normal door opening. The motors used are two MY1020Z 500W, 24V, 12.6Nm brushed DC motors.

I ordered them from Germany, as I needed them right away, but you should be able to get them much cheaper by ordering them directly from China.

Below is an image of the aluminium checker plate after we have drilled the holes for the 8mm steel bolts. Note that these are countersunk, so they are flush with the surface. I would recommend using lock nuts to ensure that the bolts will stay in place – you can also use Loctite instead.

Aluminium checker plate - ready to mount the motors

Aluminium checker plate – ready to mount the motors

Motor with hub

Motor with hub



Read more…

PS4 controller now supported by the USB Host library

January 12th, 2014 21 comments

I am very pleased to announce that I have now added support for the PS4 controller via Bluetooth. This will allow you to read all the buttons and joysticks with the same API as all the other libraries I have written for the USB Host library.

PS4 controller

To get started you should look at the provided example. It shows how to read the different buttons and joysticks. I still haven’t figured out how to control the light, rumble and read the accelerometer, gyroscope and touchpad, but hopefully I will figure that out soon.
Read more…

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:

Bluetooth HID devices now supported by the USB Host library

December 1st, 2013 22 comments

I am glad to announce that Bluetooth HID devices are now supported by the USB Host library. The library already supports PS3 and Wiimote controllers, but now it also supports more general devices, like Bluetooth keyboard and mice.

An example is available at the following link: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Bluetooth/BTHID/BTHID.ino.

First time you run the code, you will have to pair with your device, this is done by creating the instance like so:

BTHID bthid(&Btd, PAIR, "0000");

You can of course set the pin to anything you like.

Now you should enable discovery of your device and it should automatically detect any mouse or keyboard present and then connect to them. On Bluetooth mice there is no need to enter any pin, but on a keyboard you should enter the pin on the keyboard and then afterwards press enter.

So in this example you should press 0 four times on the keyboard and then press enter afterwards.

After you have paired with the device, you can simply create the instance like so:

BTHID bthid(&Btd);

When you press any button on your device it will automatically connect to the last paired device i.e. your Arduino.
Read more…

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:

How to stream video and audio from a Raspberry Pi with no latency

June 4th, 2013 55 comments

I have finally finished my last exams, so now I have more time to focus on some of my own projects. It has been a while since our Kickstarter campaign was successfully funded, but we are still working on making the experience better for the final users.

After the campaign ended we sent out a survey to all our backers with several questions about there address, profession and so on, but we also asked them if they had any suggestions for improvements or extra features they would like to see added to the Balanduino. A lot of people asked if we could enable wireless streaming for it.
I was personally very excited about that since I have been playing with the thought for quite a while, so when the official camera module for the Raspberry Pi became available I bought it straight away.

Raspberry Pi camera module

Read more…

Kickstarter successfully funded

April 19th, 2013 2 comments

We are very pleased to announce that our Kickstarter for the Balanduino balancing robot has successfully been funded by $13,494 which we are very happy about.

We have just received stickers from our printing company and have decided to give a little bonus in form of a signed Balanduino post card. We will be shipping this post card and stickers to all of our backers who have pledged $10 or more, within next week.

All the source code including the firmware, schematic, PCB layout and mechanical drawings for the frame is available at Github: https://github.com/TKJElectronics/Balanduino.

If you are not a backer, but are still interested in the project, you should checkout the Kicstarter: http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit and our previous blog post: http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/.

That’s all for now. Please let us know in the comments below if you got any questions or comments regarding the project.

The Balanduino

The Balanduino

Balanduino Kickstarter almost finished

April 13th, 2013 6 comments

Hello to all of our followers. This is just a short reminder that the Kickstarter of our Balancing robot, the Balanduino, is nearly finished.
We have already reached our goal of $10.000, but of course it would be great to get even more backers and pledges.

In the meanwhile we have recorded a new video of the robot with a GoPro mounted on the top.

For more information check out the prevouis blog post: http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/ and the Kickstarter page.

Documentation added for the USB Host Library

February 20th, 2013 19 comments

I’m happy to announce that documentation is now available for all the libraries I have written for the USB Host Shield library.
The documentation is available at the following link: http://felis.github.com/USB_Host_Shield_2.0.
The documentation is generated using Doxygen which is a free documentation-generator based upon the header files in the source code.

For instance the following comment will end up looking like this in the documentation:

I hope this will be useful for people who is new to the USB host library or even people who just want a quick overview.
If you spot any typos or got any comments please let me know in the comments below.

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:

USB Host Shield is now available in the webshop

January 17th, 2013 41 comments

This is a short announcement regarding the USB Host Shield from Circuits@Home, which we are now carrying in in our store.
By buying the official shield you will support the continous development of the library and get support from us!
The shield can be found and bought here: USB Host Shield 2.0 for Arduino.

The shield can be used with almost any kind of Arduino including the most popular Arduino Uno, Arduino Mega, Arduino Leonardo etc. If you are in doubt if your Arduino is supported please don’t hesitate to write a comment below.

The USB Host Shield will allow you to use any of the Bluetooth and USB libraries I wrote.
Read more…

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:

Xbox 360 receiver added to the USB Host Library

December 29th, 2012 54 comments

You asked for it and here it is.
I finally got the time to implement support for Wireless Xbox 360 controllers to the USB Host Library. This is done via a Xbox 360 Wireless receiver that is normally intended for Windows computers.

The source code can be found at github: https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXRECV.cpp
There is an example as well: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Xbox/XBOXRECV/XBOXRECV.ino.

The receiver supports up to four controllers internally, so it was fairly easy to implement it.

Actually I havn’t tested the library with more than one controller, but if somebody out there could confirm if it’s working or not, with more than one controller, I would really appreciate it!
Thanks to Tim, multiple controllers is now confirmed to work!
Read more…

Categories: Arduino, TKJ Electronics, USB Tags:

A practical approach to Kalman filter and how to implement it

September 10th, 2012 210 comments

I have for a long time been interrested in Kalman filers and how they work, I also used a Kalman filter for my Balancing robot, but I never explained how it actually was implemented. Actually I had never taken the time to sit down with a pen and a piece of paper and try to do the math by myself, so I actually did not know how it was implemented.
It turned out to be a good thing, as I actually discovered a mistake in the original code, but I will get back to that later.

I actually wrote about the Kalman filter as my master assignment in high school back in December 2011. But I only used the Kalman filter to calculate the true voltage of a DC signal modulated by known Gaussian white noise. My assignment can be found in the following zip file: http://www.tkjelectronics.dk/uploads/Kalman_SRP.zip. It is in danish, but you can properly use google translate to translate some of it. If you got any specific questions regarding the assignment, then ask in the comments below.

Okay, but back to the subject. As I sad I had never taken the time to sit down and do the math regarding the Kalman filter based on an accelerometer and a gyroscope. It was not as hard as I expected, but I must confess that I still have not studied the deeper theory behind, on why it actually works. But for me, and most people out there, I am more interrested in implementing the filter, than in the deeper theory behind and why the equations works.
Read more…

Categories: Guides, TKJ Electronics Tags: