fiduciary

Author Topic: FX-Saber OS build questions  (Read 7129 times)

0 Members and 1 Guest are viewing this topic.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
FX-Saber OS build questions
« on: January 25, 2018, 05:50:45 AM »
Okay, so I'm interested in trying my hand at making a non-Plecter Labs powered saber. I'm not abandoning the ways of the Buttered Toast, but I am curious as the open alternatives (that, and having a decent board available all year round would always a plus). I've chosen the FX-Saber OS over the teensy saber just because I can get the three main components for a homebrew DIYino (Arduino nano, mpu 6050, DFplayer) from the spare parts bin of my local hackspace at pretty much any time I want.

To that aim, I've read the FX-Saber OS wiki and github a few times, and watched as many videos as I could find to try and figure things out. I still have a few questions though.

The Big One: How hard is this going to be for a complete arduino and coding noob? I've tried teaching myself how to use arduinos in the past, and it's never really stuck. Mainly, I think, because those times, I've never had a specific need or use for it. I mean, learning how to Blink an LED, or making a servo move is great and all, but without a project that needs all that in the first place, it's all mostly pointless and easily forgotten. I'm not unwilling to learn how to code, just that I have no real experience in the first place, and it all looks pretty daunting. So I would like an honest assessment of how much work I'm going to have to put into this to make it work properly at the start.

now, the smaller stuff:

1) specific components:
I was looking over the wiring diagrams on the GitHub https://github.com/Protonerd/FX-SaberOS/blob/master/README/HomebrewDiagrams.pdf and the component list on the Wiki Components · Protonerd/FX-SaberOS Wiki · GitHub One: are the resistor colour bands in the wiring diagrams accurate to the resistor ratings you're meant to use, and are there any specific resistor wattages to use? Two: Are there any preferred models of N-channel MOSFETs?

2) Sound fonts:
How many sound fonts can you load onto the SD card? the Wiki references the ability to change sound fonts, but I can't find (or have missed) a page that mentions how many fonts can be on a card at once

3) Linux support:
Because Microsoft fried my Win7 machine with that forced Win10 upgrade, I made the jump to Ubuntu rather than buying a new machine (what can I say, I keep spending all  the free money in my budget on building really fancy torches :tongue:) are there going to be any major compatibility issues or is there software that only work on windows required in making a DIYino saber?

Okay, that's all I've got for now. If I have more questions as I go along, I'll ask them here
Better late than never.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: FX-Saber OS build questions
« Reply #1 on: January 25, 2018, 07:56:27 AM »
The configuration is pretty straight forward, and if you use the SD card images in the git you should be able to just fire it up.

IRZL44N will the trick for the MOSFET, although there are surely others you could use, even a TIP41 will work for a Star LED (rated for 6A max)

As for resistors, I made the diagrams, but I'm not sure how careful I was.  The voltage divider going to A3 is accurate, for sure, 100k and 470k.  The resistors on the mosfets may not be strictly necessary and the resistor on the pixel blade is just standard to whatever the recommended value for a strip is (220-500 ohm dependig on who you ask)

The number of fonts isn't bounded.  You can use one or 10, but depending on your blade time and configuration you may hit memory limits.  3 should definitely be safe, probably 5 I think, after that you may have unexpected results depending on your configuration.

pixel blades are the most memory intensive, so the limitations will affect you most if that is how you go.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Re: FX-Saber OS build questions
« Reply #2 on: January 25, 2018, 08:41:53 AM »

jbkuma and me made quite a decent Wiki on GitHub, if you follow the instructions there then configuring and uploading the code is not more difficult nor does it take more time than to edit a config file used by other saber board brands. In the current state of FxSaberOS you really do not have to have any prior programming knowledge. You can easily configure a very decent mid-range saber including all fancy fx's (clash, swing, lockup, blaster deflect) with a whole row of special features, some of which are unique.
BUT it really gets fun if you start tweaking the code for personalization :)

As to the number of sound fonts, with recent improvements in the sound font selection you can add a large number of fonts with nearly no impact to memory usage. So go for it, SD cards can hold possibly all sound fonts ever published. I personally prefer to have not more than 5, but that is no way a limitation, more a preference. Mature personalities or whatsnot.

You can easily solder together a homebrew solution from parts following jbkuma's excellent drawings on the Wiki. If you want a proven solution which is sure to fit inside a hilt, you can look for a DIYino Prime or Stardust.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #3 on: January 25, 2018, 10:39:08 AM »
The configuration is pretty straight forward, and if you use the SD card images in the git you should be able to just fire it up.

IRZL44N will the trick for the MOSFET, although there are surely others you could use, even a TIP41 will work for a Star LED (rated for 6A max)

As for resistors, I made the diagrams, but I'm not sure how careful I was.  The voltage divider going to A3 is accurate, for sure, 100k and 470k.  The resistors on the mosfets may not be strictly necessary and the resistor on the pixel blade is just standard to whatever the recommended value for a strip is (220-500 ohm dependig on who you ask)

Ok, understood. I'll add some IRZL44Ns to my shopping list.

My main interest for now is in the homebrew with RGB Diagram. I'm guessing that the 220 ohm resistors on each pad of the star LED meant to be stand ins for the appropriately calculated resistor? Also, is the wattage of the various, non LED resistors all that critical, or will say, a 1/4W of the appropriate value just be enough?

The number of fonts isn't bounded.  You can use one or 10, but depending on your blade time and configuration you may hit memory limits.  3 should definitely be safe, probably 5 I think, after that you may have unexpected results depending on your configuration.

That's cool. I only have four in my collection right now, anyway.


You can easily solder together a homebrew solution from parts following jbkuma's excellent drawings on the Wiki. If you want a proven solution which is sure to fit inside a hilt, you can look for a DIYino Prime or Stardust.

Yeah, the homebrew options are where I'm looking to go. Apart from pretty much having all the parts available on hand, the idea of making my own sound card from scratch really does appeal to my general philosophy on scratchbuilding lightsabers in the first place.
Better late than never.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: FX-Saber OS build questions
« Reply #4 on: January 25, 2018, 10:58:55 AM »
Your RGB/STAR LED should be calculated appropriately for the LED you use.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #5 on: February 06, 2018, 04:01:38 AM »
The last of the parts I need to give this a breadboard test arrived in the mail this morning. So, naturally, that's when my PSU (I planned to use it instead of buying an 18650 for testing purposes) decided to drop dead on me. Always nice to see Murphy's Law in action :wink:. Anyway, I have a spare in the mail that should be with me in a few days.

In the meantime, I'm preparing the software side of it. I'm going to attempt to format one of the saber fonts I've got (Pitch Black, love that ignition sound) as per the Wiki's instructions.

I do have Arduino noob questions. Is there an order to which you have to load the arduino sketches onto the board? I know from the wiki that the MPU configuration has to go on before the FX-sabersOS, but what about the others? (Buttons.ccp, buttons.h, etc?)

Also, is there a difference between two identically named files with an .ccp and .h extention? and if so, which to use?

Again, apologies if I'm getting this all wrong, this is still pretty much my first big arduino/coding project.
Better late than never.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Re: FX-Saber OS build questions
« Reply #6 on: February 06, 2018, 04:46:59 AM »
You have to calibrate the MPU first, sure.

Afterwards you can try your hands at uploading the FXSaberOS code.

You do not need to take care about .cpp and .h files, simply follow the instructions in the Stardust V2 User Manual, and open the .ino file. All the rest is linked to the .ino and will be compiled without any manual interaction needed.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #7 on: February 06, 2018, 05:20:09 AM »
You do not need to take care about .cpp and .h files, simply follow the instructions in the Stardust V2 User Manual, and open the .ino file. All the rest is linked to the .ino and will be compiled without any manual interaction needed.

Oh, ok. read the manual, that made much more sense of it than the FX-saberOS wiki did. Is there any chance you could put a copy of the manual on the wiki?

Right. so, open all the libraries in the arduino IDE, make all the changes (number of buttons, sound bank configuration, etc) in the individual tabs, verify and upload. got it. That's almost idiot-proof.

Therefore, I'm curious to see just how I'm going to mess it up. :wink:
Better late than never.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Re: FX-Saber OS build questions
« Reply #8 on: February 06, 2018, 05:59:16 AM »
Good luck! Even if you mess up the first time, you will have it right the 2nd. And you have a big fan community behind you, you can join us on Facebook and post issues on GitHub. You will get an answer sooner rather than later.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #9 on: February 11, 2018, 08:20:17 AM »
Okay, I wanted to bring this up, because it ended up being a time waster. The Wiki is clear enough on most things, but this one was just a mess.

I got it working (MPU configured, arduino sketches successfully compiled and uploaded,) but not working (not a working lightsaber). There's something wrong with the sounds. I had the three vanilla fonts on the SD card, plus my version of Lord Blako's Pitch Black converted with JakeSoft's Soundfont Converter.

When I turned it on (ie, applied power to the arduino, before turning the blade on) it should be idle, but instead it played a swing sound from Vanilla Lyte, not responding to buttons, then going mute after the swing finishes playing (20 secs approx.) I tried to figure out what's wrong by myself, and I think I've got something:

under soundfont.h in the wiki

    2: There is a folder storing configuration sounds needed for the code, if in doubt simply look into that folder and see to it that it matches the definition here:

#define NR_CONFIGFOLDERFILES 29

I searched everywhere for this folder and its contents. it took me longer than I'd like to admit to find the DIYino_Prime SDCardImage.7z in the soundfonts folder. I missed it completely first time around, because all the other sound fonts were bundled in there, and I figured it (and the Stardust image) to be just another sound font.

as far as I could tell, that's the only mention of the config folder on the wiki. just going by the instructions on the Preparing Sounds page of the Wiki, it'd be rather easy to assume (as I did) that all you have to do is drag and drop the a sound fonts' files onto the SD card (or run them through Jakesoft's Converter beforehand,) and plug that SD card into the DFplayer.

Once I figured that out, it got better, but not quite fully solved. the Config menu works fine, I can change the settings, and the settings are remembered. I'm still having some problems with the sound files playing completely out of order. Yes, I drag and dropped the files onto the SD card, I'm using the default offset numbers, but it's still playing them in a muddle
Better late than never.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Re: FX-Saber OS build questions
« Reply #10 on: February 11, 2018, 10:22:22 PM »
If you have technical question and you are using a home brew setup instead of a DIYino board, please go to the GitHub and open up an Issue Case. There are a lot of people out there with home brew solutions, you will get an answer pretty soon. We like to discuss such technical how-tos there rather than here.

That being said, copying the files in the right order has been discussed and is exceptionally well documented both on Wiki, the Arduino forum and the DIYino User Manuals. I think you do it right (after all it's just drag and drop from an already prepared zip file), as a first aid kit here are my suggestions:
- try to format the SD card always before you attempt to change anything on it. This is a must.
- all working instructions are for Windows. If you are using MAC, it might be different.
- take note on the sound file structure differences between Stardust and Prime. That might be a source of mixup.

Offline NobAkimoto

  • No Force
  • *
  • Posts: 18
  • Um...Hello?
Re: FX-Saber OS build questions
« Reply #11 on: February 11, 2018, 11:48:32 PM »
Just a quick note on homebrew arduin o setups - you can use small sot-23 mount mosfets like the 2n7002k using adafruit's sot-23 breakout board kit available here: SMT Breakout PCB Set For SOT-23, SOT-89, SOT-223 and TO252 ID: 1230 - .95 :

It'll let you fit 2 sot23 mosfets per board and take a lot less space to do so. The soldering isn't as tricky as it might seem, but it's mildly irritating. Still, if you need quick turn around with equipment you can get off the shelf they can be worth having on hand.

With that said, I'd still just recommend grabbing a few stardusts - starting with diyinos gives you a better sense of how the parts interact and unless you're buying the fashion components in bulk, doesn't have a huge price premium.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #12 on: February 12, 2018, 04:41:02 AM »
That being said, copying the files in the right order has been discussed and is exceptionally well documented both on Wiki, the Arduino forum and the DIYino User Manuals. I think you do it right (after all it's just drag and drop from an already prepared zip file), as a first aid kit here are my suggestions:
- try to format the SD card always before you attempt to change anything on it. This is a must.
- all working instructions are for Windows. If you are using MAC, it might be different.
- take note on the sound file structure differences between Stardust and Prime. That might be a source of mixup.

okay:
1: Check
2: I'm using linux, but so far, other than using a few alternatives to proprietary software, there hasn't been that much of a difference
3: Check

Well, the good news is that it doesn't seem to be a major technical issue. Everything I can test on the LED star option works fine (colour mixing is awesome, swings and clashes detected better than Plecter labs products can, volume goes up and down, all good there. even tested the jukebox) it appears that there's a gremlin somewhere in the sound mix. Yesterday, the config menu files played in perfect order, but the lightsaber soundfonts were way out. playing a swing sound as the Font ID, Blaster blocks play when I activated the lockup, that sort of thing.

So, this morning, I re-formatted the SD card, re-drag and dropped all the files, and re-uploaded the FXsaberOS code to the arduino for good measure. Now, the lightsaber fonts play in the perfect order, but the config menu is off (Battery critical is the new sound font selection, LEDstringblade is the new blaster colour, etc.) the annoying this is that there doesn't seem to be a noticable pattern to the madness that would indicate that I've got one of the offsets wrong on soundfont.h.

It's a small gremlin, and I'm hopefully getting close to killing it, because so far, this is looking to be a fine little piece of work that I'll gladly put on future sabers. 
Better late than never.

Offline SirRawThunderMan

  • Master Force User
  • *****
  • Posts: 708
  • Very, Very English Poster
Re: FX-Saber OS build questions
« Reply #13 on: February 12, 2018, 05:57:21 AM »
Never mind, I have a dead Gremlin! for some reason, when I drag and dropped the config files, the .MP3 files are copied before the .wav files. Dunno if that's a bug or a feature. So, I wiped the files and re-copied the .wav files first, then copied the .mp3 files, and surprise, everything works as it should!

Well, I've got this working fine in breadboard, time to give installing it into a hilt a shot. I think it's past time I upgraded my Hasbro economy board saber to something a little fancier.
Better late than never.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Re: FX-Saber OS build questions
« Reply #14 on: February 12, 2018, 12:56:24 PM »
Glad it worked for you and thanks for the endorsement, I'm really proud of FX-SaberOS and especally how the Clash and Swings react. Now with the (not yet widely announced) Interrupt based clash it is best in class among all saber boards.

 

retrousse