Juicebox Zero Store https://juiceboxzero.com/ All about Juicebox Zero, the Battery Management Board for the Raspberry Pi Zero Sun, 07 Nov 2021 02:35:06 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.1 146647364 Juicebox Zero Compatible with New Raspberry Pi Zero 2 W https://juiceboxzero.com/juicebox-zero-compatible-with-new-raspberry-pi-zero-2-w/ Sun, 07 Nov 2021 02:35:01 +0000 https://juiceboxzero.com/?p=35068 Happy to announce the Juicebox Zero is compatible with the newly announced Raspberry Pi Zero 2 W. Pick one up today!

The post Juicebox Zero Compatible with New Raspberry Pi Zero 2 W appeared first on Juicebox Zero Store.

]]>
Happy to announce the Juicebox Zero is compatible with the newly announced Raspberry Pi Zero 2 W. Pick one up today!

The post Juicebox Zero Compatible with New Raspberry Pi Zero 2 W appeared first on Juicebox Zero Store.

]]>
35068
Bike Suspension Tracker https://juiceboxzero.com/bike-suspension-tracker/ Wed, 16 Jan 2019 05:03:04 +0000 https://juiceboxzero.com/?p=284 I love mountain biking! Embarrassingly enough, when I got my last mountain bike, I did not check the full functionality of the front suspension. To my dismay, I found that the front lockout feature didn’t work. Of course, it was long outside the manufacturer’s warranty… On a good note, it got me thinking about how you could use a Raspberry ...

The post Bike Suspension Tracker appeared first on Juicebox Zero Store.

]]>

I love mountain biking!

Embarrassingly enough, when I got my last mountain bike, I did not check the full functionality of the front suspension. To my dismay, I found that the front lockout feature didn’t work. Of course, it was long outside the manufacturer’s warranty…

On a good note, it got me thinking about how you could use a Raspberry Pi Zero and JuiceBox Zero with bike suspension systems. One company already makes a sweet looking add-on o track your ride overall, but I wanted something to monitor the suspension itself. I didn’t need anything fancy, and I knew I could get the data later and put it into a fun chart to show off on a future day. I just wanted a datalogger to tell me how my suspension reacts as I roll around or ride down a cliff at the RedBull Rampage.

I got thinking and realized I needed to track only the movement between the two moving portions of the front fork. To do this, I merely mounted one accelerometer to the lower portion of the fork and another to the handlebars. At this point, all I needed to do was log the X, Y, and Z components of the accelerometers, but I figured I could do a little more.

To get only the movement between the moving portions I needed to figure out a way to remove all other aspects of the ride from the readings. I had a stroke of inspiration and realized a relatively simple and generally good solution was to use the following equation:

where X1, Y1, Z1 are the readings from the first accelerometer and X2, Y2, and Z2 were the readings from the second accelerometer. Taking the square root of the sum of the squares is basic vector math, i.e., using the Pythagorean theorem in 3 dimensions. Then, taking the difference between the two measurements would result in only the movement between the two pieces of the suspension.

I don’t think it accounts for any roll rotation, but I’m hoping I  don’t have much movement like that since that would probably mean I just fell over…

At any rate, the method seemed to track my suspension reasonably well while being simple to implement.

Most of these items are exactly what I used, and some are basically the same thing, just a different brand or something inconsequential. Also, the links are affiliate links, but that doesn’t affect you at all, I’m just required to say that.

Materials:

I’m going to assume you have basic soldering equipment and solder. If you don’t have the basics or don’t know how to solder, here’s a link to an excellent guide for anyone getting started.

Putting it together: Software

Go to our Github repository and follow the instructions to install the software.  If you have any additions to how you’d like the software to work, please submit a pull request! The code is intentionally simple right now.

The logged data is in a .csv file which can be imported into any data visualization software (excel, bokeh(python), google sheets, etc.).

Putting it together: Wiring

  • First you’ll need to get your wire ready.
  • You’ll want to make your cables long enough to reach from your bike bag, along your bike frame and to the location where you want to mount the sensor.

  • Then take the jumper wires, cut ans strip half-way so you can solder the phone cable wires to the jumper wires.
    • At this point I think it’s a good idea for me to mention that while jumper wires are easier to use and quick to remove, they aren’t as reliable as a solder joint connection. On the other hand, a good solder connection to the Raspberry Pi pins is more difficult to make. This is a trade-off you’ll want to consider when putting it together.
  • Solder your wires and cover with heatshrink.
  • now solder the other end of the phone cable to the accelerometers. You can also refer to the schematic for a complete wiring diagram.
  • You’ll need to make sure one accelerometer is wired with the default address, and one is wired with another address. See the Adafruit guide for how to select a different address other than the default.
  • In the next photo I connected SDO to 3v3 to select the 0x19 address.

  • Then make the solder connections to the RTC.

  • then connect the wires with the I2C configuration to the Raspberry Pi/JuiceBox Zero.

   

  • Lastly, you’ll need to plug in a battery.

That’s all the electrical!

 

Putting it together: Mechanical

  • Pry the reflector off the front of the frame. (The reflector will probably break in the process, but who uses them anyway?)

  • Drill two holes in each reflector base in the same locations as the mounting holes for the accelerometers.

  • Mount the accelerometers, to your new bike electronics mount.

  • Carefully mount the sensors to the bike: one on the lower fork and one on the handle bar.
    • Orientation doesn’t actually matter because the math above takes all vectors into account to get one!
    • Just make sure they are secured and out of harms way of the spokes or brakes, etc.

  • The Raspberry Pi/JuiceBox Zero and battery will all go in the bike bag.

  • Use zip ties periodically to make sure the cables don’t get caught in any moving parts.

You’re ready to take mountain biking to level NERD.

That’s it. You just need to switch on JuiceBox Zero when you arrive at your trail and it will automatically start recording!

 

The Squiggly Lines

Everyone loves charts, graphs, or anything else with a squiggly line. Here are two screenshots of the G force tracked over time (I didn’t worry about time step at this point, I just wanted to see if it looked like what I would expect).

This first graph shows me just standing still and jumping on the bike suspension to see how it looks when I’m a little more in control of the movements.

 

This second graph shows the first half riding on a street, with the second half showing when I transitioned to off road.

The post Bike Suspension Tracker appeared first on Juicebox Zero Store.

]]>
284
JuiceBox Zero: Easiest way to power a Pi Zero with a battery is now available and shipping worldwide https://juiceboxzero.com/juicebox-zero-easiest-way-to-power-a-pi-zero-with-a-battery-is-now-available-and-shipping-worldwide/ Mon, 09 Jul 2018 18:28:45 +0000 https://juiceboxzero.com/?p=257 Great news! We’re so excited to announce that JuiceBox Zero, the wildly successful Kickstarter, is now available for anyone to purchase worldwide. With our Kickstarter campaign completely fulfilled, we’re happy to open shop for anyone who wants a sip (or gulp) of JuiceBox Zero. This one-of-a-kind battery management board is the easiest way to power your Pi Zero with a ...

The post JuiceBox Zero: Easiest way to power a Pi Zero with a battery is now available and shipping worldwide appeared first on Juicebox Zero Store.

]]>
Great news! We’re so excited to announce that JuiceBox Zero, the wildly successful Kickstarter, is now available for anyone to purchase worldwide.

With our Kickstarter campaign completely fulfilled, we’re happy to open shop for anyone who wants a sip (or gulp) of JuiceBox Zero. This one-of-a-kind battery management board is the easiest way to power your Pi Zero with a battery and opens opportunities of truly mobile creations.

There are two ways to order JuiceBox Zero:

Order today to secure your JuiceBox Zero(s) and follow our social media channels for updates on this and new upcoming projects.

Twitter

Facebook

Questions? Reach out here.

 

 

The post JuiceBox Zero: Easiest way to power a Pi Zero with a battery is now available and shipping worldwide appeared first on Juicebox Zero Store.

]]>
257
GitHub Repository Up and Running https://juiceboxzero.com/github-repository-up-and-running/ Fri, 23 Mar 2018 21:50:32 +0000 http://blog.juiceboxzero.com/?p=82 Thank you for so much good feedback. There have been people asking about a GitHub repository for the code to do the safe shutdown. https://github.com/JuiceBoxZero/LowBatteryShutdown There you go. Full instructions are in README.md for how to get the software. Of course, you may modify it, based on your needs/skill level, but the posted instructions should get it running on your ...

The post GitHub Repository Up and Running appeared first on Juicebox Zero Store.

]]>
Thank you for so much good feedback. There have been people asking about a GitHub repository for the code to do the safe shutdown.
https://github.com/JuiceBoxZero/LowBatteryShutdown
There you go.
Full instructions are in README.md for how to get the software. Of course, you may modify it, based on your needs/skill level, but the posted instructions should get it running on your Raspberry Pi Zero.
Because this is a GitHub repository, you’ll need internet access on your Pi, so I recommend either doing this in one of the following ways: all on a full size Raspberry PI, using a USB WIFI dongle on a Pi Zero, or using a Pi Zero W that is connected to WIFI.

The post GitHub Repository Up and Running appeared first on Juicebox Zero Store.

]]>
82
Kickstarter campaign is successfully funded! https://juiceboxzero.com/kickstarter-campaign-is-successfully-funded/ Wed, 07 Feb 2018 02:13:35 +0000 http://blog.juiceboxzero.com/?p=75 A HUGE THANK YOU TO ALL THE BACKERS! This has been an amazing experience, and we want to make sure that everyone stays updated on JuiceBox Zero. We will  be posting updates periodically about manufacturing progress and any answers to JuiceBox Zero questions we can manage! Feel free to reach out and we’ll get back to you as soon as ...

The post Kickstarter campaign is successfully funded! appeared first on Juicebox Zero Store.

]]>
A HUGE THANK YOU TO ALL THE BACKERS!
  • This has been an amazing experience, and we want to make sure that everyone stays updated on JuiceBox Zero.
  • We will  be posting updates periodically about manufacturing progress and any answers to JuiceBox Zero questions we can manage!

Feel free to reach out and we’ll get back to you as soon as we can!
info@juiceboxzero.com

The post Kickstarter campaign is successfully funded! appeared first on Juicebox Zero Store.

]]>
75
Low Battery Shutdown Code https://juiceboxzero.com/low-battery-shutdown-code/ https://juiceboxzero.com/low-battery-shutdown-code/#comments Fri, 02 Feb 2018 02:44:47 +0000 http://blog.juiceboxzero.com/?p=71 When JuiceBox Zero sees the battery voltage reach 3.2V the “LOW BATTERY” LED lights up and causes GPIO16 to go HIGH.  In order to perform a safe shutdown, do the following: Type: sudo nano LowBatteryShutdown.py This will create a python file in your current folder for the safe shutdown code. Copy and paste the following code into LowBatteryShutdown.py and save ...

The post Low Battery Shutdown Code appeared first on Juicebox Zero Store.

]]>
When JuiceBox Zero sees the battery voltage reach 3.2V the “LOW BATTERY” LED lights up and causes GPIO16 to go HIGH.  In order to perform a safe shutdown, do the following:

  • Type:
sudo nano LowBatteryShutdown.py

This will create a python file in your current folder for the safe shutdown code.

  • Copy and paste the following code into LowBatteryShutdown.py and save it.

Software for safe shutdown

# This code is complete and can be implemented as it is to safely shutdown
# a Rasbperry Pi using the safe shut down feature on Juice Box Zero.
# This is all Raspberry Pi 101, so it is definitely all open source. Feel 
# free to mix, copy, paste, change, etc.   

import os
import RPi.GPIO as GPIO
# This is going to let us use the BCM pin numbers.  The number on JuiceBox 
# Zero is labeled 
# according to BCM.  See https://pinout.xyz/ for more details on pinouts. 
GPIO.setmode(GPIO.BCM)
# This is where you would change the GPIO from pin 16 to 25, if you needed
# to do so on the 
# Juice Box Zero board itself. Default is GPIO 16. In order to change the 
# hardware, you would  
# need to cut the GPIO 16 trace on the board and make a solder bridge over 
# GPIO 25.
# See http://www.blog.juiceboxzero.com/ for more details. 
shutdown_pin = 16  # defines pin 16 as the pin we're watching
GPIO.setup(shutdown_pin, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
def shutdown_callback_function( shutdown_pin ):
    # uncomment the following line to have the Pi tell you that the pin is
    # HIGH and that the callback function has been entered. This is mostly
    # useful for debugging.
    #print("the low battery pin is HIGH now, shutting down.")

    os.system("sudo shutdown -h now")
# This is the magic line that adds pin 16 so it is always being watched.
GPIO.add_event_detect(shutdown_pin, GPIO.RISING, callback=shutdown_callback_function, bouncetime=250)
# Now we wait for something amazing to happen. (i.e. wait for the GPIO)
while True:
   # Do nothing
   pass
  • Make sure there are no errors from copying the code and then type:
Ctrl + x
  • Follow the prompts that appear to save the file.
  • Install a crontab job
  • Your Raspberry Pi will now automatically perform a safe shutdown when the battery attached to your JuiceBox Zero 3.2V.

The post Low Battery Shutdown Code appeared first on Juicebox Zero Store.

]]>
https://juiceboxzero.com/low-battery-shutdown-code/feed/ 2 71
How to use JuiceBox Zero https://juiceboxzero.com/how-to-use-juicebox-zero/ https://juiceboxzero.com/how-to-use-juicebox-zero/#comments Sun, 07 Jan 2018 06:10:09 +0000 http://blog.juiceboxzero.com/?p=44 Overview JuiceBox Zero lets you power a Raspberry Pi Zero with a Li-Ion or Li-Poly battery.  The following will help you understand JuiceBox Zero and how to use it. This article uses affiliate links. It doesn’t cost you anything extra. It just helps me pay to provide this information. Board Specs and features Uses any single cell Li-Ion or Li-Poly ...

The post How to use JuiceBox Zero appeared first on Juicebox Zero Store.

]]>
Overview

JuiceBox Zero lets you power a Raspberry Pi Zero with a Li-Ion or Li-Poly battery.  The following will help you understand JuiceBox Zero and how to use it.

This article uses affiliate links. It doesn’t cost you anything extra. It just helps me pay to provide this information.


Board Specs and features

  • Uses any single cell Li-Ion or Li-Poly battery (3.7/4.2V) with a JST brand PH connector (pay attention to polarity)


This is a 1 Amp source

    • It can source 1 Amp to the 5 Volt output and charge the battery at 1 Amp, so it can draw up to 2 Amps total from your micro-USB supply.

On/Off switch

Mounting holes

    • Specifically designed for the Pi Camera, but can be used for any sensor or breakout board that doesn’t stack nicely onto a Pi.

Low battery GPIO trigger

    • Use the code at the end of this guide to safely shut down your Pi when the battery reaches 3.2V
    • Default GPIO is 16, but you can cut the trace between the pads  and make a solder bridge on the GPIO 25 pads too!
    • GPIO is digital LOW or 0 until the battery voltage reaches 3.2V, then it goes HIGH or 1.

Micro USB charging

    • Make sure your power supply can source at least 2A.
    • Do not plug the micro USB power cable into the Pi Zero power port or damage could occur to either board.

Status LEDs

    • Red (LOW1) = Low battery
    • Yellow (CHRG1) = Charging
    • Green (CHRG2) = Fully charged
    • Blue (PWR1) = Power switch is ON



Assembly

Tools and supplies needed



Steps

  1. Put stacking header on Raspberry Pi Zero
    1. This will help keep it in place because soldering is definitely a two-handed job.
  2. Put some standoffs into the Pi Zero.
    1. Two are probably sufficient, but there’s nothing wrong with using four.
  3. Place the JuiceBox Zero onto the header and fasten down with screws.
    1. Be careful to not bend your Pi or JuiceBox if the headers aren’t the exact same height as the standoffs!
  4. Solder the header to the JuiceBox Zero.

Done! – “You are now free to move about the cabin.”

    1. Follow the guide in the next section to see how to use JuiceBox Zero.


How to Use JuiceBox Zero

  1. Plug in a Li-Ion battery that has a JST connector.
    1. Watch polarity, and only single cell batteries, please.
  2. Turn the Power switch to the “ON” position.
    1. A blue LED (marked PWR1) should light up.
  3. To charge the battery and/or run the Pi Zero off a micro-USB, plug a micro-USB cable into the JuiceBox Zero’s charge port.
    1. When JuiceBox Zero is connected to a micro-USB cable, the yellow charging LED will light up.
    2. Important: Do not connect power to the Pi Zero power port while JuiceBox Zero is connected, this could damage either your Pi Zero or JuiceBox Zero!
    3. Another note: make sure your charger is 2A capable.

Correct way to power your Pi with a JuiceBox Zero and a USB cable.

If you plug your USB into the Pi port, expect to let out the magic smoke. DON’T DO THIS.

The post How to use JuiceBox Zero appeared first on Juicebox Zero Store.

]]>
https://juiceboxzero.com/how-to-use-juicebox-zero/feed/ 2 67