SainSmart InstaBots Upright Rover(Self-Balancing Robot With Arduino)

Introduction: SainSmart InstaBots Upright Rover(Self-Balancing Robot With Arduino)

Upright Rover is a self-balancing robot which was designed by SainSmart. They really made it simple. As you can see, there are only 8 wires on the robot and 8 wires on the controller. So let's find out how it works!

PARTS IN THE BOX

3x Potentiometer

2x UNO R3

2x USB Cable

2x Sensor Shield

2x 24L01

2x Joystick

2x Gear Motor

2x Wheel

2x Motor bracket

2x Coupling

1x T-Plug

1x 9V Battery Snap

1x MPU6050

1x L298N

1x Balancing Robot Platform

1x Wireless Remote Controller Platform

1x Box &wires & connectors

You can find the kits on this website.

Step 1: Opening Box and Soldering

There are so many boards!

Following the instruction on the website, we may solder the motors first. And it says that wires and capacitors can be connected to any electrode, so just do it. And about the T-plug, it need to be soldered as shown in the diagram. We should pay more attention to the T-plug or we will damage the motor drive controller board.

Step 2: The Bottom of the Robot

Assembling the bottom is easy. The expanded diagrams on the website is pretty cool and helpful. Just remember one thing, assembling the motor bracket before you put the motor on it.

Step 3: The Middle and the Top of the Robot

No difficulty.

Step 4: Wiring and Connecting of the Robot

I copied it from the website.

Battery:
Positive electrode -> VCC

Negative electrode -> GND

Board:

5V -> 5V

GND -> GND

IN1 -> D3

IN2 -> D4

IN3 -> D5

IN4 -> D6

ENA -> D9

ENB -> D10

MOTOR1 -> OUT1, OUT2

MOTOR2 -> OUT3, OUT4

Potentiometer1 -> A0

Potentiometer2 -> A2

Attention:

As not everyone solders the wires in the same way, if the wheels turn in the wrong direction swap the D3 and the D4 or the D5 and the D6;After adjusting the robot so that it can stand up, try to control it with the remote controller. If it can go forward and go back normally but cannot turn, please swap D9 and D10.

Tips:

If the potentiometers can not stick on the board tightly, you can solder the pins with a little bit solder wire.

Step 5: The Bottom of the Remote Controller

Screws and shims are needed for each tapped hole.

Step 6: The Middle of the Remote Controller

No difficulty but a pity. You can only tight two of the screws which were designed for the UNO R3. Because the other two of the tapped holes on the UNO R3 are too close to the components on it.

Step 7: Wiring and Connecting of the Remote Controller

Space between the four pillars is for the 9V battery.

Step 8: The Top of the Remote Controller

Step 9: Finish!

Assembling only takes me an hour, but my battery is still on shipping. So let's watch the tutorial video first!

7 People Made This Project!

Recommendations

  • Fix It! Contest

    Fix It! Contest
  • Water Contest

    Water Contest
  • Metalworking Contest

    Metalworking Contest

276 Discussions

Hello guys.

I would like to ask you about the SainSmart InstaBots Upright Rover V2,

i have the following problem, when the angle is -10 for example both motors works in the right position,but when the angle is +10 only one motor turns and the other do nothing.Have anybody any idea what is the problem??

Sorry for posting it here, but there was an instructable about the 6dof+remote combo for sainsmart that has been taken down and im looking for the working code like crazy. If anyone made the project please contact me cause all the code sainsmart provided didnt work properly.

Regarding the software code that is provided by sainsmart for our balance bots - need to be aware that the 'sampling time' had been set to 0.08. I decided to choose 0.001, which I assume to have units of seconds. As mentioned in a previous post, the "

lastTime" parameter doesn't appear to be initialised. So the intialisation should be something like:

unsigned long lastTime = 0;

And it also appears that the "lastTime" parameter is probably the same as "preTime". So the part that says:

float dt = (now - preTime) / 1000.0;
preTime = now;

Could be changed to this:

float dt = (now - lastTime) / 1000.0;
// preTime = now; // (remove this line, preTime = now;)

Also notice that the units of 'dt' is in seconds. But the line that says:

timeChange = (now - lastTime);

has units of milliseconds.

And the line that says:

if(timeChange >= SampleTime){

appears to be comparing 'timeChange' (which has milliseconds units) with 'SampleTime' (which has units of seconds). So something appears to be messed up here.

Next, the lines:

Input = f_angle;
error = Input;

should be changed to:

Input = 0;

error = Input - f_angle;

The next part is really weird..... the part that says:

errSum += error * timeChange;

It's weird because 'error' has units of degrees, while 'timeChange' has units of milliseconds. So the units of 'errSum' appear to be in units of (degrees x milliseconds).

Finally, as mentioned in a previous post, if you want to use a potentiometer for setting Ki, then the line:

//ki = analogRead(A3)*0.001;

needs to be changed to:

ki = analogRead(A1)*0.001; //ie. the analog pin should be A1, not A3.

1 reply

KennyL15
Any chance you could post your whole modified code for us to see what you have done?

I purchased the SainSmart InstaBots Upright Rover Kit Pro, and have had numerous issues with over 20 useless email exchanges with them, with no result. Still no working product.

The first thing I noticed when unpacking was the terrible quality of the boards, socket were not aligned the connector pins usually 90 degrees to the board were at all different angles, some about 80 degree. On first go it was impossible to get the Mega expansion board to line up with the Mega board. I had to get long nose pliers and adjust all the pins, some off by10 degree. After about 30 minutes the 2 boards could go together. Repeated process for the UNO expansion board. Immediate impressions, this stuff is junk.

After fully assembling the kit neither the remote nor the Rover worked. So started debugging, pulled it all apart.

First I could not program the remote UNO. I eventually discovered that the expansion shield when connected to the UNO, stops the UNO USB port working ? I downloaded the program without the shield on. I tested the expansion board on a Funtronics UNO and the same issue, the usb port stopped working.

Issue 1: So the UNO expansion shield is faulty. I replaced the SainSmart InstaBots SS-SBR-2.0 Sensor Shield with another brand I had at hand.

so down $6.11.

Next once the program was downloaded the LCD screen was garbled, junk characters. I started to try different libraries and eventually found one that worked. The code and library provided does not work, as this LCD comes from various manufacturers, this was not a Sainsmart board provided.

Issue 2: LCD library and code not for the board provided.

Next the Rover. I had connected an 11V external supply and the motors did not work. I traced through the circuit and found the regulator was only outputting 2 Volts. Having circuit diagrams for this boards would help been a great help and maybe I could have repaired it. But no circuit diagrams on their site, pathetic. The absence of SainSmart documentation is unbelievable. Compare this to other reputable providers such as Funtronics. I had a Duinotech brand L298 board and got that going, just to check the code and connections, all OK, motors work.

Issue 3: The SainSmart Protoshield Shield Mega expansion board is faulty. so down $11.99.

I Expected 1 hour work to get this going and now I have nothing. Only due to a very poor quality kit. With over 30 years of electronics this poor quality is unbelievable. A series of emails to their support provided absolutely ridiculous and laughable advice.

Finally they agreed to replace the fully parts only if i returned the two faulty boards to China. Given I have spent over days debugging and testing their poor quality parts I find this ridiculous. It will cost me more than the kit itself to package the goods, take to post office, take time off work and then send. Other reputable companies, e.g. Funtronics etc just replace goods without waiting for returns.

I also cannot believe that Sainsmart do not provide circuit diagrams for any of there products making them mostly useless. As a result I am going to buy another brand proto boards and just make up the plugs and motor driver. At least I then know the circuit for future expansion.

So now trying to get my money back. My advice is not to buy this kit or any products from Sainsmart as the chances they are faulty are high. I just cannot believe 2 items faulty.

The customer service is a joke, I never once got any technical help from them. USELESS !! Now their support has gone totally silent on me.

I really empathised with the story below that had the regulator fall off the board in the package. This sums up the quality on their products.

2 replies

Amigo comprou o Kit Pro também, eu estou tendo o mesmo problema, mas ele não sabe resolver. Você poderia me passar o programa de e-mail e visualizar a biblioteca? Agradeço antecipadamente.

werdn@msn.com

Forgot to mention that while trying to get the Meg shield on the board I saw that the motor plug pins short onto the top of Mega USB connector. So I filed them down and covered with insulator. I guess many people would get caught with this and short circuit the power. Some thing they don't bother fixing or telling poeple about.

Hello everyone! I quickly mounted version 2.0 robot with three trimmers, to be clear, I have uploaded the files on the robot and on the joystick, all right up there. the problem is that the robot is uncontrollable, the engines still running and I can not keep him straight in the self-balancing. I read here in the forum that the downloaded file Sainsmart there are mistakes, if someone can kindly post the files and if you can eliminate the three trimmers, and because when the robot is in the horizontal position, the controller remains in wait? Thank you in advance and I send you my greetings.!

Hi, I assemble this kit buying the parts and building the chassis. So far so good, except that the link between 24L01 constantly lost and recovered, making it impossible to maneuver the robot. I still have no definitive cause, but may electromagnetic interference generated from the engines, is damaging the link.

Anyone have any experience with this fault. It is able to solve this by installing capacitors between the motor terminals? Any ideas?

I am very grateful for the help I received thus far, but I ran into one more problem. The remote came with a LCD display, and I do not have a clue how to wire this in. Could you please help me with this?

2 replies

hi nice project man i buy it and it's really nice , and i have some questions could you please help me

The instructions say nothing about the robot's battery. What type of battery do you recommend?

3 replies

Close to 12V DC battery is recommended. I chose to go with a

"Fire Bull 11.1V 3300mAh 25C 3S Lipo". But I seriously recommend using a safety Lipo bag for both charging and storing these Lipo batteries. They have high energy in a small case. So if anything fails inside them, they're known to burn down houses etc. If you don't want to go down the Lipo path, then could just make up a battery Nimh battery pack that gets you to about 12 V DC.

Thanks. I got the battery you recommended, LiPo bag and a charger ordered.

Most welcome Stuart. Have fun with the bot. These things are definitely great to play and tinker with.

Kenny

The sensor shields that came with my Instabot are different from those shown though they are still made by SainSmart. The photographs of the wiring in the remote control are poor so I can not read what wires go where on my shield. Could somebody let me know in words how to wire this similar to the way it is stated for the robot wiring?

Thank you

Stuart

2 replies

True. The factory instructions could certainly be polished up a bit. Anyway, for the left joystick, you have GND, +5V, Vrx, Vry, and some other pin that won't be used. Those pins can then be connected (using wires) to G, V, A1 and A0 (in that order) on the shield. G stands for GND. V stands for supply voltage, and A1 and A2 will be the analog inputs.

The right-hand joystick will have the same pin format. Connect them to G, V, A3 and A2.