fiduciary

Author Topic: R2ino - expanding Nano Biscotte V3 with Arduino  (Read 4651 times)

0 Members and 1 Guest are viewing this topic.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
R2ino - expanding Nano Biscotte V3 with Arduino
« on: November 22, 2016, 12:30:01 PM »
I've discussed my Arduino/NBv3 hybrid setup, R2ino, in some other threads and I've been promising a video of the menu system for that, so here it finally is!  I'll work up the full hilt thread soon (don't hold your breath).  The setup consists of a Nano Biscotte V3, Arduino Pro Mini 3.3v, several NeoPixels, a charge port with a leave-in kill key, 3.7v 18650, and aviation/CB style 8 pin connector.  The harness is an FTDI board (since the mini doesn't have USB), another set of 8-pin connectors, and a tactile switch which mirrors the main button on the hilt.  The shunt is just an 8-pin connector wired to pass the signal to the bits that aren't removable.

I refer to the sections as the Ignition Core, the Power/Logic Core, programming shunt, and programming harness.



Here's a pretty decent representation of my wiring and nearly completed wiring on a breadboard, exclusive of resistors on the blade LED. There are also some resistors on the Arduino to build a voltage divider so I can measure the battery level.  There are 2 main disconnects, one between the ignition section and the logic section, and the other is an external port for serial interface to the Arduino.  At the moment serial interface allows me to adjust LED color, stability effects, and brightness, and check battery levels with my phone or computer, as well as reprogram the Arduino.  The programming is mostly (but never really) complete.

As you can see from the diagram, the Pro Mini is inter connected with the NB.  The main LED and FOC pads are wired to digital inputs and are set to operate as instant on/off.  I ended up disconnecting the sleep pad because it was causing sound issues on startup (if anyone knows how I can fix that I'd be happy to hear it!).  All of the LEDs, including the blade RGrB Cree, are controlled via the NeoPixel library.  The blade LED is controlled by a WS2811 chip and TIP42Cs, could have done it via PWM I suppose, but since everything else was going to be NeoPixels there was no reason to rewrite the book for that.

Using the 8-pin connectors I'm able to remove the Power/Logic Core with worrying about any of my connections breaking.  The shunt is only really required if I want to play with the blade or button accent color without guessing, otherwise I just plug the harness into the Power/Logic Core itself.  The harness can be plugged into anything that can provide a serial terminal.

Future development plans include making a GUI interface either via an app (probably sexier), or another Arduino with a screen (probably easier).  I have some code in the works already that uses a screen and Arduinos paired over serial, so that will probably happen first (if the app ever happens at all).

The video isn't the greatest, but it's done.. so without further ado:

« Last Edit: February 06, 2017, 07:39:47 PM by jbkuma »

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: R2ino - expanding Nano Biscotte V3 capabilities
« Reply #1 on: November 22, 2016, 01:11:33 PM »
The funny thing is on my phone screen the blue and red looked great, but the green just looked white.  After get YouTubed and watching it on the screen the blue is hard to see and green looks fine.  They all show up pretty well once the Blade Brightness is turned down. :D

One note I didn't make in the video is that the crystal and speaker accent (not pictured in the video) also mirror all of the effects including the batter check.  For batter check the crystal and accent will go solid green, yellow, or red depending on the level.



Offline EXAR KUN

  • SITH/EMPIRE Master MODERATOR
  • Master Force User
  • **
  • Posts: 3117
  • Formerly known as SpaceWindu
    • My YouTube channel: youtube.com/spacewindu
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #2 on: November 22, 2016, 04:28:46 PM »
This is really great. A great looking saber and internals, too. I like how you are real-world about it when you say the programming is never complete lol. Using the neopixels in the saber and for accents lights and such is a REALLY great idea.



Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #3 on: November 22, 2016, 05:02:04 PM »
This is really great. A great looking saber and internals, too. I like how you are real-world about it when you say the programming is never complete lol. Using the neopixels in the saber and for accents lights and such is a REALLY great idea.
Thanks!

When I started with the NeoPixels I read a line in the Adafruit tutorials that mentioned the SMD WS2811 chip they sell could probably be made useful on a breakout board.  It sorted of boggled my mind that they didn't just make it.  Eventually I just ordered a sheet of 10 from Aliexpress $5 or something.  I set one up with pins for bread boarding.

The other nice think about this setup is that I can breadboard a new core without taking the whole thing apart.  I'm planning to work on a second core with a DIYino.  I'm planning on fabricating that one rather than 3D printing.  The layout will be roughly the same, but I'm thinking of trying to squeeze a bluetooth board in there.  I should have room if I don't worry about the crystal, or if I just do it a little differently.

The work everyone else is doing is definitely more advanced than what I've done, but I learned a lot doing it.

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #4 on: November 22, 2016, 09:27:09 PM »
very nice addition and work !

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #5 on: November 23, 2016, 09:58:14 AM »
very nice addition and work !
Thank you! I obviously couldn't do it without your fine work paving the way.

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #6 on: November 23, 2016, 10:36:26 AM »
I used the same approach when I designed my tron disc, I like to combine elements !

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #7 on: November 23, 2016, 11:08:00 AM »
I hadn't seen that one before, very nice work :D

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: R2ino - expanding Nano Biscotte V3 with Arduino
« Reply #8 on: December 16, 2016, 10:53:40 AM »


I upgraded my R2ino sketch last night to allow on the fly color changing.  Since I'm paring with a Nano Biscotte with common switch input, there are a couple challenges in that the NB will change fonts if I long press from idle or activate on a button press.  The long press features will work whether the blade is ignited or not, but the long press font change for the NB is quicker than my "extra long press" for the color change, so I don't have to worry about changing colors when I just want to switch fonts. (I'm using Ghost of the Grey and a silent font)  If I long press from activation the NB will remain idle.  3s will show the battery check, another 3s will start cycling blade colors with a 1.5s delay until I release the extra long press.  It updates on the next button press.  I'm not sure why the update doesn't occur immediately.  I tried a few things, but I ran out of time.  I'll work on it after I finish some other things I have in the works.

 

retrousse