#4897102
And you know, the 83% wand I'm making for my son would work great with the new $70 spirit halloween pack. I have one on order just in case I don't get everything printed. Worst case I'll have about 15 days to transfer the electronics to that. Best case I have his pack finished and my wife has the spirit one and next year I upgrade it while making myself a full size pack :)
#4897103
Tebasaki wrote:The only thing I don't understand is how the ground from the ribbon is connected to the ground(s) on the other side of the board.
It looks like there's that black wire connected on the right to L and it stretches across to B and that oval guy? (right?) That's the grounds for the resistor connecting, but how does that little white circle connect to that?
Now you get to see how bad my soldering is :). Here's a close up of the business end of the finished bargraph. The pictures I've been posting were from older shots of it. I wish this site allowed upload cause uploading to my wordpress site then linking is a bit annoying.

Image

I tried to bridge the pads but failed miserably so grabbed a wire and just connected like that.
#4897112
All of the scaled parts for the new thrower are printed. Just scaled everything to 83 percent and re exported with netfabb. I did redo the mounts as I'm going to stick with the 1 inch pvc for the handles. At 83% I think that's actually closer to accurate.

Now to do the cleanup and assemble it.

Image
xoff00 liked this
#4897160
So yeah I'm going to have to print another one for the lefty but I learned a lot from this print that needs to be fixed. In scaling the model down several walls have become too thin and fragile so I need to beef them up a bit. I'll also need to add some more reinforcement to the screw mounts. Finally I'm going to have to redesign the side trigger box as there is no way to get the switches into it now that it is smaller.

Once I have these issues resolved this will make an awesome upgrade to the Spirit pack so I'll probably post it as a separate scaled version on thingiverse. Time is getting short tho. I gotta kick this in gear and make some real progress. At least I now have the wife agreeing on the sizes.
#4897166
The plastic takes paint just fine. The issue I had was with the filler primer I used. It just heated up too much causing the plastic to warp. I put it on really thick and should have done it in multiple coats. That was definitely a live and learn experience. The filler primer does a great job of cleaning up the finish so will be trying it again.

I'm almost done with the redo of the gunbox. I'm going to try splitting it in a different way and see if that makes it easier to print as well as make it stronger.
#4897170
I have not finished sanding it at all yet. This has pretty minimal course sanding with 140 grit

Image

With a little elbow grease and a few layers of paint/clear coat it would look really nice. I most likely won't be finishing this one though.
#4897171
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

Wow that looks lice even before the paint. I'm impressed!

I just got 22 gauge silicone wire, and it's NICE. Feels really flexible, and fit's into all the holes it's supposed to.
https://www.amazon.com/gp/product/B01LH ... UTF8&psc=1

You think this 22AWG is enough to go from the battery to the buck converter, or do you think I need something bigger like a 20 gauge?
#4897173
Yeah, I had the "WTH haven't I been using this all along!?!?" moment when I first got silicon wire.

For the battery to buck...it's a maybe, depending on what your draw is. I plan on using larger wire on the power distribution side, at least until I've broken it down into the various power feeds I'm using. I've been following this chart:

https://www.powerstream.com/Wire_Size.htm

According to that, 22AWG can handle just under an amp, 20AWG 1.5a.

For me, I will have multiple power loops, each coming off the 5v side of the DC-DC converter from 12v.

In the pack:
  • Cyclotron Lights (7 jewels x 4 = 28 neopixels) - 1.6a max, typical draw is under 25% of that
  • Powercell Lights (16 neopixels) - 960ma max, typical draw is about 25% of that
  • Arduino (which in turn powers the SX1509 at 3v3), under 50ma
In the wand, fed from the pack:
  • Bargraph (16 single-color LEDs) - 320ma max, typical draw about 25-50% of that
  • Misc lights on the wand (6 LEDs, might of single color and neopixel) - 240ma, typical draw 75% of that
The pack-to-wand cabling is an ethernet cable (24AWG) so I think I'm good on that.
#4897174
Wow I have no idea how to read that, lol. This is the hardest part for me, since the only electrical classes I've taken are A. my electrical engineering 101 in college (over a decade ago) and B. Rewiring my house (which is more along the lines of 110, 220, don't cross the streams when it's on).

I've got a 2200mAh, 25C 11.1V - 24.4Wh

soooo, if mine is a 2200mAh (or 2.2 amps) I need at least an 18 gauge?

Also, I was just planning on using either that 22AWG wire or the 18AWG wire for the rest of the pack... Would there be any issues with that?
#4897175
I've never taken a EE class, I did have one as an employee who I pestered a lot, however! :)

It's pretty easy, Count de Monet certainly knows more...

It's not the battery's potential (in your case, 2200mAh, or 2.2a) you need to measure, but the amp draw on the wire.

This post might help: http://forum.arduino.cc/index.php?topic=50701.0

You are *probably* fine with your 22AWG wire. I'd suggest doing a "run" (from the 5v side of the buck converter) to each set of Neopixels and you'll be good.
#4897176
xoff00 is correct. The current draw is what you worry about on the wire. The pack is not going to go above 12v. A fully charged pack is a bit more than 11.1v.

Remembering from my RC days that battery can supply a lot of current. You find out the amp draw by taking the capacity and multiplying that by the C rating. So 2200 * 25 = 55,000 mAh discharge rate. This is the constant current the battery can take without damage. Usually batteries will have a burst rating as well. That would be the max current.

Our setups are not going to come anywhere near 55 amps so you won't have to worry about current. If you want to find out how long that battery will last on a full charge you take the average amperage and plug it into this formula

( ( mAh / 1000 ) / average amps ) * 60

Let's guestimate 2 amps average for everything in the pack. The lights and everything will likely be under 1 but let's give a full amp to the speaker. Plugging 2 amps into the equation we get

( (2200 / 1000) / 2 ) * 60 = 66 minutes

This is all a huge guestimate tho until we have everything hooked up and have a meter on it. I think 2 amps constant will be high.

Until I know the current draw for each component I don't want to speculate on needed wire sizes. I'm using 18 gauge right now for the battery as a safety precaution during testing.
#4897180
You can go in on the 5v as well. It's actually preferable if you know the voltage is already regulated at 5v. That way you bypass the really inefficient regulator on the nano the vin uses.

How many volts is coming out of the buck converter. Do you have a meter to test it? Before hooking anything up to the buck converter you want to make sure that on a full battery charge it is reading 5v on the outs.
xoff00 liked this
#4897183
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

I got this REALLY old voltage tester that my dad gave me decades ago.
https://www.amazon.com/Gardner-Bender-G ... B000PTZQ00

But when I switched it to the ~V and touched the leads to each of the 3 batteries I got, they all gave me 0.0. (so I'm charging them, but I think there's something in them if my nano isn't working anymore.)

I was thinking to update to either this
https://www.amazon.com/dp/B000EVYGZA/re ... UTF8&psc=1
or this
https://www.amazon.com/gp/product/B01IS ... FZGOKNP3PJ

As for the nano, I dunno.
#4897184
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

V~ is for AC voltage. We are dealing with DC so you want it set to V- (it's the other one that kinda looks like an = sign). The manual for that tester is here and it should work fine for you.

http://www.gardnerbender.com/~/media/in ... -39874.pdf

Lipos should never read 0. I don't remember what the minimum voltage where they will never come back from is but for an 11.1v it's somewhere around 9v.

I use the second meter in your list

https://www.amazon.com/gp/product/B01ISAMUA6

It works quite well.

I would plug the lipo into the buck converter and then set the meter to V- and check the voltage before and after it. There is a little philips potentiometer on the buck converter that allows you to change the output voltage. A small turn changes the voltage a lot. That needs to be set at ~5v. I think mine is set to 5.1 or something like that but it's close. You adjust the output voltage with the meter hooked up. Make sure when you set it to 5v that the battery is fully charged.

All of the components we are using require 5V accept for the SX1509. That one requires 3V.

If you plugged the nano in without adjusting the output voltage first you probably fried that nano and maybe the neopixels. I think the buck converter is set high by default. You might be lucky though and it's just set low.
#4897185
Mine is a bit older; it looks like there's no option for testing a DC current.

I bought an extra pack of nanos, so that's not an issue (I'm learning!) and the neopixels are running fine. I'll have to wait until I can get something to read the current before trying it again.
#4897217
Back in business. I redesigned the main body to be a single piece and just printed it with a ton of support. It ended up not being too bad but it did take forever to clean it out. The trigger box I redesigned to have the rear be removable. I had to completely redo that piece but it came out nicely. I cut down the tubes to be closer to the right size and I think I like how things are. Finally feel like I'm back on track.

Image
xoff00, Tebasaki liked this
#4897237
I've got my bar graph welded up, and plugged in like you have (3volt, SCL->A5, SDA->A4, Ground to ground) and I'm trying to get my head around your code (it's a big bite to take, I know) to see if I can just A. Get the nano and the SX1509 talking and B. To make sure all the leds work.

I kinda chopped a bit of you code out, just to get some functionality working (you got barGraphSequenceOne and barGraphSequenceTwo) so I grabbed a function and tried to see what would happen. And nothing.

I think I have everything needed to get at least some lights on...
Code: Select all
#include <Wire.h> // Include the I2C library (required)
#include <SparkFunSX1509.h> // Include SX1509 library


// SX1509 I2C address (set by ADDR1 and ADDR0 (00 by default):
const byte SX1509_ADDRESS = 0x3E;  // SX1509 I2C address
SX1509 io; // Create an SX1509 object to be used throughout

int seq_1_current = 0;  // current led in sequence 1
const int num_led = 15; // total number of leds in bar graph

// SX1509 pin definitions:
const byte SX1509_BAR_01 = 0; 
const byte SX1509_BAR_02 = 1; 
const byte SX1509_BAR_03 = 2; 
const byte SX1509_BAR_04 = 3; 
const byte SX1509_BAR_05 = 4; 
const byte SX1509_BAR_06 = 5; 
const byte SX1509_BAR_07 = 6; 
const byte SX1509_BAR_08 = 7; 
const byte SX1509_BAR_09 = 8; 
const byte SX1509_BAR_10 = 9; 
const byte SX1509_BAR_11 = 10; 
const byte SX1509_BAR_12 = 11; 
const byte SX1509_BAR_13 = 12; 
const byte SX1509_BAR_14 = 13; 
const byte SX1509_BAR_15 = 14; 

void setup() {
 
  // Call io.begin(<address>) to initialize the SX1509. If it
  // successfully communicates, it'll return 1.
  if (!io.begin(SX1509_ADDRESS)){
    while (1) ; // If we fail to communicate, loop forever for now but lets warn the user somehow
  }
  
    // configuration for the bargraph
  io.pinMode(SX1509_BAR_01, OUTPUT);
  io.pinMode(SX1509_BAR_02, OUTPUT);
  io.pinMode(SX1509_BAR_03, OUTPUT);
  io.pinMode(SX1509_BAR_04, OUTPUT);
  io.pinMode(SX1509_BAR_05, OUTPUT);
  io.pinMode(SX1509_BAR_06, OUTPUT);
  io.pinMode(SX1509_BAR_07, OUTPUT);
  io.pinMode(SX1509_BAR_08, OUTPUT);
  io.pinMode(SX1509_BAR_09, OUTPUT);
  io.pinMode(SX1509_BAR_10, OUTPUT);
  io.pinMode(SX1509_BAR_11, OUTPUT);
  io.pinMode(SX1509_BAR_12, OUTPUT);
  io.pinMode(SX1509_BAR_13, OUTPUT);
  io.pinMode(SX1509_BAR_14, OUTPUT);
  io.pinMode(SX1509_BAR_15, OUTPUT);
  
}

void loop() {
  int currentMillis = millis();
  barGraphSequenceOne(currentMillis); 
}

/*************** Bar Graph Animations *********************/
unsigned long prevBarMillis_on = 0;   // bargraph on tracker
const long pwrcl_interval = 60;     // interval at which to cycle lights (milliseconds).
bool reverseSequenceOne = false;
void barGraphSequenceOne(int currentMillis){
  // normal sync animation on the bar graph
  if (currentMillis - prevBarMillis_on > pwrcl_interval) {
    // save the last time you blinked the LED
    prevBarMillis_on = currentMillis;
    
    if( reverseSequenceOne == false ){
        switch_graph_led(seq_1_current, HIGH);
        seq_1_current++;
        if( seq_1_current > num_led ) { 
          reverseSequenceOne = true;
        }
    }else{
        switch_graph_led(seq_1_current, LOW);
        seq_1_current--;
        if( seq_1_current < 0  ) { 
          reverseSequenceOne = false;
        }
    }
  }
}

void switch_graph_led(int num, int state){
  switch (num) {
    case 1:
      io.digitalWrite(SX1509_BAR_01, state); 
      break;
    case 2:
      io.digitalWrite(SX1509_BAR_02, state); 
      break;
    case 3:
      io.digitalWrite(SX1509_BAR_03, state); 
      break;
    case 4:
      io.digitalWrite(SX1509_BAR_04, state); 
      break;
    case 5:
      io.digitalWrite(SX1509_BAR_05, state); 
      break;
    case 6:
      io.digitalWrite(SX1509_BAR_06, state); 
      break;
    case 7:
      io.digitalWrite(SX1509_BAR_07, state); 
      break;
    case 8:
      io.digitalWrite(SX1509_BAR_08, state); 
      break;
    case 9:
      io.digitalWrite(SX1509_BAR_09, state); 
      break;
    case 10:
      io.digitalWrite(SX1509_BAR_10, state); 
      break;
    case 11:
      io.digitalWrite(SX1509_BAR_11, state); 
      break;  
    case 12:
      io.digitalWrite(SX1509_BAR_12, state); 
      break;  
    case 13:
      io.digitalWrite(SX1509_BAR_13, state); 
      break;
    case 14:
      io.digitalWrite(SX1509_BAR_14, state); 
      break;
    case 15:
      io.digitalWrite(SX1509_BAR_15, state); 
      break;
    }
  }
#4897240
Assuming everything is hooked up right that should work. All the sequence one code does is light each led in sequence from 0-15 and then back down. Kinda a wave pattern.

The one thing you might need to check is that the address is correct
const byte SX1509_ADDRESS = 0x3E; // SX1509 I2C address

It's also possible you are never getting past this
Code: Select all
if (!io.begin(SX1509_ADDRESS)){
    while (1) ; // If we fail to communicate, loop forever for now but lets warn the user somehow
  }
which initializes the sx1509 and waits for it to say it is ok. If the board never says it is ok then it will never go any farther in the code.

Some code explanation:

int seq_1_current = 0; // current led in sequence 1
const int num_led = 15; // total number of leds in bar graph

in the loop:
currentMillis variable holds the current clock time from the arduino.
Every time it loops it calls the main bar graph sequence

prevBarMillis_on keeps track of the last time we turned on or off an led
pwrcl_interval is the speed at which we are turning leds on or off. In this case 60 milliseconds
reverseSequenceOne keeps track of if the bar graph lighting the leds or shutting them down.
Code: Select all
if (currentMillis - prevBarMillis_on > pwrcl_interval) {
so here we're saying If the current time minus the last time we lit an LED is greater than the LED lighting interval then continue into the function
Code: Select all
prevBarMillis_on = currentMillis;
we save out the current time as we are about to change an led in some way
Code: Select all
if( reverseSequenceOne == false ){
if we are doing the lighting animation
Code: Select all
       // first we take the current light we are dealing with and turn it on
        switch_graph_led(seq_1_current, HIGH);
       // then increment the count so the next time we come around that light will light
        seq_1_current++;
       // but we check to see if we are at the end of the led's we have or not. If we are then let's set 
       // the function to reverse on the next time it comes through and start turning led's off. 
        if( seq_1_current > num_led ) { 
          reverseSequenceOne = true;
        }
switch_graph_led function: This is a helper function that takes an LED number and an on/off state and sets the light specified to that state.

My guess is that the arduino is not talking to the sx1509 for some reason. It might be a good idea to try out this sample before continuing.

https://learn.sparkfun.com/tutorials/sx ... ed-driving

Some more progress tonight. I have most of the parts glued on and more sanding done. I'm close to the point where I will give the filler primer a try again. This time a lot lighter on the coats that is for sure.

Image
#4897262
Before I get to your code, I tested out the SX1509 with that test link you gave me and I was able to get it working (with one little led).

So it looks like my bar graph is broken, because I wired up in addition to that led pin each individual pin out to the bar graph and systematically went down the line to test each one. I hit the button, the test led went on, but the bar graph did not.

UPDATE:
I plugged in another two bar leds right into a breadboard, and then got it to work. The good news is now I know how to wire and (mostly) understand your code to get it working, the bad news is that 1. the leds are pretty dark (maybe I got the wrong resistor?) and 2. my rewire after desoldering the whole thing was wrong, and I have to turn both bar graphs around (so I'll have to desolder the whole board with my heat gun and try again).

In hindsight I should've just tested the whole thing on the breadboard to begin with!
#4897263
Take a picture of the bargraph you put together. Any idea what you did wrong based off the test you just did?

Testing on the breadboard is a good idea always. I tested various resistors before I found the brightness/current draw I was looking for. It's possible different LED graphs will require different resistors for the same brightness.

A normal resistor can go on either side of the LED but I don't know if that is the case with resistor networks. Since in the network have a common ground I put them on the negative side of the LED. Desoldering is not fun for sure.
#4897281
It looks like my issue was that the the resistors were on the wrong side of the leds? (Or maybe they were flipped around; should have had the ground on the leds on the other side.)

I already desoldered the whole thing, and I was able to save everything except the 10bar led. (crap). Before I put these resistors in place, here's the led bargraphs
https://www.digikey.com/product-detail/ ... ND/4745985
and here's the resistors
https://www.digikey.com/product-detail/ ... ND/3787988
They say 330 Ohms, and seem to be nice and bright without the resistor... I mean, I know I should have resistors on but... What's the bare minimum I can get by? (I'm looking at the description and tryign to figure out what the minimum these leds need for resistors.

Here's a pic of a comparison between one with the bussed resistor and just an led. (The picture is a lot brighter than without, but you can tell easily the difference.)

Since I have to reorder that 10bar led, I was going to get some other resistors (digikey has a ton!) but finding the bare minimum would make me feel better. I mean this site has the same kind of resistors, but these go from 10 ohms to 10 million!

https://imgur.com/a/LO7gD
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 25
Afterlife Ecto Goggles Build

Thank you for posting this information. This is a[…]

I'd really like to see the new t-shirt unlocks t[…]

Hey and welcome

My Little Pony/Ghostbusters crossover done by my d[…]