Getting Started with Raspberry PI

Originally, we set up this site to focus on woodcrafting and painting but as our interests grew, we have increasingly used Raspberry Pis to add motion and life into our work. This post will get you started using Raspberry Pi’s in your creations.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

Why Raspberry Pi?

  1. Powerful computing platform with easy-to-use languages.
  2. Low energy consumption and runs quietly and cooly.
  3. Rich online support and user base.
  4. Has 26 pins built in enabling rapid integration with Internet of Things (IoT) technology.

RaspberryPi 5

Peripherals

Today, most people developed on a laptop or tablet, but Raspberry Pi’s require old fashion peripherals: power cables, screen, keyboard and mouse. You need to setup a physical development environment and make sure you have all the necessary peripherals. Newer Raspberry Pi uses a Micro HDMI port so you will need a converter. We do a lot of coding on the couch so built a makeshift laptop as seen below.  

DIY RaspberryPi Laptop

A side view of our Raspberry Pi laptop.

DIY RaspberryPi Laptop

A front view of our laptop.

A mouse can get some to get use to so we recommend a wireless keyboard (seen above) with a built-in trackpad. One plus is the keyboard + trackpad only uses up one USB port.

The Hard Drive

A Raspberry Pi’s OS is stored on a Micro SD. To start we recommend getting two with at least 64 GB. If you do any images or sound the drive fills up fast. You will also need at least two readers. One USB A for the Raspberry Pi when you transfer code and one for your other machine to build the OS image from.

SD card and reader

Building the OS Image

You can buy Micro SD cards with built in OS. If you do not have a laptop or desktop that is you only real option. You can also build your own OS image using tool provided by Raspberry Pi. You dan download it here: raspberrypi.com/software.

We recommend modifying the advance setting to pre-configure your login and Wi-Fi password.

Booting the Device

Make sure to use the appropriate power supply as specified by RaspBerryPi. Depending on the version, booting can take a while. Once it has completed booting you should see a screen that looks like most standard desktop environments.

Linux Desktop

Raspberry Pi’s OS is ARM version of Linux. If you have used Linux most of the standard tools will be available. If you have only used Windows or OSX the environment should seem very familiar. All the desktop environments follow the same basic principles. If you have never used a desktop environment this is a great place to start!

Configuring Your Environment

The keyboard defaults to UK. If you are not in the UK many of the keys will not work as expected. In Preferences, open up the Mouse and Keyboard Setting then click the Keyboard layout button at the bottom. In the combo box choose the appropriate country.

We also recommend a smaller or not image for the background to use less memory.

Developing Your Next Big Thing!

We started using Scratch as a development tool. If that works for you and makes sense keep using it! Here is a link on how to install it on a Raspberry PI.

We have migrated to mow using Python and C++. To write code we use the Geany Programmer’s Editor. It lacks some features of Visual Studio Code (what we develop on in Windows and OSX) but has a light foot print.

Typically, we write code for a Raspberry Pi on both a MacBook and the Raspberry Pi itself. We do find the MacBook is similar enough environment we do not need to change our code too much. If you look at our code in GitHub we you we often have different logic based on which environment the code is run on. Note: there are some packages that only work on Raspberry Pi such as interfaces to sensors. In these sections of the code, we have non-functioning stub if the platform is OSX.

We transfer code using the SD reader. Both OSX and Linux auto-detect SD cards when attacked but with Linux it can take a bit so be patient. Also, sometimes Linux cannot write to large SD card so try a small on first.

Our next post will dive deeper into the basic of programming Python on a Raspberry Pi. For now, if you have never used Linux or a desktop environment we recommend just browsing the Web using Chromium (the open source base to Chrome) to familiarize yourself.

Happy Creating!

 

 

 

 

 

 

Bell Hopper – Contraption Delta

For our upcoming Maker Faire presentation we wanted to make robotics more approachable. One barrier to robotics is, by its very nature, it lacks a human element. To bridge this robot-human divide, the bell hopper design requires two humans working together to power and control it. This only one goal, ring the bell.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

Steampunk robot

The bell hopper ended up very similar to the first drawing of the concept, which is rare for us.  For the base board we used one of our small robot rig platforms. We use it to create supports for testing robot movements. It ended up looking so good we kept it for the final design. We always wanted ringing a bell to be the goal of the contraption, but originally did not think of using it as the head. Once we saw the bell with the body we changed the design to have it as the head because they fit so well together.

Steampunk robot

Here is a top view with the bell attached. The head’s weight caused a few engineering issues for us. The body was made of super light aluminum and the bell was heavy brass. To solve this we create a swinging counter balance inspired by the counter balance in Taipei 101.

air switch

For the switch to redirect the air we used a standard manual pneumatic lever. It is the same one we use for testing our robots.

Bike air pump

The power supply is a bicycle air pump painted bronze to look more steampunk.

Steampunk robotHere is the final design of the bell hopper.

It take two people working together to get the bells to ring. Cooperation is key! Come see it and more at this year’s Bay Area Maker Faire.

Happy Creating!

 

Leibniz Calculator- Contraption Gamma

For the upcoming Maker Faire the Hip Monster’s sisters team wanted a challenge. Something that required precision and also aligned well with our theme of education and steampunk artistry. What they choose to do was a true mechanical mind, a computer built with gears, the Leibniz Calculator.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

DIY Leibniz Calculator

This proved to be our hardest project to date. While videos online had it look simple the precision proved difficult. We first designed a rig composed of separate segments of wood so we could explore different layouts for the gears and rods quickly. Arguable the most critical part, the step drum (the wheel like gear) was completed by the sister team in a few hours which gave us false hope the whole project would be easy.

DIY Leibniz calculator

The step drum shown above is in the center of the device. It was made from a circular piece of wood with nine evenly spaced holes along its edge. In each hole we put screws of different lengths that could be adjusted with bolts to “tune” the device on the fly. At first, we thought this would be a temporary solution but in the end we did not modify it. The device proved to be finicky and our step drum’s ability to be tuned was essential to get it to work.

DIY Leibniz Calculator

Over months of trial and error and rewatching youtube videos endlessly we finally had the Ah-Ha! moment. The rig stayed in the exact same position on our workbench as a parade of other projects were started then finished as it rested, in complete. Then everything just clicked, one sister released that we were thinking two dimensional when the problem was in the third dimension. The the other sister fixed the rig and then the Leibniz Calculator worked like a charm.

DIY Leibniz Calculator

Here is the final design with some added steampunk flourishes. See it in person at this year Bay Area Maker’s Faire. This project only succeed by everyone working together, listening to everyone’s ideas and refusing to get frustrated. In the end it feel more like a piece of art than calculator.

The above video shows the user adding. You use the Leibniz Calculator by first positioning the step drum to the value you want to add, subtract or multiply. Then you rotate the drum. As it spins it engages the counting gear which keeps track of the current value of the computation. The key is, since the step drums spokes are of different lengths when the drum is rotated the counting gear only is turned based on the length of the spokes. You add by rotating the drum clockwise, subtract by counter clockwise and multiply by doing a full rotating the number of time you want to multiply a value by.  For example, if you want to multiply 5 by 4 you set the step drum to 5 and rotate it 4 times.

DIY Leibniz calculator

Above you see the tens dial to the left, showing 2 which is twenty (5X4).

 

Happy Creating!

Number One On Its Own

Number One looks very simple, it’s just a burnt out hair drier with wheels. As out first design we opted for a wheeled robot that followed a more traditional form, but it has been repeatedly updated over the years and now is completely autonomous with a mind of its own, making it one of our most complex robots. Powered by a RaspberryPi, our new Number One is now a Edge AI mobile sensor.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

DIY wheeled robot

The handle of the blow drier servers as a functional hub for the electronic component. The two batteries (one for the RaspberryPi and one for the motors) are attached to the back to allow for quick replacement. The camera is mounted at the top to provide a good overall view. The display, which is mostly for show, is forward facing. We added “bumpers” to the screen on each counter to help protect it in from falling or bumping in to something. The first screen hit a end table and developed a crack, which convinced us that it needed some armor.

DIY Wheeled Robot RaspberryPi

To protect the range finder, we added wooden bumper. Originally the range sensor had no protection, but after a few good hits we decided a bumper was a good idea. The range finder has proven to be sturdy but the wires to tend to fall off.

DIY Wheeled Robot RaspberryPi

Above is a back view. When we first built Number One it the components were completely attached using electrical tape. While this worked surprisingly well, it did not look good. Most components are now bolted on or attached using leather to help the robot look more aesthetic.

DIY Wheeled Robot RaspberryPi

The RaspberryPi is attached in front for easy access. The USB and other access ports are easily accessed allowing for quick repairs. We use a wireless keyboard to control the RaspberryPi. While the robot is autonomous (it makes decisions on its own) when it first gets power the AI part of the robot does not turn on. The robot can only become active after we execute a command. The original model turned on automatically, but that proved to be a bit of a headache when something went wrong.

Robot layout

The above image is the layout design using software from Fritzing.org. This is a far simpler layout that what we made for Number Two and Number Three. We may add more sensors over time, but to enable a fast response and to reduce power needs we decided to keep the number of sensors to a minimum.  Another difference is we are not using an Arduino to control the movement. For beginners this is a better design to learn with.

Here is Number One in action! Come see it live at this year’s Bay Area Maker Faire! 

You can download the code from our GitHub.

Happy Creating!

Wiring of Number Two and Three

The HipMonster’s sister team decided to push our robotics to the next level. They were dissatisfied with remote controlled robots with no personality or pre-programmed robots who were predictable. What they wanted was a more independent android which could interact with and learn from its environment. While AI would drive this vision, just as important would be sensors and mechanics to enable the robots to come to life.

To start upgrading Number Two and Number Three, we explored different wiring layouts using Fritzing. Fritzing is an open source software program that lets you design and prototype component layouts virtually. This is a great tool for experts and beginners alike and can save you time and money in developing your next electronic project. The images below are exported from Fritzing and show layouts for our improved robots.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

Fritzing diagram of steampunk robots

The above image is the layout for the Arduino and motors that allow the robots to move, as well as a decorative LED light. The linear actuators are controlled by H-Bridges and the motors by relays. We use a 12 volt battery for power. The Arduino receives commands from a RaspberryPi, which controls the LED light and  brings everything together. Written in C++, the code for the Arduino is based off of our Walker code.

Sensor diagram for steampunk robot

The above image is the layout for the RaspberryPi and the sensors. The signal processing and AI that is written in Python would live on the RaspberryPi. After much experimenting, we found it was best to have most sensors connected directly to the RaspberryPi and dedicate the Arduino completely to movement. Here is a good tutorial on using a motion sensor with a RaspberryPi.

While we wanted a robot with modern AI and technology, we still wanted a steampunk feel. So we decided to use wood for the baseboard, use vintage wiring techniques, and use leather to secure components and wires.

Computer parts for a robot

Once the layouts were finalized and the components acquired for our design, we started exploring different layouts for the baseboard. The baseboard is the most critical piece for our robot’s design. Not only does it secure all the electronics, but also provides structural support for the arm movements. While wiring the board, finding the right layout proved to be more of an art than science. The electronics, power, wiring and the robot’s skeleton all needed to fit together seamlessly, but often one or two components would refuse to play well with the others. The biggest issue was arranging the cabling to minimize stress on the connectors. For example, the HDMI slot needs to point downward or the stress would bend it over time. Number Two and Number Three also needed slightly different boards to work well with their different designs.

Wooden computer baseboard

Above is the final form of the baseboard with the mounting screws attached. Remember to test the sizing on the mounting screws on each component before attaching them to the board. Also make sure to double check your measuring before drilling holes.

Wiring robot components together

Here we are wiring the board for Number Two. We found it was good to test each connection after it was attached to make sure the wires had a clean connection and would not come off. While wiring two or three wires is easy, but after wiring a larger amount, mistakes can be made. If just one wire was in the wrong place or was stripped incorrectly, you could spend hours tracking it down. Thankfully both the Arduino and RaspberryPi are forgiving, but the sensors are not. If you wire a sensor incorrectly it will overheat and burn out.

Here is another view of us wiring the board. Before attaching it to the robots, we tested everyone repeatedly. Even our cat helped in the testing by batting the wires as the motors kicked in.

And here is the Number Three with its new board in action! The color circle indicates which sensor is receiving input. When the robot receives stimuli, it responds by either moving or speaking to try and encourage more stimuli.

Come see Number Three, Number Two, and more at this year’s Bay Area Maker Faire.

Happy Creating!

AI as Art

When designing Robot Freedom, our educational presentation on robotics, the HipMonsters  team wanted to make robotics and artificial intelligence (AI) approachable to a mass audience in hopes of inspiring the creators within all of us. To achieve this, the core principles for our AI design were defined by the Hip Monster’s sister team (ages 9 and 12 at the time), namely, robots should have distinct personalities, emotions, curiosity and be first and foremost pieces of art.

Robot Freedom's AI platform using S-O-R theory.

Given these principles, the foundation of our artificial intelligence framework (show above) is based on Stimulus Organism Response (S-O-R) Theory. S-O-R theory is a psychological framework that enables researchers to explore how stimuli (such as a bell) can impact an organism’s responses, (a dog salivating). Like Pavlov’s dog salivating at the sound of a bell, our robots learn and adapt as they experience outside stimuli and are always eager for more. The robot’s AI is driven by five personality traits that govern how they interpret and respond to stimuli. Below is how a signal from a sensor (stimuli) flows through our AI (organism) and results in an action (response).

Robot Freedom's artificial intelligence platform using S-O-R theory. Agent Stack

Central to the robot’s stimuli exploration is a sensor array of ten sensors ranging from sound to touch. When a robot receives a stimulus, it first processes the information based on its preset personality, then uses past experiences to choose a response based on its personality. Below is a color key to the robot’s sensor display panel.
Robot Freedom's sensor color chart.

 

These experiences are weighted based on the outcome of the robot’s actions allowing the robot to adapt responses to new stimuli. The robots can move, change visual effects, or talk using a chatbot. Below is the full software stack used in our robots.

Robot Freedom's AI platform using S-O-R theory full stack

All the processing is run on a Raspberry Pi and you can download if on our GitHub. Come see this in action at this year’s Bay Area Maker’s Faire!

Happy creating!

Number Three’s Controller

This post is an old one we forgot to publish a while back. Currently, Number Three is controlled by a script that is run on a Raspberry Pi sending commands to an Arduino. But originally Number Three was controlled by a wireless relay switch. We used wireless relays at first because they are simpler and we could just focus on the mechanics of the robots. As our robots got more complex, we had to migrate to Raspberry Pis. This post is a good overview of wiring a relay and even if outdated gives good insights. Also, a wireless relay may be useful in other situations.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please take a look at our disclaimer.

wiring for a robot control unit

Here is a 12-volt, 16 relay wireless board. It is typically used for lighting but we have other purposes in mind- robots! To begin here are some basics. To control motor you change the power going it. A motor needs positive (red wires) and negative (black wires) energy to work. A relay controls power going to an engine. When wiring a relay the wire that gives the signal (what tells the relay to be on or off) is usually a color other than red or black. In this case the color is light blue.

wiring for a robot control unit

Honestly there is not too many parts to this build just the relay, linear actuators, wire nuts and a lot of wires. We recommend doing the build in an area easy to clean and free from pets. When you cut the wires little bits of wires can fall to the floor may end up in the foot o a pet.

wiring for a robot control unit

The wiring for the relays proved to be more difficult than we thought because the wires were slightly thinker than the connection wanted.  We had to twisted them tightly to fit them in. If you are buying wire go with a thin grade.

wiring for a robot control unit

When doing a wiring job of this scale, over 64 wires, it is best have a plan laid out before starting and if possible divide the labor. Our plan was to wire in order or wire type (signal, positive, negative, output).  To make it easy we cut all the wires the same length. To attach the wires we used wire nuts but have migrate to using lever connection nuts for quick builds.  The wire nuts proved to be too finicky and we don’t recommend them until the final build.

wiring for a robot control unit

Here is a pile of pre-linked positive wires. Since we wanted to control a linear actuator we need to use two relays to control on the power. To make an actuator extend and retract you need to you flip positive to negative,  this is called reversing polarity. But one relay can on turn power on and off. So to be able to reverse polarity we needed to wire XOR logic gate. This is a good overview of how to control linear actuators and here is a good diagram on a XOR XOR logic gate.

wiring for a robot control unit

Here is the completed relay ready for testing.  Make sure all the wires are screwed in tightly and no fray wires are touching before pugging in the relay.

And what better way to test than knock something over and make a big mess!

wiring for a robot control unit

Here is the new controller installed on the back of Number Three. Since we are aiming for a steam punk robot the mass of wires is exactly the look we wanted.

Happy Creating!

Cosplay Dragon Tail

One thing we have always been jealous of is tails. Cats and dogs flaunt them as they strut around waving them in the air. So when making our dragon costume, we wanted a moving dragon tail that seemed alive. Not a dead tail, but one that had a personality of its own.

We searched through our past builds and thought the joint work on our little wooden robots would do the job. We also so some cool designs on the web like this one.

Please note, this material is provided for informational purposes only and is not a guide on how to create the designs. Please read our disclaimer.

Parts needed to build a cosplay, wooden, flexible tail.

This build just needed some wood, bolts, wood glue, rubber bands and lots of duct tape.

sistering two wooden dowels

Since we wanted the tail segments to interlocked we glued two pieces of 2X2 wooden dowels together. Be careful not to put too much wooden glue, it just needs a thin coat. Make sure to give it two days to dry, you don’t want it to come apart when you start cutting.

measuring wooded dowels

Measure out the segments carefully. You can vary the lengths depending one what look you are going for. We went with four inches length on the top part and one inch slots on the backside.

Here is a view of the final design. Each segment will have the same “hat” shape.

a cosplay, wooden, flexible tail.

Each hat will fit together in an alternation pattern. We tried making the segment in “z-shape” but it did not move as organically as the “hat-shape”.

Drill press

After carefully measuring, we used our trusty drill press to make the holes. Try to make a tight fit for the bolts. If the holes are too big the tail, may stick over time as the bolt cuts into the wood.

Making a cosplay, wooden, flexible tail.

Now it is time to assemble! It fits together like puzzle pieces. Make sure to put bees wax on the segments to protect the wood.

Create a base for a tail

Now on to the belt for the dragon tail. To create a base for the tail, we used cardboard and high grade duct tape. An earlier build with standard duct tape did not last very long. First cut out a piece of cardboard about 5 by 8 to help guide you as you “weave” the duct tape. The cardboard does not provide any real support but just helps you remember the shape. The bigger the base, the more stable the tail will be.

creating a base for a tail

Weave strips of duct tape alternating between vertical and horizontal directions. You want to use several layer, enough that it can support the tail.

creating a base for a tail

Next careful cut four slits in the base for the belts. We recommend two belts but one top belt can work depending on your custom. We used camping stapes for the belts with fast release clips to making taking the tail on and off easy.  Here is another design that we borrowed element from.

detail of a cosplay, wooden, flexible tail.

Next punch two holes in the base for the bolts to secure the L-braces. The L-braces will attach the tail to the belt. Use big washers when attaching the L-braces to prevent them from twisting into the duct-tape.

A cosplay, wooden, flexible tail being assembled.

Now, attached the tail using four wood screws. Use small screw and drill guide holes; you do not want to split the wood.

Top view of a cosplay, wooden, flexible tail.

Finally, add two rubber bands at the base to give it some life and your tail is ready to be flaunted!

Back of a cosplay, wooden, flexible tail.

Here is a back view showing how the base looks when completed.

Two cosplay, wooden, flexible tails side by side.

Here are both dragon tails completed!

Happy Creating!

Carved Wooden Seals

As presents for our teachers last year, we decided to make a series of wooden seals. We chose cats because of their iconic shape, and because of our own cat. We prefer using a Japanese saw because it gives us a clean cut and is much easier to use.

Please note, that this material is provided for informational purposes only and is not a guide on how to create the designs. Please read our disclaimer.

Making Wooden Seals

To get the basic cat shape we do rough cuts with the saw, then use a craving tool to clean up the edges. The make sure the vice does not cut into the wood we used scrape from an old pair of jeans.

Making Wooden Seals

To get the ears we need to create a negative space between the slanted edges we just cut. The do this we first cut several slots making sure to stop just short of the end of the slanted edge. You do not want got beyond that point or the ears will more like bunny ears than cat ears.

Making Wooden Seals

You want to have several slots cut to to make removing them easy. If the slots are too thick when you try to pop them out (the next step you could instead break off the ears.

Making Wooden Seals

Once we have cut the slots we use a chisel to pop them off. Make sure to go slow and start with the center slot. When you pop off the ones next to the ears make sure to have the flat edge of the chisel pointed towards the ear. Most of the time this works like a charm but sometimes the wood refuse to cooperate. If this happens to you try you best then try using other tools like a flat head screw driver. Worst case use the chisel to cut the out and if nothing works just start over.

Making Wooden Seals

Then we used the chisel to clean up the rough parts between the ears. Two of the seals in this batch had slots that broke off half way making the clean up job a bit hard. Go slot and do not use force. If the chisel is sticking it is either at the wrong angle or you are trying to carve out too much in one go.

Making Wooden Seals

We use a rasp to finish it out.  You can use sand paper as well but we like how you can shape thing with a rasp.

Making Wooden Seals

Next we used a spoke shave to round the edges of the square dowel to make it more cat-like. Again, do not force the tool. Just use a gentile motion while applied light pressure. If you use too much force you can cut into the wood.

Making Wooden Seals

Then sand to get the finished look. Remember to take the time to sand it right. After all the work it took to get here you do not want to spoil it by not having a clean surface for painting.

Making Wooden Seals

For a finishing touch we made a cut all the way around the seal to create a neck for the cat, We made sure the cut was not too deep and went evenly all the way around the body.

Making Wooden Seals

We then used a craving tool to widened the curve being careful not to cut too much out.

Making Wooden Seals

Here is a line up of all six seals ready for painting!

Making Wooden Seals

For each wooden seal we picked three different colors to create a unique theme. We used acrylic paint for these seals but you can us wood stain or oil paint if you prefer.

Making Wooden Seals

This one reminded us of lava!Making Wooden Seals

We painted the layers over time to make sure each color stood out and did not blend in with the rest too much.

Making Wooden Seals

All six seals with their paint jobs finished!

Making Wooden Seals

The seal for the wooden seals was made of an eraser.  We used wood carving tools to engrave them. Make sure you do a reverse image of what you want printed!

Making Wooden Seals

Here are the seals bases with their wooden carvings.Making Wooden Seals

We attached the eraser to the wooden seal using hot glue. Make sure to score the bottom of the wood seal and the eraser so you get a strong bound.

 

Happy Creating!

Wooden Pony Carving

Our pony carving was inspired by Pinkie Pie from My Little Pony. We love Pinkie Pie’s bright outlook and humor! When we found a scrape of bright colored faux fur in our recycled fabric box, we all thought of her right away.

Please note, that this material is provided for informational purposes only and is not a guide on how to create the designs. Please read our disclaimer.

Carved toy pony
This is a side view

We used balsa wood for the body and faux fur for the mane. It took a while to carve since ponies have a specific body shape. We first drew the basic outline on the balsa wood then cut out the rough shape with a saw. To make sure we did not damage the wood we wrapped it in leather when it was in the vice. Then we used wood carving tools and sand paper to finish the shape. The head was the hardest part to get right. Ponies have a very specific look to them. We used a wood carving tool with a groove to get the fur just right.

Carved toy pony

The mane was stapled on to the body then pulled over to cover up the staples. To give it a bright color we used a red wood dye. The dye also showed off the pony’s carved fur.

Wooden little pony

After a quick comb our little pony carving was ready to roam the world!

Happy creating!