loading

I recently moved up to San Francisco and, being an LA native, have noticed a few cultural differences. The first and most noticeable is that any store, whether it be a 7-Eleven or hardware store, always carries fancy artisan chocolate. The second is that parking is crazy, even crazier than LA. That is why I built the Street Sweep Saver. You are bound to rack up a few parking tickets in this city, so why not avoid a couple with this alarm that reminds you to move your car for street sweeping?

The Street Sweep Saver is an alarm that rings 10 minutes before street sweeping begins on your block. The alarm is made with an electric bell controlled by a beagle bone black board. I designed a wooden casing that hides the electronics. Mount the Street Sweep Saver to your wall or place it on your kitchen table next to your daily cup of joe.

Parts List:

BEAGLE BONE BOARD

CIRCUIT

BOX

  • 3/16" thick plywood
  • wood glue
  • painters tape
  • clamps
  • vinyl or sticky paper
  • hand drill

Step 1: Communicating With the Beaglebone Black Board

This project is my first experience with the BeagleBone Black Board. In my opinion, the BeagleBoard is quite similar to the RaspberryPi board but with more gpio pins. Read more about the BeagleBoard at its official community site and discover the main differences between the BeagleBoard and Raspberry Pi here.

This project uses a Rev C BeagleBone Black board running off a 16G micro SD card flashed with the Debian environment. You can use any size micro SD card greater than 8G. Although the new BeagleBone Black Board has a 4G onboard processor, Debian's desktop environment requires more storage space. To interact with the board, simply plug it into your computer with the micro HDMI to USB cable that comes with your board. The 'user leds' located next to the ethernet port should flash in a pattern programmed to mimic the human pulse (the beagle makers are cool, right?) and the board's icon should pop onto your Desktop. If you are using a mac, you can program your board two different ways:

METHOD 1: THE TERMINAL

    Open the terminal and type into the command line
    ssh root@192.168.7.2
    
    If when you are prompted for a password, type
    root 

    ** If this doesn't work because of an "offending ssh key" **

    Type into the command line

    rm -f .ssh/known_hosts
    ssh root@192.168.7.2
    

    ** If this still doesn't work **

    Type into the command line

    sudo ssh root@192.168.7.2
    

    METHOD 2: DEBIAN ENVIRONMENT

    You can also vnc into the board's desktop environment and program it from there. Follow the steps below to do this.

    • Download Remote Desktop Connection for mac from here.
    • Open Remote Desktop Connection and in the input box for 'Computer' type '192.168.7.2'
    • Inside the remote desktop pop-up, type 'root' for both the username and password.
    • You will be presented with the Beagle Board's desktop.

Step 2: Installing Adafruit's IO Python Library

The Beaglebone Black Board has lots of gpio pins, 65 in total, making it unique amongst the many mini computers and microprocessor boards on the market. Two gpio libraries compatible with the Beagle's gpio pins are BoneScript's built-in library and Adafruit's Python GPIO library. Because I am personally more comfortable with Python, I decided to use the Python GPIO library. The library is fairly simple to download. First, ssh into the Beagle Board and install the following dependencies:

sudo ntpdate pool.ntp.org
sudo apt-get update
sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus -y

Then type the following command into install the python gpio library

sudo pip install Adafruit_BBIO

Step 3: Code

The alarm uses Python's time library to calculate the current time in hours and minutes. If the current time equals the time 10 minutes before street sweeping comes, the bell rings twice. Change cleantime1, cleandate1, cleantime2, and cleandate2 to match your street sweep schedule. The first line of the code may also need to be altered, which will be explained more in the next section.

# **ALTER IF NECESSARY**
#!/usr/bin/python 

import Adafruit_BBIO.GPIO as GPIO
import time

# pin P8_10 is the bell
GPIO.setup("P8_10",GPIO.OUT)

# ex format of time.strftime: 'Tue Jul 29 21:44:18 2014'
now = time.strftime("%c").split(' ')
now_weekday = now[0]
now_month = now[1]
now_day = now[2]
now_time = now[3]
now_year = now[4]

# hm = hour & minute now
hm = now_time[0:5]

# Example days and times for street sweeping. Changes these for your own street. 
# Use a 24-hour time format. Days are the first three letters, beginning with a capital letter

** ALTER IF NECESSARY **
cleantime1= '07:50'
cleandate1= 'Mon'

cleantime2= '07:50'
cleandate2= 'Fri'

if cleantime1==hm and cleandate1==now_day or cleantime2==hm and cleandate2==now_day:	
	# bell rings
        GPIO.output("P8_10", GPIO.HIGH)
        time.sleep(0.5)
        GPIO.output("P8_10",GPIO.LOW)
        time.sleep(0.5)
        GPIO.output("P8_10", GPIO.HIGH)
        time.sleep(0.5)
        GPIO.output("P8_10",GPIO.LOW)

Step 4: Running Code From Startup

We don't want to manually call the code every time the BBB turns on. Instead, it would be best to have the code run automatically when the board boots up.

Say, for example, the code given in the previous slide is saved under the name 'warning.py' and lives in the directory '/root/Desktop/SideParking'.

First, edit rc.local by typing into the Debian command line

 > nano /etc/rc.local
A window will appear with the following content
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0
Add the path of warning.py before the line 'exit 0', as shown below
/root/Desktop/SideParking/warning.py

Now the BBB will automatically look at this path and execute warning.py upon boot. However, there is one more thing we have to do. We have to make the file warning.py executable. An executable file is a computer file that contains instructions in a form that a computer's operating system can understand and follow.

When a python script is executed in the terminal, it is normally done inside its own folder with the command

> python warning.py
However, this script can't be called elsewhere, which is problematic if we want to call it from rc.local. We avoid this problem by adding #! followed by the path to python at the top of the python script
#!/usr/bin/python
The example path above may not be everyone's path. To find your BBB's specific path to python, type into the command line
> which python

Next, alter the script's access permissions by typing the command

<p>> chmod +x warning.py</p>
This command gives anyone file access permissions. Test that chmod worked by typing
./warning.py

outside the folder where warning.py lives. If chmod worked, warning.py should run.

Finally, test to see that the script runs from startup by rebooting the board. Type in the command
> reboot
ssh back into the BBB with the command
> ssh root@192.168.7.2

and warning.py should run automatically.

Step 5: Circuit Schematic

The circuit above is recreated in the next couple steps on a BeagleBone Board protocape. A few notes on the schematic:

  • For the 6V power supply I used 4 1.5V AA batteries and a 4 AA Battery Holder from RadioShack. Make sure to connect the ground on the battery pack to the ground on the BBB. The positive end of the battery pack connects to one lead on the electric bell (modeled as a switch in this schematic).
  • The second lead on the electric bell connects to the collector on a 2N222 npn transistor. This transistor acts like a relay, where pin 'P8_10' on the BBB controls the collector-to-emitter current flow.

Step 6: Preparing the BBB Protocape

The BBB Protocape kit comes with a pair of header pins. Stick the header pins into the female pins on the BBB and break the remainder off. Rest the Protocape on top of the header pins and solder them together.

Step 7: Soldering the Circuit

Solder the circuit illustrated earlier into the BBB protocape. Make sure to solder the transistor's base to pin 'P8_10' as shown in the diagram. To connect the electric bell to the protocape, I soldered two wires into the board. Alligator clips connect the wires to two small metal nubs on the back of the electric bell.

Step 8: Powering the BeagleBoneBlack

Power the BBB with a 5V 2-3A AC power adapter. Plug the barrel connector into the 5V barrel socket on the BBB.

see section 7.2 at http://www.adafruit.com/datasheets/BBB_SRM.pdf

Step 9: Cutting the Box

I built a custom enclosure for the electronics with our in-house laser cutter. To do this, I modeled what I wanted the box to look like in Inventor, converted the pieces to pdf files, and brought them into Abode Illustrator to be printed on an Epilogue Laser Cutter. However, it is also just as easy to use a pre-made box as an enclosure.

I have included pictures of the CAD model and pdfs of each Inventor part if you wish to recreate this exact box.

Step 10: Mounting the Bell

The front face of the box is designed as a mount for the bell. The electric bell comes with three holes on its back plate for this purpose. Remove the face plate over the bell's electromagnet to access it top mount hole. Thread the screws through the top and bottom holes, as shown in the image. I only ended up using two of the three holes I cut into the board. The large slot in the board slides over two metal nubs on the bell that will be wired to the board. It's important that you can still access these nubs once the bell is mounted. Use a pair of washers and nuts to screw the bell to the board. Depending on the type of bell you buy,the hole spacing may be different, so use a pair of calipers or a ruler to take measurements. The bell should now be mounted firmly to the board. Replace the bell's metal casing to protect the electromagnet.

Step 11: Gluing the Case

Paint the box's inner teeth and edges with wood glue, and apply masking tape to adjacent edges to hold them in place while drying. To be safe, I also clamped opposite walls together. Wait a minimum of 30 minutes for the box to dry.

Step 12: Decoration

I designed the back panel of the box to look like a "no parking sign", and vinyl cut a sticker to be placed on this panel. You can easily buy 8.5" x 11" injet photo stick paper, print out a no parking sign, cut it out with an x acto knife, and stick it to this panel.

Step 13: Putting It All Together

Thread the power plug through the back of the box into the case. Then stack the BBB on top of the external battery pack and place it in the case. Find the two nubs on the electric bell poking through the case (circled in red in the photo). Take the the alligator clips and attach each to one of the nubs.

Step 14: Optional Mounting

This alarm can sit on top of your desk or be mounted to your wall. Simply buy a pack of command strips and stick them to the alarm's back panel.

Step 15: The Final Product

The Street Sweep Saver is complete!

<p>y ancient pentium running windows had a calender and I could do alerts. Since I never turn it off.....well yaknow. it does same thing. When you live in NYC you learn very quickly where you can and cannot park, and when, you do not park w/o knowing what tomorrow is going to bring. So remember when visiting New York, park in NJ , take the train over and party on....no dwi's either! This is good for teaching to the beagle as others have said. </p>
<p>Is this just a watch with an alarm? I mean, if you strip away the cool parts, isn't it just a watch with an alarm that you hang on the wall? Well, even if it's just an elaborate alarm, it's still a nice intro to the BeagleBone. Programming these boards is downright civilized!</p>
<p>I was going to say the same, but thought it might be a bit rude...but since it's been said - yes, it's a calendar type alarm. It could easily have extra outputs for multiple alarms, such as your Wife's Anniversary (come on men, you know it doesn't really belong to both of you), your mother's birthday, reminder to put out the garbage and/or recycling etc. Being a little more into the AVRs, I can't help thinking it might be as easy or easier to do this on an Arduino or ChipKit. I think it would be a super cool project if you had a time/date/repeat entry function where you could specify the alarm time and day, repeat daily, weekly, monthly, yearly or just once then delete, and pin to activate on alarm. This would allow for many alarm types and very versatile scheduling. So for instance, if your Wife's anniversary is October 12th, you set an alarm for October 10th (to give you time to prepare) to go off once a year at 10AM, 12 Noon and 11 PM (because lets face it, sometimes life gets in the way) and this activates pin 12 lets say, which is connected to a taser in your bed on your side.</p><p>Another alarm can be set for Sunday at 8pm weekly on pin 10 that turns off the TV to remind you that even though the football game is on, it's time to take out the trash for Monday's collection. Yet another can be set for 6AM daily to activate your automatic cat feeder so the bugger doesn't wake you up 2 hours before you need to be up.</p>
Oops. Trying to be positive about it! It's certainly better than the bicycle toast rack that was featured years ago!<br><br>The way he did it makes the programming a lot easier than any other embedded system. If I'm understanding this, He just started an ssh session and got to work. There's no special tools or programmers, etc. Having worked on a lot of embedded systems, not having to cross-compile, install a programmer, etc is appealing.<br><br>You can almost always make something cheaper but it comes with the cost of the initial investment. And ATtiny or MSP430 part could be cheaper but you'd have to design (or buy) a PCB, solder it, buy or make a programmer, install the tool chain, remember C, etc.<br>
<p>Ya, but I like making PC Boards etc...LOL...</p><p>I'll have to look more into this though, but the hardware I tend to make needs to be kinda standalone, and needs to have pretty fast access to the hardware directly. Here's one of my little circuits based on something a couple other guys made using about 10 miles more wire....</p>
<p>Oh - it's for one of those RGB LED cubes, except mine runs just about everyone's code (although some needed slight modification)</p>
<p>Out of curiosity - how do you know when the sweep is going to happen? Does the service doing that have some kind of public schedule? Living across the pond this is a mystery to me!</p>
<p>Yes. The Schedules are posted on the sides of the street on sings with dates and times. This is the type of instructable for people who can never find their keys...</p>
<p>Oh, I guess to fully grasp the situation I'd need to experience that situation myself... :)</p>
<p>Dot, this is super funny! This reminds me of a really funny part of a David Foster Wallace book: http://bit.ly/1nXna9x</p>
<p>I have a similar device, but mine reminds me to send a curt letter to DPT telling them I hope they choke on the enclosed check for the ticket for blocking my own driveway.</p>
<p>Nicely done, but a more appropriate title would have been something to do with </p><p>BeagleBone. Compared to the totality of this Instructable, &quot;Street Sweep Alert&quot; is such a minimal part of the project that it barely begs mention. It could be for any type of alarm.</p>
<p>In San Francisco, and other cities, when there is a tow a zone based on time, there are street signs telling the times.</p>
<p>Nice pictures, detailed instructions, excellent concept. This is an exemplary instructable! Great work!</p>
<p>HA! What a great way to make a laugh from a chore and to make sure you move your vehicle. It's far too easy to ignore those cell phone alarms. Thanks for the detailed build instructions. Good stuff!</p>
<p>Awesome instructable! I love how you used the not-so-common electric bell!</p>
<p>Nicely done!</p>

About This Instructable

25,664views

85favorites

License:

Bio: I tinker with things at Instructables.
More by 10DotMatrix:Print A Bone on the Ember Printer chandelier earrings Connect 4 Face Mosaic 
Add instructable to: