Hello all,
I've been working with the Vmusic module lately for sound effects for my tank model. After a bit of fiddling for a few days I was able to finally get the system to work fairly well. ( I was having a problem with weird radio signals, turned out that the picaxe did not like the background receive portion, so I turn the bit to 0 and it ran fine. "hsersetup b9600_4,%00" ) I'm using a 28x for micro control. I used a JR transmitter and receiver to test and used the following program. Does very good, works.
; set picaxe type
#picaxe 28x1
setfreq m4
; set COM port used for download
;#com 4
; open terminal after download
; This is to view the 'sertxd' debugging comments
#terminal 4800
setup:
; setup serial hardware
; at 9600 with NO background receive
hsersetup b9600_4,%00
low 0 ; insure CTS is low
pause 10000
hserout 0,("vst",CR)
sertxd ("Motor crank",CR,LF)
hserout 0,("vpf 1.mp3",CR)
pause 8500
mainidle:
hserout 0,("vst",CR)
sertxd ("Motor idle",CR,LF)
hserout 0,("vrf 2.mp3",CR)
mainidle1:
pulsin 3,1,w5
if w5>=145 and w5<=160 then mainidle1
mainrev:
hserout 0,("vst",CR)
sertxd ("High speed",CR,LF)
hserout 0,("vrf 3.mp3",CR)
mainrev1:
pulsin 3,1,w4
if w4<145 or w4>160 then mainrev1
goto mainidle
As I said, works very well with a JR radio setup. Then I plugged in my new Futaba transmitter and receiver. Does not work! When I add a debug command to the program I don't see any change for W4 or W5. If I remove the Futaba and use the JR setup. The signal is seen and the W4 and W5 see the signal.
The ground is common between the receiver and the picaxe. The voltage to the receiver is 5.6 v from the factory supply battery pack and I have used a separate voltage supply at 5 volts for the picaxe circuit, again with common ground. I've even tied the picaxe circuit and the Futaba receiver with the 5.6 battery pack supplied with the radio. (Yes I know its a big no-no to push the picaxe above 5 volts. I've tried changing the input pins from 3 to 1, I've tried changing the pulse edge from 0 to 1 in the Pulsin command 3,(0 or 1), w5.
I've tried placing a 330ohm resistor in line with the signal wire as suggested by others. Heck I've even tried tying the 330 ohm resistor to low or low as a pulldown or pull up.
I've tried adding a pause command of 22 after the Pulsin command to slow it down.
The radio and receiver seem to operate servos
just fine. The transmitter batteries are fully charged as the receiver and picaxe supplies.
I'm completely baffled as to why my Futaba does not work but under the same setup my JR radio does. By the way I need to use the Futaba (brand new in fact) as its a ground freq. radio and my JR is an air freq.
One last thing, I've also built a smoker unit based on a 8m chip for the same model and the Futaba radio gave no problem with this.
Does the 28x just not like my Futaba radio? Any help would be most welcome!
Rusty Bates
I've been working with the Vmusic module lately for sound effects for my tank model. After a bit of fiddling for a few days I was able to finally get the system to work fairly well. ( I was having a problem with weird radio signals, turned out that the picaxe did not like the background receive portion, so I turn the bit to 0 and it ran fine. "hsersetup b9600_4,%00" ) I'm using a 28x for micro control. I used a JR transmitter and receiver to test and used the following program. Does very good, works.
; set picaxe type
#picaxe 28x1
setfreq m4
; set COM port used for download
;#com 4
; open terminal after download
; This is to view the 'sertxd' debugging comments
#terminal 4800
setup:
; setup serial hardware
; at 9600 with NO background receive
hsersetup b9600_4,%00
low 0 ; insure CTS is low
pause 10000
hserout 0,("vst",CR)
sertxd ("Motor crank",CR,LF)
hserout 0,("vpf 1.mp3",CR)
pause 8500
mainidle:
hserout 0,("vst",CR)
sertxd ("Motor idle",CR,LF)
hserout 0,("vrf 2.mp3",CR)
mainidle1:
pulsin 3,1,w5
if w5>=145 and w5<=160 then mainidle1
mainrev:
hserout 0,("vst",CR)
sertxd ("High speed",CR,LF)
hserout 0,("vrf 3.mp3",CR)
mainrev1:
pulsin 3,1,w4
if w4<145 or w4>160 then mainrev1
goto mainidle
As I said, works very well with a JR radio setup. Then I plugged in my new Futaba transmitter and receiver. Does not work! When I add a debug command to the program I don't see any change for W4 or W5. If I remove the Futaba and use the JR setup. The signal is seen and the W4 and W5 see the signal.
The ground is common between the receiver and the picaxe. The voltage to the receiver is 5.6 v from the factory supply battery pack and I have used a separate voltage supply at 5 volts for the picaxe circuit, again with common ground. I've even tied the picaxe circuit and the Futaba receiver with the 5.6 battery pack supplied with the radio. (Yes I know its a big no-no to push the picaxe above 5 volts. I've tried changing the input pins from 3 to 1, I've tried changing the pulse edge from 0 to 1 in the Pulsin command 3,(0 or 1), w5.
I've tried placing a 330ohm resistor in line with the signal wire as suggested by others. Heck I've even tried tying the 330 ohm resistor to low or low as a pulldown or pull up.
I've tried adding a pause command of 22 after the Pulsin command to slow it down.
The radio and receiver seem to operate servos
just fine. The transmitter batteries are fully charged as the receiver and picaxe supplies.
I'm completely baffled as to why my Futaba does not work but under the same setup my JR radio does. By the way I need to use the Futaba (brand new in fact) as its a ground freq. radio and my JR is an air freq.
One last thing, I've also built a smoker unit based on a 8m chip for the same model and the Futaba radio gave no problem with this.
Does the 28x just not like my Futaba radio? Any help would be most welcome!
Rusty Bates