Page 1 of 1

3D Printed PKE: New Model and New Electronics

Posted: April 27th, 2018, 11:58 pm
by slicerd1
Hey All,

While I am fortunate enough to own a matty PKE I hate the idea of losing/breaking it and not wanting to spend $300 on a new one. I started printing some thingiverse versions but while some of models are very nice they all missing major features or were very hard to print. So I have built my own model and electronics to go with it. I am not a programing wizard nor electronics engineer so I will be keeping it as simple as possible. The only thing I have cut out is sound it just adds to much extra electronics so lights and motion only.

Early Rough shape. So many curved surfaces! Even the handle had curves and getting the curves and fillets to play nice was not easy. I took the opportunity to start using Fusion 360 and once I got used to its pretty sweet, and FREE!
Image

Added front pop out for screen and buttons. Also added the side insets, these were missing from many other models and that really bugged me for whatever reason.
Image

Backside with ribs, sound like a BBQ menu item.
Image

Punched holes in all the appropriate areas and created wings. I also split the model in half to be able to print on a 200x200mm printer. I have exported all these pieces and will be printing test prints so I can get a better idea of what need to change and be added for electronics.
Image

Wings with gears. I worry that I made the tolerances to tight here but only time will tell.
Image

Early electronics. The biggest issue is when you hit the button to move the wings it interrupts the leds. But if you just tap the button vs holding it down it's not super noticeable. I could just run two separate arduinos or fix the code I guess.
https://youtu.be/GYJfsJefVxk

Re: 3D Printed PKE: New Model and New Electronics

Posted: April 28th, 2018, 7:54 am
by taylorxxwolfie
That is RADICAL!

Re: 3D Printed PKE: New Model and New Electronics

Posted: April 28th, 2018, 2:16 pm
by slicerd1
taylorxxwolfie wrote: April 28th, 2018, 7:54 am That is RADICAL!
Thanks man!

I printed a couple parts and the wings appear to work! Now I have to edit then to accept electronics.
https://youtu.be/K5Z9Wz8tmXU

Re: 3D Printed PKE: New Model and New Electronics

Posted: April 28th, 2018, 2:55 pm
by Darth_Egon
Are you going to offer these for sale if so please take my money lol

Re: 3D Printed PKE: New Model and New Electronics

Posted: April 28th, 2018, 3:00 pm
by slicerd1
Darth_Egon wrote: April 28th, 2018, 2:55 pm Are you going to offer these for sale if so please take my money lol
Honestly I would consider it. I could just sell the 3d printed parts or an entire kit w electronics. The later would be more effort but I am building these around specific parts but I guess I could always list a bom and people could get their own parts.

Re: 3D Printed PKE: New Model and New Electronics

Posted: April 28th, 2018, 7:26 pm
by Darth_Egon
I would love to have a belt hanger. You can make it where you can raise the arms manually adding a few less would be easy. Please keep me posted

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 2nd, 2018, 12:27 pm
by carguyshu
i'd be interested in one

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 2nd, 2018, 2:50 pm
by CountDeMonet
That model looks great. The best recreation of the actual model I've seen yet. Nice work!

On the code side there should be no need to use two arduinos for this. Take a look at my pke code here.

https://github.com/CountDeMonet/Arduino ... _METER.ino

I show how to handle the button presses while doing the led animations at the same time. I'd be happy to take a look at the code and give suggestions if you want. I went a little more fantasy in my build but the features are similar and it has the GB2 led arm sequence already coded


Re: 3D Printed PKE: New Model and New Electronics

Posted: May 2nd, 2018, 3:17 pm
by slicerd1
CountDeMonet wrote: May 2nd, 2018, 2:50 pm That model looks great. The best recreation of the actual model I've seen yet. Nice work!

On the code side there should be no need to use two arduinos for this. Take a look at my pke code here.

https://github.com/CountDeMonet/Arduino ... _METER.ino

I show how to handle the button presses while doing the led animations at the same time. I'd be happy to take a look at the code and give suggestions if you want. I went a little more fantasy in my build but the features are similar and it has the GB2 led arm sequence already coded



Thanks count. Your setup is pretty sweet. I wish my coding skills were up my modeling skills.

I took a look at your code but I am still a hack when it comes to this. I was able to take code that changes led speed via potentiometer and code to move servos via buttons and mashed those together. That was pushing my current skill limits. Right now it checks for button press after every led change and that's why it creates a delay. But honestly I don't have a clue how to separate the two, other than another arduino ;)

If you wanted to take a peak at my code its below and ideas or even a pointer to how I could restructure would be appreciated.

int delayTime = 0; //this is our initial time delay. We will change it by turning the rotory shaft of the pot.
#include<Servo.h>
int pos = 20;
Servo servo;
void setup()
{
//declare D2 - D11 as outputs
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, INPUT);
pinMode(11, INPUT);
servo.attach(9);
}
void loop()
//the loop will repeat over and over again
{
delayTime = analogRead(0);
//We are now setting our delayTIme from 0 to the number being read on A0 which is the position of the rotory shaft on the pot.

digitalWrite(2, LOW); delay(delayTime);
digitalWrite(2, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(3, LOW); delay(delayTime);
digitalWrite(3, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(4, LOW); delay(delayTime);
digitalWrite(4, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(5, LOW); delay(delayTime);
digitalWrite(5, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(6, LOW); delay(delayTime);
digitalWrite(6, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(7, LOW); delay(delayTime);
digitalWrite(7, HIGH); delay(delayTime);
delayTime = analogRead(0);
while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

digitalWrite(8, LOW); delay(delayTime);
digitalWrite(8, HIGH); delay(delayTime);

while (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
delay(5);
}
while (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
delay(5);
}

}

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 2nd, 2018, 9:23 pm
by CountDeMonet
The big thing I see in the code are all of those delays. The delays add up and start causing your program to stall. You want to basically eliminate them and replace them with intervals. If you look at the LEDLoop function in my code one of the first things I do is grab the current time.

unsigned long currentMillis = millis();

Then using duration I can make things like animations or servo movements happen.

if ((unsigned long)(currentMillis - previousMillis) >= ledSpeed){

previousMillis holds the last time this loop did something and ledSpeed is how often it should do it. You can completely replace delays using this template.

I think if you can work out the delays you'll find the code runs a lot smoother.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 2nd, 2018, 11:38 pm
by slicerd1
Thanks for the pointer count I will see what I can figure out.

Meanwhile I have parts printed and thought I would share actual pictures.

Comparison next to the matty PKE
Image

Full body Shot
Image

Upper body Shot
Image

Side Matty comparison
Image

Obviously there are some differences and you can see the layers but I am pretty happy overall. I have already done a bunch since I printed these including, place for potentiometer, place for servo, holes for screws, bigger button holes, hollowed out wings, wing led holes.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 3rd, 2018, 8:15 am
by khazara
Looking forward to your progress on this. I have been wanting a PKE for some time but am unwilling to pay $300+ on eBay for one.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 3rd, 2018, 10:32 am
by slicerd1
CountDeMonet wrote: May 2nd, 2018, 9:23 pm The big thing I see in the code are all of those delays. The delays add up and start causing your program to stall. You want to basically eliminate them and replace them with intervals. If you look at the LEDLoop function in my code one of the first things I do is grab the current time.

unsigned long currentMillis = millis();

Then using duration I can make things like animations or servo movements happen.

if ((unsigned long)(currentMillis - previousMillis) >= ledSpeed){

previousMillis holds the last time this loop did something and ledSpeed is how often it should do it. You can completely replace delays using this template.

I think if you can work out the delays you'll find the code runs a lot smoother.
Hey Count, this was super helpful. I looked at your code and some detail online and once I wrapped my head around what it was doing it makes a lot of sense. My new code is below and it appears to work exactly the way I want.

#include<Servo.h>
int pos = 0;
Servo servo;
int LEDNum = 0; // current LED that is lit
unsigned long previousMillis; // will store last time LED was updated
unsigned long servopreviousMillis; // will store last time servo was updated

int ledSpeed = 0;
int servoSpeed = 10;

void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, INPUT);
pinMode(11, INPUT);
servo.attach(9);
}

void loop() {
unsigned long currentMillis = millis();
ledSpeed = analogRead(0);

if (currentMillis - servopreviousMillis >= servoSpeed)
{
servopreviousMillis = millis();
if (digitalRead(10) == HIGH && pos < 170) {
pos++;
servo.write(pos);
//delay(15);
}
else if (digitalRead(11) == HIGH && pos > 20) {
pos--;
servo.write(pos);
//delay(15);
}
}


if ((currentMillis - previousMillis >= ledSpeed))
{
previousMillis = millis();

if ( LEDNum == 0 ) {
digitalWrite(2, LOW);
LEDNum = 1;
} else if ( LEDNum == 1 ) {
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
LEDNum = 2;
} else if ( LEDNum == 2 ) {
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
LEDNum = 3;
} else if ( LEDNum == 3 ) {
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
LEDNum = 4;
} else if ( LEDNum == 4 ) {
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
LEDNum = 5;
} else if ( LEDNum == 5 ) {
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
LEDNum = 6;
} else if ( LEDNum == 6 ) {
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
LEDNum = 7;
} else if ( LEDNum == 7 ) {
digitalWrite(8, HIGH);
digitalWrite(2, LOW);
LEDNum = 1;
}
}
}

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 3rd, 2018, 10:52 am
by CountDeMonet
cool. Looks good to me.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 3rd, 2018, 3:01 pm
by Weideman
Dude, these are rad! Your work never ceases to amaze me man.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 3rd, 2018, 3:38 pm
by CountDeMonet
If you wanna do the GB2 animation the sequence goes like this from inside out

3 - 1 - 6 - 4 - 7 - 5 - 2

That's what I have coded in mine. For GB1 its

3 - 5 - 7 - 4 - 1 - 6 - 2

source: http://cylandprops.com/PKEmeterp3.html

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 4th, 2018, 1:55 pm
by slicerd1
Weideman, thanks! I am looking forward to seeing your new big project progress, pretty jealous of that.

Count, I was going to try GB1 sequence but when I figure it out I have the 7 and 4 switched. I will check it out again.

All the small things. Wings, buttons, knobs, screens, etc. I took me about 4 designs to get wings that I liked how they fit together.
Image

Testing out the wings and servo location. I am pretty happy with how it's working. The only thing I am debating is how to hold the servo in place. One screw side is cut out for the cable but I guess I can just glue it.
https://youtu.be/0v_tKaky7cg


I am struggling with getting the buttons and gear to fit into the same place. They share the same section of the handle and dont leave a lot of room to play with. Also the wings can move smoothly I was just showing that they can stop anywhere you want them too.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 4th, 2018, 2:09 pm
by Mrdopey
This is awesome. If I’m not mistaken you mentioned putting the files up on thingaverse. Will you also be doing the electronics

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 4th, 2018, 3:06 pm
by slicerd1
I do plan on releasing the files. I might sell a few first but it will definitely hit thingiverse or similar sooner or later. I will post more about electronics here, obviously the Arduino code is already posted here and I am no wizard with electronics so the schematics will be pretty simple. I will also post a BOM so people can easily purchase all the parts they need.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 6th, 2018, 11:30 am
by timeware
Every time you guys 3D print a prop i'm blown away. Cant wait to tackle this one. Although I think i'm going to turn mine into an EMF detector rather then a stand alone movie prop.

Re: 3D Printed PKE: New Model and New Electronics

Posted: May 9th, 2018, 11:06 am
by Mrdopey
slicerd1 wrote: May 4th, 2018, 3:06 pm I do plan on releasing the files. I might sell a few first but it will definitely hit thingiverse or similar sooner or later. I will post more about electronics here, obviously the Arduino code is already posted here and I am no wizard with electronics so the schematics will be pretty simple. I will also post a BOM so people can easily purchase all the parts they need.
I would love to purchase one as I do not have a 3d printer of my own. I look forward to hearing more on when you will offer these.

Re: 3D Printed PKE: New Model and New Electronics

Posted: June 1st, 2018, 10:41 am
by RamaSha007
Wow. I've been hoping someone would do something like this. I loved making my 3d printed ghost trap and would love to tackle this as well.

Re: 3D Printed PKE: New Model and New Electronics

Posted: June 8th, 2018, 11:05 pm
by Deciusx
Put the files on Etsy. I’ll buy it!

Re: 3D Printed PKE: New Model and New Electronics

Posted: June 24th, 2018, 3:29 pm
by z0014nd3l2
This looks awesome! Put me down to buy if you ever decide to sell as a kit. Really looking forward to seeing the finished product.

Re: 3D Printed PKE: New Model and New Electronics

Posted: July 8th, 2020, 7:40 pm
by LtPinkerton
Any update on if the files are available for sale? Would love to purchase them

Re: 3D Printed PKE: New Model and New Electronics

Posted: August 18th, 2021, 2:09 pm
by Chiliarch
Hi! Beautiful work. Is the Fusion 360 file available for share?