Jump to content



Photo
* * * * * 9 votes

Pinscape Controller software V2

pinscape

  • Please log in to reply
975 replies to this topic

#741 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 January 2019 - 10:43 PM

Everything works as is, but I’d like to reduce the speed because the very high RPM doesn’t feel natural.

Is it possible to set a default PWM value for the gear motor somewhere? Like 30% or similar.
The Pinscape Config tool has a slider for testing PWM outputs, so I have tried and know it is possible.

I don’t need different setting for each table, just a one time permanent adjustment.

 

There really ought to be a setting for that in the DOF config tool - there *is* such a setting for the shaker motor and some of the other devices.  But alas, not for the gear motor.

 

Happily, there's a trick you can use in the Pinscape settings.  If you go to the Output Port list at the bottom of the Settings page, you'll see that each output has a little "flipper" icon next to it.  That's the Flipper Logic setting, which lets you set a reduced power level after an initial full-power interval. This is really designed for flipper coils and other pinball coils that need to have reduced power after an initial full-power surge, but you can also use it as a simple fixed PWM level control. 

 

Find the port your gear motor is wired to, then click the flipper-logic icon to enter settings.  Set the initial hold time to zero, and set the reduced power level to get the motor speed you want.



#742 Ciceronic

Ciceronic

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: Sweden

  • Favorite Pinball: The Getaway High Speed II

Posted 03 January 2019 - 12:56 AM

Thanks alot!

That saved me many hours/days/months/years?? for figuring it out by myself. :D



#743 mon72

mon72

    Enthusiast

  • Members
  • PipPipPip
  • 66 posts
  • Location:Gothenburg

  • Flag: Sweden

  • Favorite Pinball: Indiana Jones

Posted 17 February 2019 - 05:51 PM

Hi mjr...
sorry for the question I know it has been discussed befor in this thread on page 4. But this was 2016 so maybe there is something new.

My problem
Windows device manager does not show what button i press in the game controller...
It sould light up a number according to a pressed button on my cab...

I would be really thankfull for some help here...
I have tried both variants that you suggested to try... both in the human interface and in the regedit.
I have 32 red buttons but noone lights up when i press any button on the cab.
I have a KL25-Z Pinscape.

Edited by mon72, 17 February 2019 - 05:55 PM.


#744 mon72

mon72

    Enthusiast

  • Members
  • PipPipPip
  • 66 posts
  • Location:Gothenburg

  • Flag: Sweden

  • Favorite Pinball: Indiana Jones

Posted 17 February 2019 - 06:22 PM

YES
Found it

In the kl25-z Pinscape setup...
Button inputs...
Make sure you click "Set standard joystic buttons" and not "Set standard keyboard keys"
When I switched Windows device manager lights up the buttons i press with corresponding number.

Hope this helps someone else!

Br
mon72

#745 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 17 February 2019 - 07:32 PM

YES
Found it

In the kl25-z Pinscape setup...
Button inputs...
Make sure you click "Set standard joystic buttons" and not "Set standard keyboard keys"
When I switched Windows device manager lights up the buttons i press with corresponding number.

 

Glad you figured it out!  Right, if you want button inputs to act like joystick buttons, you definitely want to configure the button assignments as joystick buttons rather than keyboard keys.  Note that you can also mix and match joystick and keyboard assignments - you can assign each button individually to whichever mapping you want.

 

One more tip:  If you were using the Windows joystick control panel purely for testing purposes, to make sure that the buttons are wired up properly, you can do that more directly with the Config Tool.  The Button Tester window (click on the "Buttons" icon in the main screen) shows you the status of the physical buttons, regardless of whether they're mapped to joystick buttons or keyboard keys, so it's a more direct way to test the wiring.


Edited by mjr, 17 February 2019 - 07:35 PM.


#746 mon72

mon72

    Enthusiast

  • Members
  • PipPipPip
  • 66 posts
  • Location:Gothenburg

  • Flag: Sweden

  • Favorite Pinball: Indiana Jones

Posted 18 February 2019 - 08:09 AM

Hi
I tried that... It worked fine to show what key and what List number i pressed but it did not light up one of the red numbers.
But when i changed to joystick buttons insead of keyboard it worked as you explain and i could see the red numbers light up accordingly.

Br
mon72

Edited by mon72, 18 February 2019 - 08:10 AM.


#747 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 18 February 2019 - 07:01 PM

I tried that... It worked fine to show what key and what List number i pressed but it did not light up one of the red numbers.
But when i changed to joystick buttons insead of keyboard it worked as you explain and i could see the red numbers light up accordingly.

 

Right - that's because the red circles specifically represent joystick buttons.  If you map a physical button as a keyboard key, it's not a joystick button, so you won't see it light up a red circle.

 

In case it's not clear, the Pinscape board only *emulates* a joystick; it's not an actual joystick.  The physical switches and buttons you hook up aren't *actually* joystick buttons at any level.  If you use the Config Tool to assign a physical button as a joystick button, then the device will pretend that it's a joystick and send Windows a joystick button press when you press the button.  If you map a physical button as a keyboard key, the device will pretend that it's a keyboard key and send Windows a keyboard event when you press the button.  Does that make more sense now?



#748 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 19 February 2019 - 06:06 PM

MJ, I am building a 2nd Cabinet and I am installing my KL25Z and Pinscape software.  The first cabinet I just randomly chose GPIO pins for the flippers, launch, start.....  Is there a standard assignment sequence that I can use?  I'd like to stick to the same input buttons that the KL25Z and Pinscape software is expecting on this build.  Thanks!



#749 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 19 February 2019 - 07:22 PM

MJ, I am building a 2nd Cabinet and I am installing my KL25Z and Pinscape software.  The first cabinet I just randomly chose GPIO pins for the flippers, launch, start.....  Is there a standard assignment sequence that I can use?  I'd like to stick to the same input buttons that the KL25Z and Pinscape software is expecting on this build.  Thanks!

 

There's not really a "standard" arrangement, but there's at least a default arrangement.  If you go to the Config Tool settings page, find the section for the button mappings, and click the button for "use standard keyboard keys", it'll populate the button list for you with the default ordering.  (You can view it without changing anything on your existing KL25Z as long as you don't save settings - just be sure not to click on the "program KL25Z" button.)  

 

There's nothing magical about the default layout in terms of which specific button maps to which GPIO.  However, there is a method to the madness as to which GPIO pins are assigned as buttons in the first place.  Many of the KL25Z GPIOs have special capabilities (such as PWM output, interrupt input, analog input, or I2C/SPI/UART controller connections) that can only be accessed from those specific pins.  If you want to use one of those special capabilities, you have to attach it to one of the special pins with the capability.  Button inputs, in contrast, don't require any special capabilities; any GPIO can be a button input.  So the GPIOs that are selected in the default set as the button inputs are generally the ones without any other special capabilities, to ensure that the ones with the special features are free to be assigned to the other purposes that require them.



#750 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,806 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 19 February 2019 - 08:21 PM

I'm using one of these (KL25Z) boards for the nudging and a plunger set up...But i would like to start using it for items

Does it get wired similar to a ledwiz/ipac2 one ground in - several grounds out for buttons, lights and use the PMW output with one of these boards

https://www.ebay.com...872.m2749.l2649

Is there some wiring diagrams?



#751 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 19 February 2019 - 09:03 PM

I'm using one of these (KL25Z) boards for the nudging and a plunger set up...But i would like to start using it for items

Does it get wired similar to a ledwiz/ipac2 one ground in - several grounds out for buttons, lights and use the PMW output with one of these boards

https://www.ebay.com...872.m2749.l2649

Is there some wiring diagrams?

 

This section should cover it - skip down to "Standalone KL25Z" section:

 

http://mjrnet.org/pi...p?sid=psOutputs

 

I haven't seen those particular eBay boards before.  Most everything on eBay like this is designed for Arduinos, which means there are a few differences you have to be careful about:

 

- The first is that Arduinos are 5V devices and KL25Z's are 3.3V.  You have to be careful that the board doesn't try to feed 5V to the KL25Z anywhere, since the KL25Z GPIO pins are not "5V compliant", meaning you can blow transistors if you try to connect a 5V input to them anywhere.  Boards like these that have an output function generally don't apply voltages back into the KL25Z, so they're usually safe, but just be sure you know how it's set up and what voltages are on the pins you're connecting to the KL25Z.  

 

- The 5V vs 3.3V difference also means that some output-type boards (like these) might not trigger on the lower KL25Z voltage.  From what I've heard from people who have tried similar boards, most of them seem to work fine with the lower voltage, but it's a possible trouble spot with a new untested type.

 

- Arduino GPIOs can handle about higher sink/source currents than the KL25Z.  Nearly all of these eBay boards use optocouplers to connect to the Arduino, and they generally set their resistors for 5V at 20mA.  The KL25Z can only handle a max of 4mA on each GPIO, and I really recommend trying to keep it to 1-2 mA, because there's the usual complication that the aggregate current limit across multiple GPIOs is much lower than what you get when you multiply 4mA by the number of pins.  I don't remember what the exact aggregate limit is, but I think you're pretty safe if you keep each pin to 1-2 mA.  What this means for an Arduino-oriented output board is that you might need to add an extra small resistor between the KL25Z GPIO and the output board to limit the current draw.


(I'm always warning about the electrical interface limitations of the KL25Z vs the Arduino, so you might wonder why I didn't just use the glorious Arduino in the first place.  Well, other than the wimpy electrical interface, the KL25Z is a vastly more powerful device.  It has a much faster CPU and more memory.  An Arduino couldn't handle most of the functions we use it for piecemeal, let alone all on one device.)



#752 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,806 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 20 February 2019 - 05:01 PM

Thanks for the info

 

I'm using one of these (KL25Z) boards for the nudging and a plunger set up...But i would like to start using it for items

Does it get wired similar to a ledwiz/ipac2 one ground in - several grounds out for buttons, lights and use the PMW output with one of these boards

https://www.ebay.com...872.m2749.l2649

Is there some wiring diagrams?

 

This section should cover it - skip down to "Standalone KL25Z" section:

 

http://mjrnet.org/pi...p?sid=psOutputs

 

I haven't seen those particular eBay boards before.  Most everything on eBay like this is designed for Arduinos, which means there are a few differences you have to be careful about:

 

- The first is that Arduinos are 5V devices and KL25Z's are 3.3V.  You have to be careful that the board doesn't try to feed 5V to the KL25Z anywhere, since the KL25Z GPIO pins are not "5V compliant", meaning you can blow transistors if you try to connect a 5V input to them anywhere.  Boards like these that have an output function generally don't apply voltages back into the KL25Z, so they're usually safe, but just be sure you know how it's set up and what voltages are on the pins you're connecting to the KL25Z.  

 

- The 5V vs 3.3V difference also means that some output-type boards (like these) might not trigger on the lower KL25Z voltage.  From what I've heard from people who have tried similar boards, most of them seem to work fine with the lower voltage, but it's a possible trouble spot with a new untested type.

 

- Arduino GPIOs can handle about higher sink/source currents than the KL25Z.  Nearly all of these eBay boards use optocouplers to connect to the Arduino, and they generally set their resistors for 5V at 20mA.  The KL25Z can only handle a max of 4mA on each GPIO, and I really recommend trying to keep it to 1-2 mA, because there's the usual complication that the aggregate current limit across multiple GPIOs is much lower than what you get when you multiply 4mA by the number of pins.  I don't remember what the exact aggregate limit is, but I think you're pretty safe if you keep each pin to 1-2 mA.  What this means for an Arduino-oriented output board is that you might need to add an extra small resistor between the KL25Z GPIO and the output board to limit the current draw.


(I'm always warning about the electrical interface limitations of the KL25Z vs the Arduino, so you might wonder why I didn't just use the glorious Arduino in the first place.  Well, other than the wimpy electrical interface, the KL25Z is a vastly more powerful device.  It has a much faster CPU and more memory.  An Arduino couldn't handle most of the functions we use it for piecemeal, let alone all on one device.)

 



#753 STV

STV

    Enthusiast

  • Members
  • PipPipPip
  • 436 posts

  • Flag: United States of America

  • Favorite Pinball: Varies. 140 in the list ATM.

Posted 20 February 2019 - 06:47 PM

Outhere I've used those red 4 port mosfet boards to drive toys straight from the pinscape.  With some additional bits and pieces as described above of course.  The official pinscape expansion boards are most definitely safer/better/cleaner than my hack job but I'd be happy to share details of what I did if there's interest. 


#754 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 20 February 2019 - 11:10 PM

I'm wiring my new cab. The undercab rgb strip will be controlled by kl25z to uln2803a to one of those mini rgb amplifiers. Same setup as my first cab. I don't have the kl25z programmed yet but would like to test the uln2803a to rgb amp to led strip before I wire the kl25z into the mix. Can I do the test by simply placing temporary ground on the uln2803a input pins for the rgb strip? I've got the gnd already on pin 9.

#755 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 21 February 2019 - 07:08 PM

I'm wiring my new cab. The undercab rgb strip will be controlled by kl25z to uln2803a to one of those mini rgb amplifiers. Same setup as my first cab. I don't have the kl25z programmed yet but would like to test the uln2803a to rgb amp to led strip before I wire the kl25z into the mix. Can I do the test by simply placing temporary ground on the uln2803a input pins for the rgb strip? I've got the gnd already on pin 9.

 

I'm not entirely sure those will work with the KL25Z directly.  The problem is going to be that the KL25Z's 3.3V logic is too low-voltage for at least some of the designs.

 

Before hooking it up to the KL25Z, you should try applying 12V power its red/black wires, and check the R-G-B signal input pins with a voltmeter.  Make sure they're not reading a positive voltage relative to the black wire, or if they are, make sure it's not above 3.3V.  It's likely to damage the KL25Z if those pins are reading above 3.3V.

 

If that looks safe, you can try hooking it up and see what happens.  I suspect it's going to turn the LEDs on constantly no matter what state the GPIO pin is in, because the designs for these I've seen will trigger with anything below about 5V on their signal inputs.  The KL25Z "high" is only 3.3V, so "high" and "low" (on and off) are both going to look like "on" signals to the amplifier.

 

So I suspect you're going to need some additional circuitry to get them to work.  A little NPN circuit like the one described here should do the trick (scan down the page for "NPN booster"):

 

http://mjrnet.org/pi...p?sid=psOutputs

 

If that's necessary, though, I think it would be simpler to ditch the LED mini-amp entirely and use one of the little MOSFET boosters like STV mentioned above.  Those will be happy to drive light strips directly.



#756 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 22 February 2019 - 02:38 AM

This part of the build is on hold, I am having a power on problem, I suspect, although I took precautions, that I introduced a short somewhere on my MBoard.  After power on, it shuts down almost immediately.  I am going to have to tear this down and bench test the MBoard, CPU/Fan, PSU.  Shame too, I got all my buttons wired and configured in Pinscape today....



#757 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 22 February 2019 - 05:06 PM

This part of the build is on hold, I am having a power on problem, I suspect, although I took precautions, that I introduced a short somewhere on my MBoard.  After power on, it shuts down almost immediately.  I am going to have to tear this down and bench test the MBoard, CPU/Fan, PSU.  Shame too, I got all my buttons wired and configured in Pinscape today....

Fixed! Found2.8 mohms across the power switch. I used these crappy connectors and the pc didn't know if it was supposed to be on or off so it was just shutting down. The clue i was getting was the controlling power strip was not turning off the peripherals. But I didn't figure it all out until i tore the whole thing down and bench tested. Full speed ahead!

#758 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 26 February 2019 - 04:58 AM

I have a question for those of you using the "Flipper Logic" feature.

 

Would anyone be adversely affected if I changed the available timing parameters a bit? 

 

The way it's set up now, you can specify the initial full power interval in increments of 50ms, from 50ms to 800ms.  

 

I'd like to change it to provide finer-grained control on the low end, so that you can have shorter intervals than 50ms.  I've been talking to someone who's trying to get his chime unit working better, and what he needs is the ability to specify a very short interval so that the solenoid does a quick strike and rebound, without the hammer sticking at the top and damping out the chime.  DOF is holding the solenoid on for too long, so he wants to be able to specify a shorter time via the controller.  I think this is a common issue with chimes, so this would probably help other people as well.  And the controller is probably the right place to address it; DOF just isn't capable of the same degree of timing precision as a controller, because of all the layers of Windows and USB involved.  

 

The snag with the controller is that I only allocated 4 bits to specify the timing.  (Memory is tight on the KL25Z!)  4 bits is 16 levels, which is why we have this weird scale of 50ms increments up to 800ms.  When I designed this, I was thinking in terms of coil protection only, so that seemed to be about the right range.  But for chimes, I think we're going to need something more in the 5 to 10ms range.  

 

My proposal is to change to a sort of faux logarithmic scale.  Something like this:

 

   1ms

   2ms

   5ms

   10ms

   20ms

   40ms

   80ms

   100ms

   150ms

   200ms

   300ms

   400ms

   500ms

   600ms

   700ms

   800ms

 

If I did this, you might need to adjust your settings the next time you update the firmware to compensate for the time scale change.   The potential downside for some people is the loss of precision at the higher end of the scale - we lose settings like 250 ms.  Is anyone using a current setting that would be lost on the new scale, and if so, would that be a problem?  In other words, would it not work for you to go to the next higher or lower 100ms increment?

 

My guess is that the new scale should work just as well as the old scale for anyone using this for the original use case of coil protection.  But I wanted to ask just in case anyone sees a potential problem with it.

 

Let me know what you think.  There are other ways I could address this if it this would be a problem for anyone, but this is my preference right now.



#759 rickh

rickh

    Enthusiast

  • Gold Supporter
  • 435 posts
  • Location:Raleigh

  • Flag: United States of America

  • Favorite Pinball: I love them all

Posted 27 February 2019 - 03:33 AM

Mike,

 

I only recently wired my board using the last of the 10 PWM I/O bits for a solenoid.  Perhaps I should preface this by explaning that my intentions are for something other than pinball.  I am trying to replace a binary interlocks solenoid controller with a PWM version that allows full 24V power to be applied initially, and scales it back to 50% after 100 mS.  The reason being is that this soleniod produces a crazy amount of heat when tied to 24V power.   Anyway, I'm using this experiment to leverage for both hobby and work.  So if you have some experimental code, I would love to be your guinea pig. 

BTW- I noticed that you use a 555 one-shot on your boards as a means of shutting down activated channels if the controller hangs up.  I was thinking it would be really cool to gate the MOSFET driver with a 60 Hz (limited duty cycle) signal after ~50ms of full power.  It would give the soloniod that anoying 60 Hz hum, reduce the power to prevent any device damage and reduce circuit complexity.  Just a crazy thought, too much idle time.    

 

Regards,

 

Rick


Rickey

Intense Arcade

http://www.intensearcade.com

 


#760 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 27 February 2019 - 03:51 AM

I only recently wired my board using the last of the 10 PWM I/O bits for a solenoid.  Perhaps I should preface this by explaning that my intentions are for something other than pinball.  I am trying to replace a binary interlocks solenoid controller with a PWM version that allows full 24V power to be applied initially, and scales it back to 50% after 100 mS.  The reason being is that this soleniod produces a crazy amount of heat when tied to 24V power.   Anyway, I'm using this experiment to leverage for both hobby and work.  So if you have some experimental code, I would love to be your guinea pig.

 

If you're talking about the Flipper Logic changes I posted about above, you actually don't have to wait for anything experimental - Flipper Logic is already there and can do the 50% power reduction after 100ms.  Fire up the config tool and look for the little flipper icon next to the port you're using the solenoid.  Click on it to enable the flipper logic feature for the port, and set the sliders for the initial full-power interval and the reduced power level. 

 

 

BTW- I noticed that you use a 555 one-shot on your boards as a means of shutting down activated channels if the controller hangs up.  I was thinking it would be really cool to gate the MOSFET driver with a 60 Hz (limited duty cycle) signal after ~50ms of full power.  It would give the soloniod that anoying 60 Hz hum, reduce the power to prevent any device damage and reduce circuit complexity.  Just a crazy thought, too much idle time.    

 

That's an interesting idea - basically put something like Flipper Logic in hardware.  I don't know, though; it seems like fixing the timing and power parameters in hardware isn't flexible enough.  I have to think some coils are going to need higher "hold" power to stay engaged and some need lower hold power to avoid overheating, so this seems like a job for the software side.







Also tagged with one or more of these keywords: pinscape