28x pulsin problems

elf1564

New Member
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
 

elf1564

New Member
After some more testing and searching through the forums for the upteen time I finally work though problems with my Vmusic module for a sound effects unit for a model I've been working on. As stated above, the setup worked very well with my JR brand radio. When I installed my new Futaba radio, the Picaxe 28x1 did not read the signals from the Futaba receiver. It seems the Futaba radio uses a smaller voltage of 3.3 volts or so. The Picaxe was setup to run off a 5 volt regulator. I lower the voltage to the Picaxe 28x1 to around 4 volts or so and now the Picaxe reads the signal very well. I'll assume that the JR radio receiver sends out a much stronger signal.

I'm not sure this is something that the 28x1 chip has issues with or not. I used a 14m pic with a 5v regulator for a smoke producing unit (varies the speed for a small computer fan motor) and the 14m pic did not seem to notice the difference in voltage.

Anyhow, I hope this posting can help others in the future when dealing with the same.
 

Wrenow

Senior Member
Kind of an obvious question, but sometimes....
JR and Futaba sometimes assign channels differently (JR sometimes move the throttle to something other than Ch 3, as I recall) - are you sure you are using the correct signal pin for input when you changed brands? In other words, if you plug a servo into the channel you are wanting to use, does it perform as expected.

Also, are you using US Ground Freq? 75MHz or 2.4GHz or 75Mhz? Number of channels needed? If US 75MHz, I may have something else to suggest.

Cheers,

Wreno
 

elf1564

New Member
Hi Wreno,

Thanks for your interest. Let me see if I can add some details about my issues. If nothing else so others later on may find something similar to what I'm doing a bit of help with their own projects.

Initially I used a Jr radio set up for US air 72 MHz band for testing my project. An old helo radio I had. Using the 72 MHz band radio here on the workbench deep in my basement shop I didn't worry much about causing problems with any of those possibly near by who may be flying RC aircraft. I built the circuit and tested it before committing to installation into a a large scale (1/6) tank model. The circuit worked fine on the bench and in the model with the JR radio.

I then purchased a new Fatuba radio set up for US ground 75 MHz for the 150 pound tank model as its kinda of hard to explain why it was I was using an air radio with a ground pounding tank model outside or anywhere else for that matter. I considered putting wings on the tank and just telling people I just needed to get it to proper take off speed.:) But common sense and the law prevailed. Both systems are FM. The Futaba is a 4 channel system and the JR is a 5 channel.

My compete setup involves a smoke generator unit using a 8m chip and its own 5 volt regulator. A sound generator using a Vmusic module tied to a 28x1
(with external 4MHz crystal) chip with at the time its own 5 volt regulator. Wired per instructions found here on the forum. Finally a ESC (Electronic Speed Control) circuit for controlling 2 24 volt wheelchair motors. The ESC was built by a friend of mine and seems to work reasonable well although it needs to 5.5 volts to operate correctly. The ESC gets its power from the power supplied to the receiver via connections to the receiver. It has its own power supply with a adjustable voltage regulator.

So in short each device has its own voltage regulator comprising of 3 separate voltage regulators in total with a common tied between all.

The signal wiring is using 2 y connectors strung together. The first main plug goes into the receiver, the first half of the Y section ties to the ESC unit, the second section of the Y goes to the second Y cord. The sound module and the smoke unit Y'ed off this connector. Eventually I will tie the main signal wire from the receiver to a 2 prong terminal strip and tie my connections from this point to cut down on the extra length of wire and multiply Y connection points.

I use the right side stick on the transmitter for forward and reverse control for the ESC on both radios. So no issues with the channels that I could tell. Although I don't use servos for this model I did plug in a servo to check to be sure that the Futaba receiver was indeed sending the proper signals out. Never had a moments problem with servo control.
The JR and Futaba uses the same wire connections for power, ground and signal wires, only a different color code on the wire itself.

My original problem was that I could not read any of the signals being generated from the Futaba receiver as I could with the JR receiver at the W4 and W5 locations using a debug command. The JR radio receiver gave out a rock steady reading of 150 when plugged in and the Tx stick in center position and the radio was transmitting. The Futaba receiver mostly just give a value of 0 or perhaps once in a great while it may pop up with a wildly swinging value as if it were a loose connection on the signal or ground wire leading to the picaxe.

The solution (or least I think, its a solution) came after I remebered seeing a posting here concerning a low voltage output from a Futaba receiver along the lines of 3.3 volts or so. There was also a tibit from someone here who suggested lowering the voltage to the picaxe due some sort of issue they were having. I decided to take a chance and just lower the voltage to the 28x1 pic circuit for the sound module. I simply, right or wrong, added 3 diodes in series for the 5 volt regulator to drop the voltage closer to 4 volts to the picaxe.

That seem to do the trick! The entire circuit with smoker, sound effects unit and ESC now operates as it should, at least at this point:)

I must confess to being really curious as it is the 8m picaxe with 5v seems work with the Futaba receiver but the 28x1 only sees the signal when its voltage to lower to 4 volts or so?

I've also wondered if the 14m chip will control the Vmusic module?
 
Last edited:

Technical

Technical Support
Staff member
The rule of thumb from the Microchip datasheets is that your signal must be 0.8 x Vsupply to guarantee a high signal ie 4V at 5V. However in practise it tends to work a bit lower as well.

However different PICs have different technologies (called TTL and ST) on different pins - you can see this from the Microchip datasheets pinout descriptions.

The 08M uses TTL technology on all but pin2, the 28X1 uses ST technology on all (portC) inputs. TTL will generally work with a lower voltage than the 0.8 rule, down to 2V or so.

So your 3.3V signal would probably work on all 08M pins apart from pin2, whilst not working at all on the 28X1 inputs!

Dropping your supply down to 4V gives a 3.2V (0.8x4) threshold, hence 3.3V triggers the pin. The 28X1 does actually use TTL on portA pins, so if connected to a portA input pin it might work at 5V!

All the 14M inputs are TTL, so should work the same as the 08M.

In general most people don't worry about the difference, and the 0.8 rule works for both types.
 

Mycroft2152

Senior Member
Which technologies does the 18X use?

This may be the reason I can use my old THINKPAD laptop with the standard download circuit to download to an 08M wthout any problems, but the 18x is unsuccessful.

Myc
 

hippy

Ex-Staff (retired)
The 18X ( 16F88 ) has its Serial In pin as ST ( schmitt trigger ), so that could explain it. It would also explain why some devices seem to program easier from laptop ( nominally 5V ) serial than others do, and why reducing the 22K or lowering PICAXE supply often helps.
 

Mycroft2152

Senior Member
Hippy, you must have read my mind. The family difference confrms it.

At least now there is a technical basis for some "laptop' downloading problems.

That also may be why the "other' microprocessors use a more robust downloading circuit, either a MAX 232 or a TTL inverter.

Myc
 
Top