Close
0%
0%

How to make a cheap $5 BOMB (Dallas style)

A sarcastic dig at law enforcement that arrested a kid with a clock at school.

Similar projects worth following
The AM007BOM is named "AM" after the boy named [Ahmed Mohamed] who was arrested and hand cuffed after taking a digital clock to school - then "007" to represent the apparent IQ and shoe size of the arresting officers and then "BOM" because it has digits which of course to some law enforcement, must mean it must be a BOMB!

This is a form of peaceful protest against the abusive handling of a boy who took an electronics project to school. The project was simply a digital clock and law enforcement decided to arrest and hand cuff the boy because it 'may' have looked like a bomb to some people.

In the country where I live - if a parent were to hand cuff a child then this action would be considered 'child abuse' by authorities and the child would be removed from the parents for the child's protection.

I seriously think we need to consider removing children from some authorities to protect the child! Perhaps we need better training for law enforcement on appropriate behaviour towards children and/or specialist officers to work with children.

In any case - the hand cuffing of an innocent kids is NOT OK!

  • 1
    Step 1

    HARDWARE:

    1) Get one Arduino Nano (or clone). I used one with an ATmega328 chip. $2.49 from ebay.

    2) Get one 4 Digit 7 Segment LED Clock Display. I used a 5462BS. A CL5642BH also works. I suspect that most of the ones with the colon in the middle have the same pinout. I will put the pinout below before the code. Positive goes to the 'Digit' and negative goes to the 'Segment' so it is a 'Common Anode' type. $2.49 from ebay.

    Plug them together like this -

    Now you can solder the pins of just bend them out to about 45 degrees. If you bend them out and then take them apart and then straighten the pins from the top ends, the board will clip back into place from the kinks in the bottom of the pins.

    The pinout is like this -

        1    a    f    2    3    b
        *    *    *    *    *    *
                 8.8.:8.8.
        *    *    *    *    *    *
        e    d    :    c    g    4
    

    The : pin is the colon (:) in the centre and works with Digit '2'.

    1, 2, 3, 4 are digits 1 to 4 from left to right.

    a, b, c, d, e, f, g are the seven segments in the standard order.

    The decimal points don't work / aren't connected.



    SOFTWARE:

    Warning: I did intend to 'Charlieplex' the display but I forgot when I was writing the dec to 7 seg routine so now the 'digit' pin will be drawing way too much power from the ATmega328 pins. This may (over time) damage the chip.

    I can change the code to include 'Charlieplexing' if anyone wants (just leave a comment).

    #define SegA   5  // Segements are active LOW
    #define SegB   9
    #define SegC   16
    #define SegD   18
    #define SegE   19
    #define SegF   6
    #define SegG   15
    #define SegDP  17
    
    #define Dig1   4 // Digits are active HIGH
    #define Dig2   7
    #define Dig3   8
    #define Dig4   14
    
    
    void setup()
      {
      digitalWrite(Dig1, LOW); // Off
      pinMode(Dig1, OUTPUT);
      digitalWrite(Dig2, LOW); // Off
      pinMode(Dig2, OUTPUT);
      digitalWrite(Dig3, LOW); // Off
      pinMode(Dig3, OUTPUT);
      digitalWrite(Dig4, LOW); // Off
      pinMode(Dig4, OUTPUT);
      
      digitalWrite(SegA, HIGH); // Off
      pinMode(SegA, OUTPUT);
      digitalWrite(SegB, HIGH); // Off
      pinMode(SegB, OUTPUT);
      digitalWrite(SegC, HIGH); // Off
      pinMode(SegC, OUTPUT);
      digitalWrite(SegD, HIGH); // Off
      pinMode(SegD, OUTPUT);
      digitalWrite(SegE, HIGH); // Off
      pinMode(SegE, OUTPUT);
      digitalWrite(SegF, HIGH); // Off
      pinMode(SegF, OUTPUT);
      digitalWrite(SegG, HIGH); // Off
      pinMode(SegG, OUTPUT);
      digitalWrite(SegDP, HIGH); // Off
      pinMode(SegDP, OUTPUT);
      }
    
    
    
    void loop()
      {
      static int hours = 12;
      static int minutes = 59;
      static int seconds = 50;
      unsigned long start = millis();
      while((millis() - start) < 500)
        {
        show_time(minutes, seconds, 0);
        }
      while((millis() - start) < 1000 )
        {
        show_time(minutes, seconds, 1);
        }
      seconds--;
      if(seconds == -1)
        {
        seconds = 59;
        minutes--;
        if(minutes == -1)
          {
          minutes = 59;
          hours--;
          if(hours == 0)
            {
            hours = 12;
            }
          }
        }
      }
    
    void show_time(int hours, int minutes, int colon)
      {
      int d1 = int(hours / 10);
      int d2 = hours - d1 * 10;
      if(d1 == 0) {d1 = 11;}
      int d3 = int(minutes / 10);
      int d4 = minutes - d3 * 10;
      set_digits(1);
      set_segments(d1);
      delay(5);
      set_digits(2);
      set_segments(d2);
      set_colon(colon);
      delay(5);
      set_digits(3);
      set_segments(d3);
      delay(5);
      set_digits(4);
      set_segments(d4);
      delay(5);
      all_segments_off();
      }
    
    void set_colon(int colon)
      {
      switch(colon)
        {
        case 1:
        digitalWrite(SegDP, LOW);  // Segements are active LOW
        break;
        default:
        digitalWrite(SegDP, HIGH);
        break;
        }
      }
    
    void set_digits(int digit)
      {
      switch(digit)
        {
        case 1:
        digitalWrite(Dig1, HIGH); // Digits are active HIGH
        digitalWrite(Dig2, LOW);
        digitalWrite(Dig3, LOW);
        digitalWrite(Dig4, LOW);
        break;
        case 2:
        digitalWrite(Dig1, LOW); // Digits are active HIGH
        digitalWrite(Dig2, HIGH);
        digitalWrite(Dig3, LOW);
        digitalWrite(Dig4, LOW);
        break;
        case 3:
        digitalWrite(Dig1, LOW); // Digits are active HIGH
        digitalWrite(Dig2, LOW);
        digitalWrite(Dig3, HIGH);
        digitalWrite(Dig4, LOW);
        break;
        case 4:
        digitalWrite(Dig1, LOW); // Digits are active HIGH
        digitalWrite(Dig2, LOW);
        digitalWrite(Dig3, LOW);
        digitalWrite(Dig4, HIGH);
        break;
        default:
        digitalWrite(Dig1, LOW); // Digits are active HIGH
        digitalWrite(Dig2, LOW);
        digitalWrite(Dig3, LOW);
        digitalWrite(Dig4, LOW);
        break;
        }
      }
    
    void set_segments(char digit)
      {
      switch(digit)
        {
        case 0:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, LOW);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, HIGH);
        break;
        case 1:
        digitalWrite(SegA, HIGH);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, HIGH);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, HIGH);
        digitalWrite(SegG, HIGH);
        break;
        case 2:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, HIGH);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, LOW);
        digitalWrite(SegF, HIGH);
        digitalWrite(SegG, LOW);
        break;
        case 3:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, HIGH);
        digitalWrite(SegG, LOW);
        break;
        case 4:
        digitalWrite(SegA, HIGH);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, HIGH);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, LOW);
        break;
        case 5:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, HIGH);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, LOW);
        break;
        case 6:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, HIGH);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, LOW);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, LOW);
        break;
        case 7:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, HIGH);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, HIGH);
        digitalWrite(SegG, HIGH);
        break;
        case 8:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, LOW);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, LOW);
        break;
        case 9:
        digitalWrite(SegA, LOW);  // Segements are active LOW
        digitalWrite(SegB, LOW);
        digitalWrite(SegC, LOW);
        digitalWrite(SegD, LOW);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, LOW);
        digitalWrite(SegG, LOW);
        break;
        default:
        digitalWrite(SegA, HIGH);  // Segements are active LOW
        digitalWrite(SegB, HIGH);
        digitalWrite(SegC, HIGH);
        digitalWrite(SegD, HIGH);
        digitalWrite(SegE, HIGH);
        digitalWrite(SegF, HIGH);
        digitalWrite(SegG, HIGH);
        break;
        }
      }
    
    void all_segments_off()
      {
      digitalWrite(Dig1, LOW); // Digits are active HIGH
      digitalWrite(Dig2, LOW);
      digitalWrite(Dig3, LOW);
      digitalWrite(Dig4, LOW);
      digitalWrite(SegA, HIGH);  // Segements are active LOW
      digitalWrite(SegB, HIGH);
      digitalWrite(SegC, HIGH);
      digitalWrite(SegD, HIGH);
      digitalWrite(SegE, HIGH);
      digitalWrite(SegF, HIGH);
      digitalWrite(SegG, HIGH);
      digitalWrite(SegDP, HIGH);
      }
    
    


View all instructions

Enjoy this project?

Share

Discussions

ArsenioDev wrote 10/13/2015 at 23:22 point

Barebones, I like it!

  Are you sure? yes | no

de∫hipu wrote 09/18/2015 at 09:52 point

I did exactly the same thing some time ago with #Banana Bomb, except I used a 3.3V Pro Mini and blue LEDs, precisely because I felt bad connecting them without any resistors. It also does beeping sounds when changing the digits, which adds to the movie-like representation of a bomb. I have plans for adding blue and red leads and detecting when they are disconnected, turning it into a game of sorts.

  Are you sure? yes | no

davedarko wrote 09/18/2015 at 04:57 point

I think you're fine without charlieplexing because otherwise you'd kill your red LEDs on 5V (?), or not?

  Are you sure? yes | no

Hacker404 wrote 09/18/2015 at 07:12 point

The LED's aren't overly bright. Both the display and the chip are warm but not hot. The problem is that the spec for Ioh for the ATmega is about 40mA and I have up to 7 segments being sourced from one pin for the digits. I expect that it is out of spec but it seems to be handling it fine. The LED on time is about 5mS. 

  Are you sure? yes | no

davedarko wrote 09/18/2015 at 07:37 point

I guess it might be better with green leds and a 3v3 version and also interesting to know how much current draw there really is. I still like your project, btw :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates