Picaxe 18M2 micro controller and a RF R06A remote controller.

  • Thread starter Deleted member 1986
  • Start date
D

Deleted member 1986

Guest
A quick preamble, up until about a week ago my knowledge on this subject would have easily have fitted on the back of a postage stamp. A chance comment on the forum by Rik of http://riksrailway.blogspot.co.uk/2013/12/progress-report-50.html with regards to the work Greg had done with Picaxe Micro controllers at http://www.members.optusnet.com.au/satr/electronics.htm and along with the following topic on this forum, Topic: Info req'd on keyfob R/C, got me thinking.

A chance purchase of a tin of assorted electronic junk for an exchange of small coins (no flat stacking notes) a few Sundays ago at the Car Boot Sale, contained something similar to that was discussed in the topic.


A visit to my local Maplins and a very informative conversation with several members of their Sales Team, came away with a small bag of bits to start my adventure with micro controllers.

Then followed a period of academic studying of the Picaxe manuals, data sheets and schematics has resulted in the following project.

In simple layman’s terms, the keyfob transmits an encoded data stream which is received by the receiver and then decoded to operate the D0,D1,D2,D3 outputs to either on or off states.


The on/off states are then fed into the inputs of Picaxe 14M2, where I am still learning the basics of Picaxe Basic Programming to then produce a program that operates the outputs on the 14M2.

For the moment as this project is still in it's infancy Buttons C&D on the keyfob operate the turning on or off of a pair of led's

Buttons A & B operate the forward and reverse, from the 14M2 via a L293D motor controller IC using PWM to a Tamiya FA130 3 volt motor, fitted in a Tamiya 70103 gearbox, using the axle and wheels from LGB.

First version, manual control via potentiometer, 08M2 micro controller and an L293D motor controller IC. This was constructed to grasp the fundamentals of strip board construction and correct orientation and connections of the IC's.

Third version using Infra Red, experimentation with software ongoing.
Fourth version using the input from a RC receiver commenced.
Second version, work in progress, bread board set-up.......


A short video..............

http://s1157.photobucket.com/user/Eaglescott/media/G%20Scale%20Central/RemoteControl.mp4.html


Project does work much to my surprise!, just need to disconnect the wireless doorbell as it works on the same frequency, did check with my neighbour who has an automatic garage door opener, hers works at 315MHz, so can avoid this situation!
http://www.youtube.com/watch?v=Jm4ZE3q6S1Q
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Welcome to the wonderful world of Picaxe.
You're jumpimg in the deep end using the 14M2 - I have only ever used the 8 pin ones. (I find that more pins don't always help - the processor can really only do one thing at a time, so if you want to do say, sound AND button checking for motor control, you really need 2 chips. Just my observations)

Anyhow, have lots of fun thinking of what you can do with them and give me a shout if you need to discuss anything.
 

Dtsteam

G Scale, Travel, Steam Boats, Mechanical Music
24 Oct 2009
5,401
15
Preston
Best answers
0
Country flag
Can you say a bit more about the infra red experiment. I would dearly like to find a way of battery remote control where more than one person can control a train - ie multiple transmitters.
 
D

Deleted member 1986

Guest
Dtsteam said:
Can you say a bit more about the infra red experiment. I would dearly like to find a way of battery remote control where more than one person can control a train - ie multiple transmitters.

David,

Given that I've only just grasped the fundamentals, and from my own experimentation, using Infra Red is fairly simple, mainly due to that the Picaxe Micro Controllers understand the full set of SIRC (Sony Infra Red Codes).

In lay mans terms an IR receiver (about £1.00) is connected to the Picaxe, and using your bog standard TV remote, I used one bought from Poundland, to transmit IR signals. (If you have a digital camera you can see the IR transmissions)

All the buttons on the remote have a number code.

For example I used the following, the mute button is 20, 16 is chan + ,17 chan - , 18 vol + and 19 vol -.

The IR receiver is connected to C.3 on the Picaxe 08M2, the motor outputs are connected to C.1 and C.2.

do
irin C.3,infra
select case infra
case = 18 high C.1
case = 19 low C.1
case = 16 high C.2
case = 17 low C.2

case = 20 low C.2,C.1
endselect
loop

As stated I only started using Picaxe about a week ago, now I have finally got my head around how PWM is implemented progress will be a lot quicker, give me a few days to put together a note and a working example.

Hope this helps.

Kind regards

John
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Dtsteam said:
Can you say a bit more about the infra red experiment. I would dearly like to find a way of battery remote control where more than one person can control a train - ie multiple transmitters.
You can do this with the key fob controllers which I think Arthur Aardvark is using, with no extra 'smarts'. I have a setup where 2 controllers control my grandson's loco. If he looses interest and wanders off, or is about to crash I can also control it. You both cannot control the loco at exactly the same time - if both transmitters are transmitting, the loco is confused and doesn't react.

You just setup both Tx and the Rx to be the same 'channel' or whatever the programming pins are called - there are 8 pins you can connect to +, - or leave open.

I imagine infra red would be the same.
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Arthur Aardvark said:
David,

Given that I've only just grasped the fundamentals, and from my own experimentation, using Infra Red is fairly simple, mainly due to that the Picaxe Micro Controllers understand the full set of SIRC (Sony Infra Red Codes).

As stated I only started using Picaxe about a week ago, now I have finally got my head around how PWM is implemented progress will be a lot quicker, give me a few days to put together a note and a working example.

Hope this helps.

Kind regards

John

You're progressing amazingly quickly if you've learned about infra red already!
The PWM command is the best feature of the picaxe - just runs in the background. Output to a FET and you're in business for motor control.
 
D

Deleted member 1986

Guest
gregh said:
You're progressing amazingly quickly if you've learned about infra red already!
The PWM command is the best feature of the picaxe - just runs in the background. Output to a FET and you're in business for motor control.

Greg, progress has been steady, mainly because of "mind over matter" Forced into early retirement on the grounds of ill health. Wasted most of last year faffing about getting accustomed to the social and economic factors resulting from this. This year, no such luxury of wasting time about the how's why's etc, more positive approach to everything and learning how to use Picaxe would keep me busy.

It has been thoroughly absorbing, even mind boggling, the last time I did any studying was erm! about 1974..............
Have no practical electronics experience what so ever, was by trade a Horticulturist, to put my technical knowledge in nutshell, use a computer that has XP, and my mobile phone is an Alcatel, given away free with The Sun newspaper years ago!

PWM is the way to go, likewise some method of remote control, whether IR, RF, or RC, with or without a micro controller, hours of fun finding out.

The key fob approach may be a better approach for outside, not sure how effective Infra Red would be on a sunny day.

Back to manuals, more studying is called for....................
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Arthur Aardvark said:
Greg, progress has been steady, mainly because of "mind over matter" Forced into early retirement on the grounds of ill health. Wasted most of last year faffing about getting accustomed to the social and economic factors resulting from this. This year, no such luxury of wasting time about the how's why's etc, more positive approach to everything and learning how to use Picaxe would keep me busy.

It has been thoroughly absorbing, even mind boggling, the last time I did any studying was erm! about 1974..............
Have no practical electronics experience what so ever, was by trade a Horticulturist, to put my technical knowledge in nutshell, use a computer that has XP, and my mobile phone is an Alcatel, given away free with The Sun newspaper years ago!
Well you're doing a great job. I guess it also shows how easy Picaxe are to use and program.