3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Bar End Brake Light: BEBL

Step 12Debugging

Debugging
«
  • schematic_cartoon.png
  • bebl_schematic.png
I was shocked when I followed these instructions and the thing worked first try.  There are several things that could have gone wrong from a bad solder joint, to a good solder joint in the wrong place.  If your light doesn't come on, to take a deep breath and avoid panic.  You've put a lot of work into this and we can figure out what the problem is.  The good news is that the schematic is simple enough to check by hand.  If you find an issue, re-solder or correct as necessary. 

Here is a series of debugging steps to consider:

1. Start at the battery.  My fresh battery reads 5.5 Volts.  Replace the battery if necessary.

2. Ensure the switch is turned on and check Accel power in.  Accel pins VIN and GND should have the same voltage as the battery.  If so go to 3. 
2.a Check that the positive battery terminal has connectivity to VIN.  If so, goto 2.b.
2.a.1 If it is not, remove the battery and check connectivity from the battery positive terminal to the middle switch pin.  
2.a.2 Check that the other switch pin has connectivity to positive battery terminal when the switch is on.
2.b Check that the negative battery terminal has connectivity to Accel GND. If so, replace the battery and start over -- you've got power to the Accel.
2.b.1 Check battery - to ground rail.
2.b.2 Ground rail to Accel GND.  If so, replace battery and start over.  You should have power to the Accel.

3. Check Accel power out.  A volt meter on Accel GND and +3.3V should read about 3.3 volts.
-- Yikes, bad Accel voltage regulator.  Replace.

4. Check that the voltage potential between ground rail and VCC rail is 3.3V.  If not, check the connection between Accel 3.3V to VCC rail.

5. Check power on MEGA chip pins 7 and 8.  They should have a 3.3V potential.  Check jumpers to central rails.

6. Check that the LED is in the soldered with the correct polarity.
Set the multimeter to read resistance.  Connect red probe to the cathode of the LED, black probe to the anode (see diagram).  You should read about 1000 Ohms resistance.  If not, flip it the other way.

7. Reprogram the chip with this line  near the bottom of the file un-commented:
  "// digitalWrite(DBG_LED_PIN, ((count % 1200) < 600));"
This sets the Arduino pin4 (physical pin6) on an off in one second intervals.  Put a volt meter between pin6 of the socket and ground.  Voltage should vary in one-second intervals.  If it does not, you have a bad LED -- swap it out.

8. If the LED blinks but brake light never comes on, check Accel pins x and z. for voltage between 0.5 and 2.5 volts. If not replace Accel.

9. If master works but not slave, recheck connections.

10.  If all else fails, recheck every connection in schematic.  Then ask me.  I'll respond to your questions.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
7
Followers
3
Author:WyoJustin(Justin Shaw)