Author Topic: Why isn't the switch for my robot working?  (Read 1781 times)

0 Members and 1 Guest are viewing this topic.

Offline w31ha0Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Why isn't the switch for my robot working?
« on: July 30, 2015, 10:26:11 AM »
Hi,

I've tried building a robot and everything seems fine except for the switch. The motor keeps running even though I've tried turning the switch off.
The pictures are as shown:

Overview:


Zoomed




Any possible reasons why the switch may not be working? Thanks

Offline cyberjeff

  • Full Member
  • ***
  • Posts: 114
  • Helpful? 7
Re: Why isn't the switch for my robot working?
« Reply #1 on: July 30, 2015, 09:43:07 PM »
A voltohmeter would tell you if the switch was shorted, but shorted switches are  unlikely.

It would seem to me that there was a flaw in you wiring.

Offline Joseph Thurlow

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
  • The Enigma
Re: Why isn't the switch for my robot working?
« Reply #2 on: August 04, 2015, 11:24:01 PM »
Hi w31ha0,

Just turn the whole robot off and use a multimeter to check if the switch works.

Offline bdeuell

  • Robot Overlord
  • ****
  • Posts: 189
  • Helpful? 15
Re: Why isn't the switch for my robot working?
« Reply #3 on: August 05, 2015, 01:14:10 PM »
First when you ask a question it is really helpful if you tell us what we are looking at. I was able to pull the part number off the picture of your board and get the schematic. It appears you have a line tracking mouse sold by Pololu ... datasheet here https://www.pololu.com/file/0J175/line_tracking_mouse.pdf.

Below is my explanation of how the circuit works. for those of you who know electronics better than me feel free to jump in and tell be how bad this explanation is but i tried to simplify things and as a disclaimer electronics is not my expertise.

Assuming you have not altered the circuitry it appears the switch does not actually disconnect power from the motors but disconnects power from the logic circuit. RM and LM are the motors and the circuit functions the same way for both motors so i will only discuss the circuit for RM (right motor). you can see the positive negative terminal of the motor is wired directly to the positive battery terminal. Q3 and Q5 are NPN transistors (they are connected in a configuration called a darlington pair) that turn the motor on and off. Basically when a positive voltage is applied to the wire coming into the left side of Q3 (base) the motor will be on when it is connected to 0 volts the motor will be off. the large box labeled EM78P156 is a microcontroller, this is programed with the logic that tells the motors what to do based on the sensor inputs. R6 is a current limiting resistor that is needed to prevent the microcontroller and transistor from getting damaged. R12 is a current limiting resistor for D5 (an LED that appears to show the state of the motor) and again functions to prevent both components from damage.

Are you are seeing erratic behavior from your motors when the switch is off (sometimes off and sometimes on)? if this is the case i suspect that the microcontroller output pin 12 (for the right motor) is floating. this means that it is not tied to any voltage and could be any value. to fix this you could try a couple things:
- install a switch that actually disconnects the motors from the positive side of the battery.
- install a 10k pull down resistor to the microcontroller output pins 12 to ground and 13 to ground
- contact Pololu and see what they recommend

in any case let us know what you find


 
« Last Edit: August 05, 2015, 01:15:50 PM by bdeuell »

 


Get Your Ad Here