Raspberry Pi + Sonar + Instrument

Description:
Thrift-store mashup: Raspberry Pi, range finder and child's xylophone
Created:
1/13/2017 10:52:19 PM
Last Updated:
1/13/2017 10:52:19 PM

new

At Jaybird Labs, we are constantly trying to connect unusual things to each other as we develop NodeCode to ensure that we are are staying true to the mission of connecting people with anything that they can imagine and build.

We often find things when perusing second hand stores that are fun to hack.

On one trip we found a child's xylophone. We thought we could do a lot with this toy!

We removed the screws on the back to see how hard it would be to attach solenoids to each of the hammers. As you would probably expect, there's not a lot going on in there.

From here, we just did a quick and easy attachment of solenoids to the hammer using some old copper wire stranding.

 

 

We removed the screws on the back to see how hard it would be to attach solenoids to each of the hammers. As you would probably expect, there's not a lot going on in there.


 

 

From here, we just did a quick and easy attachment of the solenoids to the hammer using some old copper wire stranding. We ended up using two strands per solenoid and that was plenty to hold it in place.


 

 

Each of the 4 solenoids was then wired up to outputs of the Darlinton array that had a corresponding GPIO input from a Raspberry Pi.



The rest is visual programming within NodeCode.


 


We need the following nodes:

  • RasPi -> Pin Writer node for each GPIO pin
  • Raspi -> HC-SR04 node for the range finder
  • Logic -> Number Equality node for each pin.

The idea is simple. We use the distance as a trigger. Each time the distance equals the value in one of the equality nodes, the signal passes through and triggers the pin writer node. This then activates the respective solenoid.

 


We created a view and wired it up as well so that we can more easily see what is going on.


 

Visit NodeCode Downloads to download


 

 

 

Back to Project List