AXE033/133 and 433MHz RF receivers

#1
I was thinking that the convenient form factor of the AXE132 used with the AXE033/133 LCD/OLED displays would be perfect for a small wireless weather station receiver. By using the display in parallel mode and connecting an RF receiver (e.g. the Dorji DRA886) to the spare ports C.0, C.1 (or C.2), you would have a quick, cheap and easy receiver/screen.

I know that Marks, in this thread connected the speed and direction sensors to the spare ports to make an all-in-one unit. It would work better for me to have the windspeed, direction and outdoor temperature sensors outside and have the display unit indoors.

I've not used those displays in parallel mode before and my brain hurts a bit when I try and think how to integrate serial comms into the mix. I'm happy just to use serout/serin as I have an 08M2 on the transmitter unit and it works fine with a bit of home-made error checking.

Before I re-invent the wheel, has anybody done this?
 
#3
Thanks for the links eggdweather but neither of those is what I had in mind. My receiver station would be a lot simpler (at first anyway) - just an RF receiver connected to the 18M2 on the AXE132 and an AXE033 LCD driven in 8 bit parallel mode. With a compact power supply it would all fit in a box hardly any larger than the screen itself. I was just wondering whether anybody else had done it. It could be used as a wireless receiver screen for any application, not just weather stations.
 
#4
OK, so I bit the bullet and gave it a try, with a bit of coding help from Nick12ab's tutorial on 8 bit parallel mode.

I soldered a Dorji RF 434 MHz RF module to a bit of stripboard and then soldered the stripboard to the "spare" pins on the AXE132 board. I also added a red LED, which can be used as some form of indicator. At my son's insistence, this warns when windspeed is greater than 10mph! The transmitter is connected to a Picaxe running windspeed/direction and temp sensors.

The results were a bit disappointing, compared with the same components connected loosely on a breadboard. The combined display/receiver is much more picky about which location you put in it, and in which direction you point it. That suggests that the antenna isn't great (as you can see it's just a quarter wave-length of wire).

axe033RFa.JPG axe033RFb.JPG

Before I stick it all in a box, I might try moving the Dorji module so it sits in a more open position, to see if reception improves.

Here's the code in case anybody's interested.

Transmitter

Code:
'wiring speed=yellow (C.3) & red(5v), dirn=grn (5v) & black(C.0)
#picaxe08m2
symbol TEMP=C.4
symbol TXPIN=C.2
symbol SPEED=C.3 ' = yellow wire
symbol DIRECTION=C.1 ' = green wire
' red wire = 4.5V, black wire = 0v

main:

'Measure direction
readadc DIRECTION,b0 'read voltage from wind direction sensor into b0

'Measure wind speed
count SPEED,1000,b1
let b1=b1*3/2

' Measure temp
readtemp TEMP,b2	; read value into b2

'Transmit data 

serout TXPIN,n600,(85,85,85,85)
pause 5
serout TXPIN,n600,("ABC",b0,b1,b2,b0,b1,b2,b0,b1,b2) 'send pre-amble then qualifier then data (dir,speed,temp - thrice)

goto main
Receiver

Code:
#picaxe18m2
symbol lcddata = pinsB
symbol sign=b20 'to display +ve or -ve temperatures
symbol CS=C.0 ' CS on RF module (low to enable)
symbol SIGNAL=C.1 ' Data in on RF module
symbol REDLED=C.2 ' To be used as some sort of indicator - in this case, windspeed>10mph

'Can't use serial out=C.3
'Can't use serial in = C.4
'symbol sparepin=C.5 (on H2) - could be used if needed (e.g. indoor temp/atmospheric pressure?)
symbol enable = C.6
symbol rs = C.7


init:
	dirsB = 255								'Set pinsB as outputs
	low rs								'instruction mode
	output enable							'set enable pin as output
	
	lcddata = %00111011 : pulsout enable,16			'Function Set: 8-bit, 2 lines, font 11
	lcddata = %00000001 : pulsout enable,608			'Clear display
	lcddata = %00001100 : pulsout enable,608			'Display on/off control: Display on, cursor off, blink off
	lcddata = %00000110 : pulsout enable,16			'Entry mode set: Increment, cursor shift
	
'set up line 1
	low rs
	lcddata = 128 : pulsout enable,1
	high rs
	for b9 = 0 to 15
		lookup b9,("Windspeed    mph"),lcddata
		pulsout enable,1
	next
'set up line 2	
	low rs
	lcddata = 192 : pulsout enable,1
	high rs
	for b10 = 0 to 11
		lookup b10,("Dir     Temp"),lcddata
		pulsout enable,1
	next


'Get receiver ready
low CS 'CS connected to port C.0

main:

'Read in data from wireless link (3 times for error checking - loop back if errors)
serin SIGNAL,N600,("ABC"),b0,b1,b2,b3,b4,b5,b6,b7,b8 'direction = b0, speed = b1, temp = b2
if b0<>b3 or b0<>b6 or b1<>b4 or b1<> b7 or b2<>b5 or b2<>b8 then goto main

if b1>99 then goto main '(100mph+ exceeds spec. of anemometer)

'Now display variables received from wireless link
'First display wind direction on line 2 of OLED/LCD
low REDLED
low rs
lcddata = 196 : pulsout enable,1 'Start writing from line 2, position 5
high rs
' b0 values taken by testing (not bothering with NNE etc.)

if b0=58 or b0=59 then 'on the cusp of two values with the resistor chosen (10k)
		for b11 = 0 to 2
		lookup b11,("N  "),lcddata
		pulsout enable,1
		next
	elseif b0=139 or b0=140 then 'on the cusp of two values with the resistor chosen (10k)
		for b11 = 0 to 2
		lookup b11,("NE "),lcddata
		pulsout enable,1
		next
	elseif b0=232 then
		for b11 = 0 to 2
		lookup b11,("E  "),lcddata
		pulsout enable,1
		next
	elseif b0=209 then
		for b11 = 0 to 2
		lookup b11,("SE "),lcddata
		pulsout enable,1
		next
	elseif b0=183 then
		for b11 = 0 to 2
		lookup b11,("S  "),lcddata
		pulsout enable,1
		next
	elseif b0=97 then
		for b11 = 0 to 2
		lookup b11,("SW "),lcddata
		pulsout enable,1
		next
	elseif b0=19 then
		for b11 = 0 to 2
		lookup b11,("W  "),lcddata
		pulsout enable,1
		next
	elseif b0=33 or b0=34 then
		for b11 = 0 to 2
		lookup b11,("NW "),lcddata
		pulsout enable,1
		next
endif



'Display wind speed

low rs
lcddata = 138 : pulsout enable,1 'Move back to line 1
high rs
bintoascii b1,b12,b13,b14
for b15 = 0 to 1
	lookup b15,(b13,b14),lcddata 'don't bother with first digit as not within spec. (value discarded above)
	pulsout enable,1
	next


if b1<10 then 'blank out second digit
	low rs
	lcddata = 138 : pulsout enable,1 'Move back to line 1
	high rs
	lookup b12,(" "),lcddata
	pulsout enable,1
endif

' flash red LED if windspeed>10mph
if b1> 10 then 
	high REDLED
endif


'Display temperature
low rs
lcddata = 204 : pulsout enable,1
high rs

sign = " "       
if b2 > 127 then  ; test for negative
	sign="-"
	let b2 = b2 - 128
	bintoascii b2,b16,b17,b18
		for b19 = 0 to 3
		lookup b19,(sign,b17,b18,"C"),lcddata
		pulsout enable,1
		next
	else ;positive temp
	bintoascii b2,b16,b17,b18

if b2<10 then 'drop leading zero
	for b19 = 0 to 2
	lookup b19,(sign,b18,"C"),lcddata
	pulsout enable,1
	next
else
for b19 = 0 to 3
	lookup b19,(sign,b17,b18,"C"),lcddata
	pulsout enable,1
	next
endif
endif

goto main
 
Top