Close
0%
0%

Palm Power!

Control a robot with the twist of a wrist.

Similar projects worth following
Palm power is a device to control a robot’s motion through Bluetooth just by tilting a hand forward, backward, left or right. With touch switches to control additional features.

Palm power is an open source wearable device to control a robot's motion with just the tilt of a hand. Two potentiometers with off-set weights on their shafts are used to determine if the hand is tilted forward, backward, left or right. One potentiometer reads pitch and the other potentiometer reads roll. Three touch switches are included to add additional user defined controls, such as turn on LEDs for lighting.  At the heart of Palm Power is a MicroChip PIC24F16KA101. The PIC24F16KA101 reads the two potentiometers with two analog input pins. Three pins are configured for inputs to read the three touch switches. The PIC24F16KA101 communicates to a robot via Bluetooth with a JY-MCU V1.02 USART to Bluetooth module.

Agenda:

  • Assemble two potentiometers with mounting brackets and offset weights to sense the pitch and roll of a hand.
  • Design and assemble a circuit to read the potentiometers and touch switches.
  • Configure the PIC’s UART to send a data stream to a Bluetooth module.
  • Configure a Bluetooth module to communicate with a robot.
  • Program a robot to receive and execute the commands.

*License information is in the repository*

  • 1 × PIC24F16AK101
  • 2 × 10K POTENTIOMETER
  • 1 × jy-mcu Bluetooth Module
  • 4 × 10k 1/4 watt resistor
  • 3 × momentary push button switch

  • Palm Power controlling InspectorBot.

    Dennis08/25/2018 at 21:41 0 comments

    After some Python coding and pairing Palm Power’s Bluetooth to InspectorBot’s Raspberry PI Bluetooth, here is a short video of Palm Power controlling InspectorBot.

  • A step through of Palm Power’s program.

    Dennis08/25/2018 at 19:24 0 comments

    Palm Power’s program was written in “C” with MPLAB X IDE v3.05. The compiler was XC16. I love Micro-chip’s stuff.  It’s a nice development environment. Below is the beginning of the program. A typical start with the necessary libraries, registers being defined and functions.

    Next, the chip is set up, then “MAIN” sets up the ports and calls the subroutines for UART setup and the analog to digital setup. After the setups are complete, the program settles into a loop that continuously pauses 100ms, calls the analog to digital converter and checks to see if any new data has been received from the UART receive interrupt.

    Leaving the “MAIN”, we see the subroutines.  Below is the UART receiving decoder that is looking for the magic word “send”.  When it detects “send”, the sub “send_string” is called.  Send_string sends the present potentiometer values detected by the A to D converter and the present value of the three switches through the Bluetooth to the robot.

    The next few pictures are the UART and analog to digital sections covered in earlier updates.

    The complete program is available in the repository.

  • UART (Universal Asynchronous Receiver Transmitter) Port Code

    Dennis08/22/2018 at 00:11 0 comments

    The UART is used to send and receive data to and from the robot via a Bluetooth module. Below is the UART setup subroutine.  Calling the subroutine sets the UART for 9600 baud.  The subroutine also enables the receive interrupt and also enables the UART. 

    Next is the transmit subroutine.  Pretty straight forward, call the sub with the data and the subroutine sends the data and waits for it to send.

    Last is the receive subroutine.  The receive subroutine is part of an interrupt handler. The subroutine has ten registers to receive data.  Each time the UART receives data, the data in the registers are shifted up by one register. As data is being received, the receive subroutine mirrors back the data to confirm that the data has been received. Another routine checks the registers for the magic word “send”.  Once the word “send” has been received, the PIC will transmit the potentiometer and switch data to the robot. 

  • Analog to Digital Converter to read the potentiometers

    Dennis08/21/2018 at 01:06 0 comments

    Below is the setup code for the A to D converter. The subroutine sets up port A’s inputs RA0 and RA1 for analog and leaves the rest as digital pins. The subroutine also sets the A to D module to allow each input to be individually sampled.

    Below is the subroutine to sample and store the analog values for the two potentiometers. The subroutine consists of two sections, one for each potentiometer. The subroutine first sets the address of the input, starts sampling, waits 100ms and starts the conversion. After the conversion is done, all 10 bits of the value is saved in a register which will be used to build a string to send to the robot being controlled.

  • Palm Power’s circuit.

    Dennis08/20/2018 at 02:32 0 comments

    A PIC24F16AK101 is Palm Power’s controller. The Potentiometers with the off-set weights on their shafts are connected to the PIC’s analog-to-digital converter through RAO and RA1. Three switches are connected to the PIC through RB0, RB2 and RB4. The PIC24F16AK101 reads the values of the potentiometers and the switches, builds the data into a string and sends the string to the robot via the Bluetooth module each time the robot requests the data.

  • Analog tilt sensors

    Dennis08/14/2018 at 02:43 0 comments

    Build instructions are added showing the assembly of the DIY analog tilt sensors made from two potentiometers, scrap plastic and a couple of bolts and some nuts. The sensors will be used to detect the pitch and roll of a hand and used to command a robot to move forward, backward, left and right.

View all 6 project logs

  • 1
    Building the Analog Tilt Sensors

    The tilt sensors are made from a couple of potentiometers. The shafts need to rotate with very little torque to allow an offset weight on the shaft to move the shaft.

    A mounting bracket is cut from an old scrap box. Old plastic cases can make great building material to fabricate projects. I never throw anything away. :)

    Next, assemble the offset weight for the shaft.  Again, it is cut from an old plastic case and a couple of nuts and a bolt are used for the weight. 

    Slide the weight assembly onto the shaft of the potentiometer, and we have an analog tilt sensor.

    The weighted shaft should be able to move freely as the potentiometer is tilted.

    Once the two assemblies are mounted, they will be used to detect the pitch and roll of the hand. This motion will be used to control forward, backward, left and right motion of the robot.

  • 2
    Analog tilt sensors assembly

    Next step, cut a piece of plastic to fit in your palm.

    Position and glue the two tilt switches on the plastic board. One is positioned to tilt forward and backward, and the other tilt switch is positioned to tilt left and right.  After the glue is dry, add pop rivets to secure both sensors to the board.

    With the palm pointing down, both weighted shafts should swing freely. A little bulkier than I imagined, but it will work for the first proof of concept prototype.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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