Dumping firmware/software...and/or reflashing??

Hello! I am very impressed by your work here and have ordered some cheap programmer to attempt some of this myself. :slight_smile:

My programming skills are sub-par and I may not be as able as willing to contribute, though, fair warning. :roll_eyes: I wondered about two things primarily, to start things out. One, is it reasonable to buy a new chip and experiment with that one, using your code as the starting point? By doing this I will keep a spare chip and sleep at night :wink: Two, I also have an X7 classic I'd like to experiment with, how much of the code would conceivably need to be rewritten to suit the classic's trigger system and solenoid?

Keep up the good work!

Excellent! Welcome aboard!

I do not have any experience with the x7 classic. I would not recommend using this software on the x7 classic eGrip. I'm not sure if it uses the same chip as the Phenom, so the programming here may be useless. If you can, please take a picture of the board (as detailed as possible - all sides of the board) and we might be able to figure out if it will work. Is your board from Tippmann, APE, or another manufacturer?

If it does use the same chip, you can buy new chips to test with at several vendors (digikey, mouser, ...).

This is the chip that goes in the Phenom:

Since the chip is rather small and difficult to test with, you can get the same chip in DIP format to fit in a standard breadboard (warning: this chip is only for testing the programming, this chip will not fit in the marker):

So I disassembled the eGrip on my X7 classic. Under a sticker on the chip I found the markings of an Atmel ATtiny44. (jackpot!) It is a stock Tippmann board, and from what I can understand the board is very closely related to the Phenom, moreso than the 98c and A5. I also own a 98pro and will disassemble it tomorrow to see if it is the same chip. This project may help a bunch of people if this is correct, not just Phenom users.

I don't have an adequate camera on hand. However, I compared with pictures found online and this is the exact same board, only mine is blue and with the solenoid still soldered on (mine fell off and I had to stick it back on) and a capacitor on the back that reads 6800µF / 10V.


Perhaps it is my calling to port this amazing code to other Tippmann eGrips. I figured I might as well try the X7C first because the board is already soldered back and forth a few times. :smiley:

Thanks for the links by the way, but I fear the shipping fee is a bit excessive. $30 to ship a $1 chip of negligible weight to Norway seems off-putting somehow. I'll look for the part elsewhere.

Edit: I ordered an adapter cradle for ATtiny chips, the chips themselves and some breadboards from ebay and farnell.

The adapter cradle for the tiny chips looks handy!!! I like that, good find!

I'm not an electronics genius (yet lol) nor do I pretend to be, but just on initial thought I'm thinking that that A5 and 98c boards are going to be completely different and this software may need tons of revamping to make it work. The main thing that tips me off to that is the fact of how each of them turn on. This may be minor, but it does signify in my mind a bit of different circuitry (hall effect vs push button).

Like I said though, this is just theory and though. I'm looking forward to finding out though.

Yes, I may be overreaching in respect to my skill level there. :roll_eyes: The 98 pro / A5 board is not nearly similar to the x7 / Phenom family. I disassembled it and recognized absolutely zero major components. I'll shelf the idea.

The adapter cradle (I don't know if it's called that but it sounded right) is perhaps the laziest way to reprogram the chips; then again, I am lazy and my rate of success hinges solely on a trial-and-error basis. Plus, I'm a lumberjack by trade and my abrasive, clumsy hands are not meant for precision soldering. Perhaps, with some luck - and a stanley knife - a cradle component like the one on top of that adapter can be soldered onto the motherboard itself. Could be useful for swapping chips fast.

As for the programming itself; from studying pictures and specification write-ups of the two boards, it seems this software is compatible without major modifications. The hardest challenge would presumably be swapping the mechanical mode on the Phenom eGrip with a semi-auto mode (or another slot for programmable firing modes, like on the APE board). Without modifications, I presume the board will either default to the programmed setting, not function on semi-auto, or not function at all. Murphy's Law tells me it's the latter, so I'll begin scouring the code itself to look for the loops I need to focus on. The two boards may be one magnetic sensor component off from being the exact same board, however.

I am a complete noob at this so bear with me if something I say makes absolutely no sense.

Laggard:
The 98 pro / A5 board is not nearly similar to the x7 / Phenom family. I disassembled it and recognized absolutely zero major components.

I agree. My neighbor has an eGrip for the A5 and it didn't seem to be powered by a Atmel chip. I wasn't able to get too close, but I would guess by the switches used to modify the firing modes, that it is not powered by a microcontroller.

Laggard:
The hardest challenge would presumably be swapping the mechanical mode on the Phenom eGrip with a semi-auto mode (or another slot for programmable firing modes, like on the APE board). Without modifications, I presume the board will either default to the programmed setting, not function on semi-auto, or not function at all. Murphy's Law tells me it's the latter...

In the Phenom board, there are three electromagnetic relays that are used to turn on the board, and sense when the trigger is pulled. I may have been wrong in how I'm using them (it has been a burning question in my head since I started). Out of the 3 relays, I'm utilizing 1 of them. 2 of the relays appear to be identical; they sense when the trigger is pulled. The other relay does not appear to connect directly to the micro controller (it is used to power the board).

On the Phenom, there is a rare earth magnet in the safety switch. When the switch is rotated to full auto, the magnet activates a relay to power on the board. I'm not sure how an APE board is powered on for the x7. It's possible that their board has another relay to sense the mechanical safety-switch position as well as full auto. In other words, this may not be possible for the x7 or Phenom without modifying the hardware on the board.

I'll take another look at the relays on my board to see if one of the relays could be used to sense the mechanical safety-switch position.

As for modifying the software, it all depends on the pin-outs of the board:
Pins 5 and 7 connect to the relays for the trigger. (their voltage goes LOW when the trigger is pulled). I'm only using pin 5 to sense for trigger pulls. Hopefully this matches the x7 classic. As far as I could tell, there is no pin to control the relay that powers on the board. It's probably connected directly to the voltage regulator to supply power to the chip.

I tried to create a picture representation of my test board. I think I got all the connections right. :smiley:

phenomTestBoard.png

Whats with the green highlights on the powered rows and columns? is that a feature I missed in VBB?

I used a different program called Fritzing. It uses highlights on the breadboard for easy reading:

I especially like the auto routing capabilities between the breadboard and Schematic modes.

mikedehaan:
I agree. My neighbor has an eGrip for the A5 and it didn't seem to be powered by a Atmel chip. I wasn't able to get too close, but I would guess by the switches used to modify the firing modes, that it is not powered by a microcontroller.

It is an 8-pin something something that I'm not too familiar with. :slight_smile: It'll be a project for a time when resources are scarce I suppose.

mikedehaan:
In the Phenom board, there are three electromagnetic relays that are used to turn on the board, and sense when the trigger is pulled. I may have been wrong in how I'm using them (it has been a burning question in my head since I started). Out of the 3 relays, I'm utilizing 1 of them. 2 of the relays appear to be identical; they sense when the trigger is pulled. The other relay does not appear to connect directly to the micro controller (it is used to power the board).

On the Phenom, there is a rare earth magnet in the safety switch. When the switch is rotated to full auto, the magnet activates a relay to power on the board. I'm not sure how an APE board is powered on for the x7. It's possible that their board has another relay to sense the mechanical safety-switch position as well as full auto. In other words, this may not be possible for the x7 or Phenom without modifying the hardware on the board.

There are three electromagnetic relays on the X7C board. Two are on adjacent opposite positions on both sides of where the trigger magnet is situated on a trigger pull, while one is situated on the other side of the board, outside where the magnet in the safety switch "wing" positions itself if you flip it one more step into the programmed mode (for the Phenom, where the electronics kick in). I'm fairly confident, after bending the two mirrored relays a bit back and forth, that they are essentially giving the same information to the controller. Perhaps there is two of them because of redundancy, or polarity sensing limitations. The safety switch relay is only on one side for obvious reasons. Do you have any insight into the mechanical mode and how it is relayed?

Edit: Well now I feel stupid. Of course the mechanical mode is not relayed, that's the entire point. :roll_eyes:

I'm wondering if the two sensors are for when the gun is in response mode. To me it makes sense; pull the trigger and one/both get flipped, but while the trigger is in ge pulled position, even if for just that brief second it then senses when the second one gets flipped on th way out to trigger the solenoid?

Jus a theory, plausible theory IMO too.

What's happened with the wiki page?
http://code.google.com/p/phenomx7-etrigger/w/list

Thank you for pointing this out. There was a problem with the google code source repository. I've repaired the issue and the wiki should be back.

I got my USBASP programmer yesterday after 23 days waiting. Of course this happened during the time the wiki was down haha. I successfully programmed one of the spare ATTINY44 chips using WinAVR though; now I wonder if there's any way to test it. Do you have a picture or schematic for a test bed breadboard? If not, don't sweat it. I'll have to study the x7 chip to figure out differences with the Phenom anyway. Also, would upgrading to an ATTINY84 have a significant impact on anything?

Yeah, I'm sorry about the wiki. I was trying to switch over the source code repository, but apparently google does not auto transfer what was already on the site. I'll attempt the switch again eventually, but not for a while.

I've attached a schematic of a test breadboard that should work with our programming for the Phenom. I need to make a few changes to it for the original Tippmann chip (it requires more pins to be pulled-up/pulled-down than my firmware), but this test breadboard should work just fine for our firmware.

The ATtiny84 is a drop in replacement for the ATtiny44 (pinouts are the same, clock is the same, etc.). The ATtiny84 provides 8k of memory versus the 4k on the ATtiny44, but other than that, it's the same chip. I would love to grow the firmware with additional options that I'm currently unable to fit on the ATtiny44 due to the smaller memory, but I want to keep the firmware small enough so people can use it on stock versions of the board (no soldering required).

If you do plan on soldering in a new ATtiny84, perhaps we should branch the source code for this firmware and start adding features.

Thank you for the schematic, very clear and helpful. It would only take one more resistor to add a switch (the safety switch electromagnetic relay), correct? I've only ordered 10 which should be here shortly. Which pin does it use on the Phenom?

I could solder on an t84 right away if I thought I had the skill. Maybe I can ask a friend to help me though. What functions were you thinking of, more firing modes or more refined logic? Originally, I envisioned an I²C library to have it connect to other devices such as a display and scroll wheel. Crazy, I know. I shelved the idea when I realized it would probably severely impact battery life and reliability.

Laggard:
It would only take one more resistor to add a switch (the safety switch electromagnetic relay), correct?

The safety switch relay does not connect directly to the ATtiny44. Instead, the relay controls the power to the chip Vcc (Pin 1). To simulate this on the breadboard, I just plug and unplug the power source.

Laggard:
What functions were you thinking of, more firing modes or more refined logic?

A mixture of both. The stock board has the ability to detect low voltage from the battery and indicate that the battery is low to the user. I have not finished researching this, but I don't really have the space for it on the chip either. It was that or presets. For firing modes, I don't have any ramping. I would like to include some version of it. I'm trying to optimize the code a bit (without going to assembly) and might be able to make room for one more firing mode (fingers crossed).

Laggard:
Originally, I envisioned an I²C library to have it connect to other devices such as a display and scroll wheel. Crazy, I know. I shelved the idea when I realized it would probably severely impact battery life and reliability.

Crazy? Absolutely! But we're all a little crazy. We've had similar ideas about adding peripherals (kill counter, ammo counter, ...). For this, I think we would include a separate enclosure with a picatinny mount so it could store a separate battery for itself, and link up to the stock board with a cable tied to the pinouts (drawing as little current as possible to get the job done). I'm not a hardware guy, but I think this is possible.

mikedehaan:
The safety switch relay does not connect directly to the ATtiny44. Instead, the relay controls the power to the chip Vcc (Pin 1). To simulate this on the breadboard, I just plug and unplug the power source.

This is true but I would need to include a separate switch in order to customize the code for the X7 classic. The relic requires being powered by pressing the programming button, and programming mode is only entered if you activate the board with the trigger pulled. The electromagnetic relay would only serve as a precondition for alternate firing modes to be activated, as the board being powered but the relay untriggered constitutes a separate, electronic, semi-automatic firing mode. This might be a problem, considering the limited available memory space.

mikedehaan:
A mixture of both. The stock board has the ability to detect low voltage from the battery and indicate that the battery is low to the user. I have not finished researching this, but I don't really have the space for it on the chip either. It was that or presets. For firing modes, I don't have any ramping. I would like to include some version of it. I'm trying to optimize the code a bit (without going to assembly) and might be able to make room for one more firing mode (fingers crossed).

I could possibly buy another stock board for my Phenom, to experiment with the t84. Then I would be less likely to get bruised up like seven hells if it spazzes out. I'm game. Give me a couple weeks though.

mikedehaan:
Crazy? Absolutely! But we're all a little crazy. We've had similar ideas about adding peripherals (kill counter, ammo counter, ...). For this, I think we would include a separate enclosure with a picatinny mount so it could store a separate battery for itself, and link up to the stock board with a cable tied to the pinouts (drawing as little current as possible to get the job done). I'm not a hardware guy, but I think this is possible.

Haha I never thought of that. A separate device with its own power supply would be great, if it means the etrigger device works independently of the battery condition of the peripheral. Potentially this could be a total conversion awesomification set to make your Phenom a goddamn Starship Troopers space gun to distinguish it from that there gaggle of "normal" space laser guns.

anyone experienced this problem? (unwanted auto cycle trouge all presets)
http://code.google.com/p/mad-phenom/issues/detail?id=2