Bluebot Self-Driving Car - Issues with slide switch powering motor

Ask questions about projects relating to: aerodynamics or hydrodynamics, astronomy, chemistry, electricity, electronics, physics, or engineering

Moderators: kgudger, bfinio, MadelineB, Moderators

Post Reply
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

For my Bluebot Self-Driving Car project, I am following the YouTube tutorials on the Science Buddies channel. I have hit a roadblock. I am trying to add the slide switch that will turn the motors on and off. I got the slide switch to sort of function but instead of turning the motors on and off it makes the motors spin faster and slower. I have checked my wiring to make sure it matches up with the video numerous times and it is the same. I tried switching some of the wires around and flipping the slide switch in different directions. My code is the same as the videos so I know it isn't a problem with the code. I'm not sure what seems to be the problem and I hope that someone is able to answer my problems swiftly. This is the link to the YouTube Video tutorials if you want to check them out: https://www.youtube.com/watchv=lLASgvqA ... 1S&index=4
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by bfinio »

Hi - can you please post pictures of your breadboard so we can take a look at the circuit? Make sure the photos are well-lit, in focus, with a top-down view so we can clearly see all the connections. You may need to upload multiple photos from slightly different angles. Also note that there are written instructions of this project on our site:

https://www.sciencebuddies.org/science- ... riving-car

with circuit diagrams in Figures 3 and 4 in the procedure. It may be easier to double check your circuit by looking at those diagrams instead of pausing the YouTube videos.
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

Here are 2/6 of the photos:
Attachments
Bread Board 1
Bread Board 1
IMG_9705.jpg (2.58 MiB) Viewed 16419 times
Bread Board 2
Bread Board 2
IMG_9706.jpg (2.55 MiB) Viewed 16419 times
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

Here is 4/6 of the photos:
Attachments
Bread Board 3
Bread Board 3
IMG_9708.jpg (2.94 MiB) Viewed 16419 times
Bread Board 4
Bread Board 4
IMG_9707.jpg (2.67 MiB) Viewed 16419 times
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

Here is 6/6 of the photos:
Attachments
Bread Board 5
Bread Board 5
IMG_9713.jpg (2.75 MiB) Viewed 16419 times
Bread Board 6
Bread Board 6
IMG_9711.jpg (2.48 MiB) Viewed 16419 times
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by bfinio »

Hi,

While it's a little hard to tell because there are so many wires, I double checked your circuit against the breadboard diagram and cannot immediately see anything wrong.

Unfortunately I leaving for the day and I am on vacation next week, and I'm the person at Science Buddies best equipped to help you with this project, but I will do what I can to leave some helpful advice, and then check in again when I am back:

1. As far as I can tell your switch is wired correctly. But you can eliminate the switch and just plug the jumper wires from the battery pack directly into the power and ground buses on the left side of the breadboard.
2. If you disconnect one of those wires, the motors should stop completely because they are not receiving any power.
3. If the motors still spin slowly even after pulling one of the battery pack wires, then they are somehow receiving power from the 5V on your Arduino. This could be due to several possible causes, such as:

a) a wire in the wrong place that neither one of us is seeing
b) an internal short-circuit on a damaged H-bridge chip (possible if you accidentally connected the chip wrong at some point)
c) a short circuit in the breadboard itself somewhere (this is highly unlikely)

4) I know you said your code is the same as the example code, but another thing to look out for is to make 100% sure that the Arduino pins you are using to control the motor are set as outputs. Trying to use pins accidentally set as inputs to control a motor can result in strange behavior like the motor spinning slowly.

It is much easier to diagnose these problems if you have a multimeter. We have a detailed tutorial about how to use a multimeter here: https://www.sciencebuddies.org/science- ... multimeter

You can use a multimeter to check for short circuits and to check for proper voltages (either 5V from the Arduino, or 6V when the battery pack is connected, depending on the pin/row). If for example you are measuring 5V between a pin and ground when the battery pack is disconnected, but you expect 0V on the pin (the H-bridge pins that are connected to the motors), that means there is a short circuit somewhere.

Assuming you purchased the Science Buddies kit, I would reach out to Home Science Tools, send them a link to this thread, tell them that you already talked to somebody at Science Buddies and ask them to send you a new H-bridge, as that may be the most likely culprit. If you purchased the parts on your own then you can purchase an extra H bridge. You might as well do that now since it will take a little time for the H-bridge to ship while you investigate the other possibilities.

Hope that helps - I will be back on September 3rd and will check this thread again then.
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

Hi,

I have removed the switch and moved the batteries pack wires to the power and ground buses and when I remove the wire the motors stop and when I add them back on it starts working again. Is there any possibility that the switch was faulty? If so would somebody from Science Buddies be able to send one to me?

Thank you! (Sorry for late response)
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by bfinio »

Hi,

It is generally very unlikely that the switch itself is faulty - they are generally pretty hard to break, unlike some of the other parts. It might be more likely that you had a loose wire or some wiring error that I couldn't see from the pictures. Regardless, for now:

1. You can operate the robot just by unplugging one of the battery pack wires instead of using a switch
2. Science Buddies does not ship out parts directly - our kits are sold through our partner Home Science Tools, but you can contact them, tell them you already spoke to Ben Finio in our Ask an Expert forums, and ask them to send you a replacement switch.

Please let us know if you have more questions,

Ben
WillowIona
Posts: 6
Joined: Fri Aug 16, 2024 10:10 am
Occupation: Student

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by WillowIona »

Hi,

I have been having some problems with a lot of my code and sometimes it's not obvious what the instructor is doing in the videos. Can you please point me to where I can download the working code?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Bluebot Self-Driving Car - Issues with slide switch powering motor

Post by bfinio »

Hi,

Can you clarify which videos you are referring to? The YouTube link from your original post back in August gives me an error when I click on it.

You can download starter code from step 5 in the procedure of the written instructions on our website: https://www.sciencebuddies.org/science- ... #procedure. However, this is code that is intended to help you get started controlling the motors and reading sensors. It does not have an algorithm to steer the robot based on the sensor information. We do not want to give that part away since this is a science project intended for students.
Post Reply

Return to “Grades 9-12: Physical Science”