Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Balancing Bot

Status
Not open for further replies.
wow you're in for a lot of work!!
but its great when you get it working

here is my balancing bot
I use ir LED's and Transistors to see the distance from the floor
good luck with your project!

**broken link removed**
 
Wow, awesome job spindrah! Yeah, I know mine is going to be even more work and code because of the gyro, but with the help of this board, avrfreaks, as well as a Mr. Anderson who built nBot, I think I will do well on this project. I'm learning so much just from researching, stuff we didn't cover in my class is becoming so easy to integrate into the code and design. This is why I like labs so much, theres so much you can learn by actually doing it.
~Mike
 
Yes, looks great!.

Have you got any video clips of it in action?.

As for 'MrMikey83', have you considered starting off using simple sensors like this?, you could get it all working and the biggest part of the software proven and tested. Then replace the ground sensors with gyro's later, with minimal software changes required!. It would also extend the scope of your project, by showing how to upgrade and improve the basic design to a more functional one, based on varying conditions (ie, non-flat ground).
 
thanks
MrMikey & Nigel

I do have a Movie of it, BUT I don't know how to post it!!!

if you tell me how to do this i will be glad to post it.
 
spindrah said:
thanks
MrMikey & Nigel

I do have a Movie of it, BUT I don't know how to post it!!!

if you tell me how to do this i will be glad to post it.

The best bet is to place on some webspace somewhere, and post a link to it here - it may be too large to be uploaded here?.
 
So far, I am able to read the accelorometer and have found info on making a filter to combine both accelorometr and gyro.

I am now trying to get the remote control part to work. I have a JR XF421 radio control and the receiver has a PWM output for servos.
I am trying to read the PWM through a normal input pin. Can I do this or must I use interrupts? I have 5 channels on the receiver and only 2 interrupts, thats why I am using normal inputs.

I know I need to use the timer, but I have been having trouble trying to find info on using it. The datasheet is confusing to me and my class textbook is of some help but am still stuck.
I need to know what register the timer1 count is located in. I need to define this, then measure once when the pin goes high and again when it goes low, then find the difference.
~Mike
 
Hello!


Spindrah, send me your video by e-mail if it's less than 10Mo or by MSN Messenger (if you have it). I'll put it on internet for you, on the server of a friend.
 
MrMikey

i didn't see what micro you are using

but if it as a pic the reg is TMR1H and TMR1L (high and low byte of 16bit timer)
you also need to set up the T1CON register

also you have to read the low byte before you read the high byte
and you must write the high byte before you write the lowbyte
this is for the 18fxxx chips and is a must

JFDuval said:
Hello!


Spindrah, send me your video by e-mail if it's less than 10Mo or by MSN Messenger (if you have it). I'll put it on internet for you, on the server of a friend.

ok i will send it tonight

thanks
 
I'm using an ATmega32
 
OK, I beveive I have found the correct Timer register to call. Its TMR1. Should I use the 8 bit timer or the 16 bit timer? Does it matter?

Can anyone give an example code of how to read the PWM from the receiver with PIND.6?

Thanks!
~Mike
 
Not working for me.
 
Time to take back my thread...

Here is my progress on the balance bot. I have built a frame from aluminum stock from Lowes. The gears, motors and wheels are from a local RC hobby store. The batteries will be strapped to a peice of plexiglass on top of the two poles that extend upwards off the bot.

The radio controller I am using as well as the receiver are in the pic. The accelorometr and Gyro are on the small breadboard in front of the controller.

**broken link removed**
 
I might need larger diameter wheels...not a problem to change them though.
 
Hello!

The link is working, it's the video that can't be seen (by some people at least). The directory jfduv/ exist. Don't forget the slash at the end.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top