Jump to content
bigbassmann

Picaxe 14m Slave Controller

Recommended Posts

Here is what is needed to put together a picaxe 14M slave control board. Once again, I am not trying to take any credit for this just passing along what I have learned and it is working great so far. I did use a 100K resistor for R5 but with testing on the breadboard, it may be possible to use a 33K instead. I think the most critical factor may be if it is used as an internal or external slave. If used as an external, you may want to go higher for more sensitivity.

 

The original drawing was posted by Ron (bowgod02) but I did make the changes for the PT input location, so that is correct now.

 

14M_slaveflash_control.jpg

 

 

This is the code I am using and as before, I made a couple of changes to Ron's original posting. I changed the TO counter and one other thing in order to get the cap to charge at the right time.

 

************ Slave control and trigger using picaxe 14M chip ******************

 

'Last change on 01-31-2011

 

' Input from PT on input 0

' Input from CDS om input ADC4

' Output to led on output 1

' Output to trigger slave on output 4

' Output power to PT on output 0

' Output power to slave flash mosfet on output 2

' Output to CDS on output 3

 

 

Symbol Flash_Flag = b11 ' Flag to count the # of flashes seen

Symbol Fire_Flag = b12 ' Flag to fire the slave flash

Symbol TO_Counter = W1 ' Timeout counter

Symbol Slave_Refresh = W2 ' Slave refresh timer

Symbol Flash_On = 2 ' Flash Charge Mosfet

Symbol CDS_OUT = 3 ' Power to CDS

Symbol PT = 0 ' Power to PT

Symbol Night_Flag = b13

Symbol CDS_Value = b10

Symbol Day = b9

Symbol Night = b8

 

Night = 128; lux level 7 = 100k(R16) 2v @ 4v 2 X 256 / 4 = 128

Day = 117

 

 

setint %00000001,%00000001 'activate interrupt when pin0 only goes high

 

disablebod

 

High 1

pause 500

low 1

pause 500

High 1

pause 500

low 1

pause 2000

 

GoSub CdsChk

IF Night_Flag = 1 Then GoSub Slave_Charge

 

 

Main:

' Main loop monitoring flags to determine what function to run based on flags set

 

 

If Slave_Refresh = 40 And Night_Flag = 1 Then

GoSub Slave_Charge

 

EndIf

 

If Flash_Flag <> 0 Then inc TO_Counter EndIF ' Start counter if first flash detected

If TO_Counter = 35 then Gosub TimeOut ' Timeout here if no other flash detected. Adjust value if necessary to fit camera.

If Fire_Flag = 1 then ' Fire the flash if flag is set. Disable interrupts.

Setint off

Gosub Fire_Flash

EndIF

 

GoSub CdsChk

If Night_Flag = 1 Then

Inc Slave_Refresh

let pins = %00000001

EndIf

 

'If Night_Flag = 0 Then

'let pins = %00000000

'sleep 130

'Endif

 

 

 

Goto Main

 

 

 

 

 

 

 

 

'============================

'SUBS

'============================

 

Interrupt: 'Try and get out of the interrupt sub as quick as possible. Mainly just set flags and exit. Pauses or loops will cause timing issues.

If Flash_Flag <=2 then inc Flash_flag EndIf

Do while pin0 = 1 'Loop around until the pin goes low. This is necessary in order to detect the second flash. For some reason the pin does not go low right away.

Loop

If Flash_Flag = 2 Then 'Set fire flag once second flash is detected.

Fire_flag = 1

EndIF

setint %00000001,%00000001 'Turn interrupts back on.

Return

 

 

Fire_Flash:

High Flash_On ' Turn on slave flash mosfet

High 4 ' Trigger slave

pause 500

Low 4

Low Flash_On ' Turn off slave flash mosfet

Flash_flag = 0 ' Reset flags

Fire_Flag = 0

TO_Counter = 0

Slave_Refresh = 0 ' Restart our 10min period

Gosub Slave_Charge ' Slave fired so we need to recharge

setint %00000001,%00000001 ‘ Turn Interrupt back on

Return

 

 

TimeOut:

Flash_Flag = 0 ' Reset flags

TO_Counter = 0

Gosub Flash_Led ' Flash Led to indicate time out.

Return

 

Flash_Led:

For b0 = 1 To 50

Toggle 1

pause 20

Next

Return

 

 

Slave_Charge:

High Flash_On

Pause 6000 ' charge for 10sec

Low Flash_On

Slave_Refresh = 0 ' restart our 10min period

Return

 

CdsChk:

High CDS_Out 'Turn on pin to supply voltage to cds voltage divider

readadc 4 , CDS_Value ' Read light value

 

 

'IF Night_Flag IS SET THEN WE CHECK TO SEE IF THE LIGHT LEVEL IS > = 117 IF ADC GREATER OR = THEN STILL DARK AND EXIT

'IF ITS BELOW 117 THEN WE CLEAR NITEFLG AND RETURN

'IF Night_Flag = 0 THEN CHECK TO SEE IF ADC ABOVE 128 THEN WE SET NITEFLG AND RETURN

Low CDS_Out 'Turn off voltage divider

If Night_Flag = 1 And CDS_Value >= Day Then

GoTo CdsChk_Exit 'already set and Still dark so we exit

Else

Night_Flag = 0 ' already set and Daylight so clear flag

EndIf

If Night_Flag = 0 And CDS_Value <= Night Then

Night_Flag = 1 ' Its dark so set flag

 

Else

Night_Flag = 0 ' Daylight so clear flag

EndIf

 

CdsChk_Exit:

 

Return

 

 

 

 

The parts are pretty simple. Resistors, couple of diodes, Mosfet, SCR, CDS, opto isolator, PT and of course some 14M chips.

 

Mouser parts are:

SCR----part # 863-MCR22-6RLRAG

PT------part# 638-PT908-7C

Mosfet----part # 512-RFD14N05L

 

 

The CDS I used came from Radio Shack as a package with different sizes.

 

The opto isolator I got off of Ebay. http://cgi.ebay.com/ws/eBayISAPI.dll?ViewI...e=STRK:MEWAX:IT

 

That's pretty much it except for an ON/OFF switch, I used a push button type from Tayda Electronics. I guess if you wanted to you could add some of the little terminal blocks for connections from Viv board to slave board and for battery connections but I didn't because it would require a larger board and I wanted to keep it close to the original slavemaster by Dave at Bigfoot. The way mine is set up it's just like connecting the slavemaster to your Vivitar board.

 

Hope this helps some more guys make their own slave control boards. One other piece of advice that I was given and I will pass it along; use your breadboard to lay this out before you solder anything. That way you can hook it up to a slave and test it out to see if it is working the way you want it to or troubleshoot any problems you may have.

 

Good luck and happy building.

 

 

Edited by bigbassmann

Share this post


Link to post
Share on other sites
 

Thanks for taking the time to but that information together and posting it bigbassman. Nice to see guys passing on what they learn. Sounds like it is working pretty well too. Also thanks to bowgod02 and all the others who started the project and hung in there until they got it working. Building something from scratch seeing it work is a lot of fun!

Share this post


Link to post
Share on other sites
 
 
 

Thanks for the info Ralph. Way to stick with it. And to Bowgod for all his work getting it started.

Share this post


Link to post
Share on other sites
 

One question to Bassman or Bowgod. Do you still use the .47 resistor like with the slavemaster?

Share this post


Link to post
Share on other sites
 

Awesome job to everyone involved on this project! I have been messing with this but I couldn't get it to run right. My slave would constantly charge at night. The only way I could prevent that was by just picking 200 as my Night/ day value and saying < or > than that for my night flag. I ended up hitting the flash contact to something and fired some components. So, I have to start from scratch again. So, thanks for posting all this information. It will help a ton!!

Share this post


Link to post
Share on other sites
 
One question to Bassman or Bowgod. Do you still use the .47 resistor like with the slavemaster?

 

 

Yes, you will still want to use that resistor.

Share this post


Link to post
Share on other sites
 

Question what is C1 I am thinking it is the round cermic disk but am not sure. Any Ralph do you have a pic of your slave controller?

Share this post


Link to post
Share on other sites
 
Question what is C1 I am thinking it is the round cermic disk but am not sure. Any Ralph do you have a pic of your slave controller?

Yes sir, thats what it is.

Share this post


Link to post
Share on other sites
 
 

Why can't we get some of these boards made up like Scott did with the AIO for everyone to use??? Whos permission do we need??? If someone will get the GERBER DOCUMENTS I will take on the project of getting the boards done. I just do not know how to plot out the Gerber Documents. That is what the board builders require to build them. They will not do it off a schematic alone.

Edited by Firemanjim

Share this post


Link to post
Share on other sites
 

Finally re-found this thread...

Ive had this info for years and finally started messing with it. Hacked a viv 2000 (see other new thread) and started to finish a build thats been sitting for a long time.

Anyhow, I used the original image/schematic (I assume its the one you can no longer see at the top) and hand built the board, tested the circuit and all is working. I downloaded the above code (well, it was on my pc from 5 yrs ago...lol) and I have come up with a small problem (hopefully...:wink:)...

The circuit seems to work but the code is not doing something correctly (I think) and it has something to do with the section below, also the highlighted in red parts. When I powered up it seemed to do what the code says to do, It flashes the on-board led a couple times and if the cds is covered and the cdschk does its thing, the on-board led will flash on/off twice every couple seconds (nite???). 

last night I fired everything up to test and it did not seem to charge the slave so I left it on overnight, came out this am and the slave was charged but wont fire. I did some checking, reading and looking around and had found I missed the 1R resistor between batt+ and Slave+ so added it. I covered the cds and the slave charged when it was supposed to but it still wont fire with the camera.

The cam is a sony w50 and based on what I am reading and seeing in the code it should work with how the code is.  I ran a syntax on the code and I get a syntax error @ line 67 "let pins=%00000001" with the error saying "symbol pins" not defined. Now I have ran across this before years ago with some old cam code but cannot remember the cause/issue or fix. The syntax error shows at both positions shown below. I have tried to change it to "pin" or the pin leg and even flash_on flag of b13 and still, it is not working correctly.

Ive double and triple checked the wiring, the slave and the slave board, all is correct and working, in fact the code seems to be working other than firing the slave with the camera. So, I have to assume it has to be something in this section of code that is not letting it set the flag or the interrupt.

As mentioned, the cds is working, the on board led seems to be doing what it is supposed to based on what I see in the code and the moc3023 seems to be fine as well because I can unplug my pt and jump it and the charged flash will fire. I am not up enough on this particular code to dissect it enough to know whats going on or not going on. I dont know how to check the pt other than probing it, or swapping polarity. it (they) is new (bought a bunch when I gathered this stuff 5 yrs ago).

So, Ralph (or anyone else with experience with this circuit/code) do you have any ideas of where to look or what the issue may be? Like I said, I can remove power and connect the slave directly and it is firing perfect, I can reconnect and flip the switch on the the little slave board and it seems to go thru the code, charges the slave etc and it can be manually jumped to make it fire but when the camera is fired the slave just sits idle charged and ready to go.

Any help would be awesome..

Thanks,

Geo

******************************

GoSub CdsChk

If Night_Flag = 1 Then

Inc Slave_Refresh

let pins = %00000001

EndIf

 

If Night_Flag = 0 Then

let pins = %00000000

sleep 130

Endif

************************

14M_slaveflash_control.jpg

Edited by bulltalk.65

Share this post


Link to post
Share on other sites
 

I haven't messed with the Picaxe slave controller in a long, long time. I did run Syntax on the code tonight and it all checks out so not sure why you are getting the errors.

Share this post


Link to post
Share on other sites
 
2 hours ago, bigbassmann said:

I haven't messed with the Picaxe slave controller in a long, long time. I did run Syntax on the code tonight and it all checks out so not sure why you are getting the errors.

Yea, after reading your reply it hit me, I figured out why it didn't work for me. I had the editor set for the 14m2. After doing some reading, the 14m code is "supposed" to work with the m2 but it sure won't syntax with the editor set to m2.. I just reset it for the 14m and it syntaxes fine. Unfortunately the 14m isn't available anymore and all I have are the m2 versions.

Share this post


Link to post
Share on other sites
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×