SlouchyBoard - an Annoying Way to Keep You From Slouching (Intro to EasyEDA)

12,189

49

18

Introduction: SlouchyBoard - an Annoying Way to Keep You From Slouching (Intro to EasyEDA)

About: I am a Physics and Creative Tech Double major at Berry College.

Slouchy board is a small 30mm x 30mm PCB (Printed Circuit Board) that uses a tilt sensor, a piezo buzzer and an ATTiny 85 to make an annoying sound when the user is slouching. The board could be attached to a users shirt or hat so that when they lean forward, the metal ball in the tilt switch rolls forward and completes the circuit. The tilt switch that we used is very noisy and can cause some coding challenges but can be made to work. A mercury switch would have been better though.

The following individual components were used for breadboarding, The Elegoo Arduino Uno kit (https://amzn.to/2DC0WVS ) is a great place to start breadboarding, it has all the necessary components (except the tilt switch) to make this project and many more that you can use to create your own. If you would like to get the components separately they can be found below with their respective links.

($8.50) Arduino Uno (https://amzn.to/2DACxQN)

($6.50) Jumper Wires (https://amzn.to/2XLF1Dy)

($8) Resistors (1k and 10k) (https://amzn.to/2Pzns6O)

($4) Piezo Buzzer (https://amzn.to/2DLtRqT)

($6 )Tilt Switch (https://amzn.to/2GHuO3Q)

($10) SWITCH ALTERNATIVE: Mercury switch (https://amzn.to/2DyHg5q) You can try to use this but I am not sure how it works as I haven't used one.

The following components and software were used to make the final product, note that you could skip the breadboarding phase since the circuit I will give you later does work but if you do any modifications, I recommend breadboarding first.

($25) To program the ATTiny85 you will need a USB programmer (https://amzn.to/2DC2Y8s)

($11) ATTiny + IC sockets (https://amzn.to/2L5R1OK)

($3) Piezo buzzer to solder into the board (https://amzn.to/2DyGYvi)

($8) Resistors (10k required) (same as the link above)

($6) Tilt Switch (same as the link above) or ($10) Mercury switch (same as the link above)

($3.50) Battery holder (https://amzn.to/2XJ5TUD)

($3) Batteries (https://amzn.to/2XLGWrK)

($8) Switches (https://amzn.to/2DA73KC)

Tools / Software

To make your boards you can go to EasyEDA and make a free account (https://easyeda.com/), boards usually cost $5 - $10 depending on how many are ordered, what color, sizing, etc...

($60) These are the soldering stations that we use in the lab (https://amzn.to/2UIRSV0)

These are the helping hands that we use in the lab (https://amzn.to/2IKIw9O)

The cost of this project can range anywhere from $5 - $100 depending on what components and tools you already have.

Step 1: Breadboarding

As mentioned before, I would breadboard before going onto EasyEDA to order a complete board. You want to breadboard to ensure that all the components you plan on using work and your code works. Programming the ATTiny 85 over and over is extremely annoying when you have to remove it from the circuit to place in the programmer first.

I connected the tilt sensor to digital pin 1 and read that pin as an input, you will need to wire in a 10k resistor which can be seen easier in the schematic (Note that this is the schematic for EasyEDA, the slide switch does not apply to this step).

I connected the buzzer to pin 0, made it an output pin and wired in a 1k resistor although it is not required.

I have attached my Arduino code for the rest of the logic with comments to hopefully clear up any confusion. If you have any questions feel free to ask in the comments so that I or someone else can try to help you out.

Step 2: Easy EDA - Schematic

When you get EasyEDA set up, start by creating a new project and make a new schematic. You want to make sure you place all the parts and connect them as I have shown in the schematic. On the left side, you can search the various libraries for the parts required and then place them in the schematic.

If you search for the following terms, you should be able to find all the items.

ATTiny85

C96101 (buzzer)

10k Resistor

AXIAL-6.5X2.3(1/4W) (Use this for the TiltSwitch Footprint)

C70376 (Battery Holder)

C92657 (Slide switch)

Once you have all the components placed, connect them to the correct pins and GDN or VCC. You connect them by using the wiring tool and placing the GND & VCC symbols.

Then once you have properly connected all the wires, you can click the convert to PCB button.

Step 3: Easy EDA - PCB Design

When you start in the PCB environment, you'll see a bunch of layers and numbers on the far right. Change your units to millimeters or whatever you want to use and change the snap size to something convenient. I made mine 10mm since I wanted my board outline at 30mm x 30mm but then changed it to 0.01mm once I started placing my components.

Start by editing the board outline layer (click the color and a pencil should appear) and then draw your board. Once you have this edit your top layer and start placing the components on the board how you want them by dragging them onto the outline. Since my board is 30mm x 30mm, the battery holder has to go on the back. You can change the layer of the component by clicking on it and changing it in the top right next to where it says layer.

Then once the components are placed, connect all blue lines with the wire tool, unless they are connected to GND or VCC. The GND and VCC connections connect directly to the board and don't need to be isolated.

Once all non-VCC and GND connections are wired together, you can use the Copper area tool to make the last connections. Do this once on the top layer and once on the bottom layer. Make sure that you change one of the copper areas to VCC in the properties tab, I usually make the top layer GND and the bottom layer VCC.

Once you have that done, the board should look complete and you can zoom in to see where GND connects to the board. At this point, you want to check for DRC Errors by refreshing the DRC Errors under the Design Manager tab on the far left. If there are no errors, you are good to go and order your board.

To order your board, click the button in the top ribbon with a G and right facing arrow to export your Gerber file. This will take you directly to where you purchase your boards, there are lots of options for different colors and finishes which will affect the price of the board, for PCB thickness, I think 1.6 is what we usually do.

Step 4: Soldering

Once your board gets to you, which usually takes about a week, you can get all your components together and solder them together. When doing this be sure that you orient in the correct way, this is important for the ATTiny 85 and the buzzer. The Tilt switch and resistor do not matter.

I find it helpful to use a rubber band to hold components in place when you are trying to solder in the legs as can be seen in the short video which covers soldering and how the board works.

Be the First to Share

    Recommendations

    • For the Home Contest

      For the Home Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge

    18 Comments

    0
    Arash mohammadi
    Arash mohammadi

    Question 3 years ago

    we have to code 555 timer and how?

    0
    eriuterbloopers888
    eriuterbloopers888

    Tip 3 years ago

    how about just use a NOT gate or logical inverter instead of attiny

    0
     Oncer
    Oncer

    Reply 3 years ago

    If it's all about the tilt switch why not just a buzzer and a battery? Certainly be cheaper than a $35 microprocessor. Though I slouch a lot so I would probably end annoying many other people with my buzzer!

    0
     Oncer
    Oncer

    Reply 3 years ago

    $35 is for the programmer sorry! $11 for the Atiny

    1
    JanoschS1
    JanoschS1

    Reply 3 years ago

    Yes, the ATTINY definitely is expensive for such a small device but it is great for prototyping to get the desired effect. The tilt switch we use has a little metal ball that bounces around like crazy so it would send lots of false positives if you connected it directly. The ATTINY is reading the tilt switch at a set interval and then uses that data to decide if the buzzer should go off. It is also needed to do some timing for the buzzer as well as send the frequency I wanted.
    The ATTINY is just nice to give you flexibility and it can be removed from the socket that is soldered into the board so it can be reprogrammed and used for something else.

    0
    Ortzinator
    Ortzinator

    Reply 3 years ago

    Hardware debounce circuits only require a few components.

    1
    M. DwayneS
    M. DwayneS

    Reply 3 years ago

    Hi Ortz, just took a quick review on debounce circuits (so, thanks for the learning opportunity). Sounds like a elegant, cheap and simple solution. Instead of programming intervals for when the "switch" is considered pressed (ie the tilt switch not level for more than just incidental movement), you select the right resistor/capacitor combo to set the On point.
    I think it could easily work especially for mass-produced/cheap items when the exact components are determined for the exact requirements of the application. However, for what the OP is doing, having the ability to program, on the fly, the desired specifications rather than swapping components if you wanted different settings would be much easier. It also allows the buzzer duration to be easily adjusted for the users requirements. So, it might be more expensive, but not exorbitant. Great thinking though.

    0
    JanoschS1
    JanoschS1

    Reply 3 years ago

    I have never used anything like that, how does that work?

    0
    dvyas
    dvyas

    3 years ago

    I think Instead of buzzer a small vibrator would be better. Nice and practical project though.

    0
    aking14
    aking14

    Reply 3 years ago

    First thing that came to mind when I saw 'annoying' and just a buzzer was 'taser'.. Maybe cut to 1/4 power so it doesn't knock you down. Or a $5 dog bark collar strapped to your leg wired up as the output device.

    1
    JanoschS1
    JanoschS1

    Reply 3 years ago

    haha, that's actually really funny and I regret not having done that. Maybe I'll go back and revisit that one day, although, I don't really want to test that on myself lol

    1
    JanoschS1
    JanoschS1

    Reply 3 years ago

    Thank you! Yes, there are definitely ways to make this more practical, however, this was just a small school project to introduce us to EasyEDA but also work within a small board. I saw a video of a company producing one with a vibration motor so I wanted to create a more annoying version haha

    0
    M. DwayneS
    M. DwayneS

    3 years ago

    Neat little device for long range drivers. Attach it to or build into a hat.

    1
    JanoschS1
    JanoschS1

    Reply 3 years ago

    Oh, I didn't even think of that, you could totally integrate it into truck driver headsets and if they ever lean forward too much (fall asleep at the wheel) it would wake them up by blasting that buzzer. That's another good idea!

    1
    audreyobscura
    audreyobscura

    3 years ago

    Oh my goodness, I just favorited this because I definitely need a project like this!

    0
    dockbrn
    dockbrn

    Reply 3 years ago

    Exactly ! But cool project. Remember K.I.S.S. is the best. I Haven't seen cool projects using Pbasic bs2p . I would love to see some projects using that platform. Just my two-cents.

    0
    Larryknox
    Larryknox

    3 years ago

    Great idea. May I suggest replacing the tilt switch (you’re right too noisy) with a tiny mercury switch. They are reasonably priced and availabie and eliminates the noise. It also has smoother operation.

    Used one to trigger an MP3 board when the lid to a box was opened. Simple solution so having to set up an accelerometer or the like

    1
    thetheway
    thetheway

    3 years ago

    Nice circuit.
    The ATTiny is a little on the pricey side for me. A cheaper way would be to use a NE555 DIP-8 High Precision Oscillator Timer IC Timer Chip.
    Do a search on the internet for 555 timer tone generator circuits and select the easiest one to make.

    eBay has 555 timers at 75 cents for 10 pieces, slide switches 86 cents for 20 pieces. mercury switches 75 cents for 5 pieces and a piezo buzzer 75 cents for 2 pieces. All items have free shipping.

    If you want to be really cheap just use a mercury switch, piezo buzzer, on- off switch and a battery to power the piezo buzzer and forget about all the electronics.