Page 1 of 1

Epic Fail?

Posted: Sun Jan 27, 2008 8:36 pm
by singularity
this sucks the automated part of my propane mortar is anything but automated. i "finished" it about a week ago and gave it to one of my friends so we could test it in a more remote area (everyone in my town has 911 on speed dial, i hate this place). i finally got to test it this weekend but to my surprise the program which had worked flawlessly in simulation failed miserably.


this would make me believe that some were between the proto board and and the final circuit something broke, i have reprogrammed the chip numerous times (in the final board along with the proto board) with no improvements. the problem is the chip seems to lose clock cycles or something so the delays between each stage of firing vary greatly (for example a delay i set to 2 second can be anywhere from 1/2 sec to 3 seconds. does anyone know what would cause this?

extra info...

"final board" = picaxe-18 standard project board
"protoboard" = picaxe experimenter
"chip" = picaxe 18

code....

'pin6 = arming button
'pin7 = projectile sensor
'0 = valve 1
'1 = valve 2
'2 = chamber fan
'3 = igntion
'4' venting valve


main:
label_1: if pin6=1 then label_2 'pin6 is the arm button
goto label_1

label_2: high 0 'meter valve 1 sequence
wait 1
low 0

label_3: if pin7=1 then label_5 'pin7 checks if a projectile is loaded
goto label_3

label_11: if pin7=1 then label_6
goto label_22

label_22: if pin7=0 then label_7
goto label_11

label_5: high 1 'meter valve 2 sequence and fan turn activation
high 2
wait 2
low 1
pause 250
goto label_11

label_6: high 3 'ignition sequence
pause 500
low 3
goto label_11

label_7: high 4 'veting sequence (venting module does no exist) and fan deactivation
wait 3
low 4
low 2
goto label_1


pics...

<img src="http://i78.photobucket.com/albums/j85/i ... 81953d.jpg">

<img src="http://i78.photobucket.com/albums/j85/i ... 81953c.jpg">

<img src="http://i78.photobucket.com/albums/j85/i ... 81953a.jpg">

<img src="http://i78.photobucket.com/albums/j85/i ... 081953.jpg">

Posted: Sun Jan 27, 2008 9:44 pm
by pizlo
I cant give you any help, but to say buy a new board, but round of aplause for getting this far.Image
And please don't take the part about you being a dork seriosly I really think tat thing is awesome.

Image

Posted: Mon Jan 28, 2008 5:52 am
by TurboSuper
Uhrr...I guess the logical first step would be to test your pulse generator. If you socketed the IC you can always put it back in the protoboard anyways to test it.

Posted: Mon Jan 28, 2008 12:18 pm
by singularity
i did and thats whats strange it works perfectly but as soon as i put it on the final board it like kills itself again (i bought the final board from the same company as the proto board)

Posted: Mon Jan 28, 2008 12:32 pm
by jimmy101
Singularity: Man that looks nice.

I don't know jack about that particular single chip computer ... course that won't stop me from posting :D

My best guesses would be;
1. A problem with one of the sensors or switches. Too much switch bounce?
2. Not enough power in the power supply. When the high current devices (solenoid and/or fan) are turned on the voltage to the board is pulled down too much. The low voltage messes with the pic or the boards oscillator.
3. Voltage/current kick-back when the inductive loads are switched. Do you have snubber diodes on the solenoid coils?

Posted: Mon Jan 28, 2008 4:14 pm
by singularity
holy crap i forgot the diodes

Posted: Mon Jan 28, 2008 6:55 pm
by singularity
nope that didn't fix it but i did release that if the stungun sequences is removed it works fine, im thinking the HV generator is screwing with the chip (EM pulse?)

Posted: Mon Jan 28, 2008 9:37 pm
by TurboSuper
Time to break out the aluminum foil methinks...

Posted: Mon Jan 28, 2008 9:51 pm
by dewey-1
--

Posted: Mon Jan 28, 2008 11:09 pm
by singularity
dewey-1 - the picaxe chip, the driver chip, and the stun gun are completely electronically isolated. i had an incident using a common ground before and i know better than to ever make that mistake again because cost me about $80 (okay so maybe i made the same mistake about 3 times before i realized it, but either way not doing that again)

turbosuper - yea that was what i was thinking so i put some aluminum flashing on the case and it appears to work as an effective em shield without even being grounded. wish i would have though of foil would have made it a bit easier

problem resolved, project box covered in aluminum flashing effectively shields the micro controller from electrical interference

Posted: Tue Jan 29, 2008 12:48 pm
by jimmy101
Singularity

Besides the farraday cage, you might also be able to quench the stunguns radio signal with a good size cap on the pic's power supply. Something like 100uF at 50V or so. A big-ol cap would also help to quench any kickback from the solenoids or other inductive loads.

In general, any digital circuit should have a big-ass cap across the power supply, even if it is powered by batteries.

The photocap from a disposable camera works well.

On my technical gun I've got a 470uF cap on the power supply and I don't get any unwanted signals in the audio recording when the stungun is fired. The cap absorbs so much power that it will keep the chamber fan running for several seconds after the power supply is unplugged from the wall.

EDIT: One more thing, do you have ALL the pins on the pic tied to something, either the power supply (through say a 1K resistor) or to ground? Digital circuits don't like floating pins. CMOS circuits in particular are so sensitive that opening a door 10 feet away can cause a transistion on a floating CMOS pin.

Posted: Tue Jan 29, 2008 1:06 pm
by paaiyan
I love the idea of this cannon, that's pretty awesome. Maybe I need to learn more about this stuff. Looking forward to seeing how it performs.

On a completely unrelated note...

Image

Posted: Tue Jan 29, 2008 1:38 pm
by dewey-1
--