Serial OLED (AXE133) issue

twits

New Member
Hi all

I am trying to build a thermostat with a remote sensor (connected wirelessly) and have come across a small issue that somebody may be able to enlighten me on.

The circuit thus far is :
Transmitter consists of an 08M connected to a DS18B20 temperature sensor, a 433MHz Radio Transmitter and AXE213 transmitter board (NKM2401 encoder/decoder chip).
Receiver consists of a 20M2 connected to the reciprocal receiver boards mentioned in the transmitter. The 20M2 also runs a serial OLED and various touch sensors for control functions.

I have bread boarded the circuits and am pleased to say that it works fine. I have set the transmitter on a loop of 5 seconds between transmissions.Transmitter and receiver are at least 3 meters apart.
Receiver circuit is connected using the 3 wire method.
I am able to transmit data from the sensor and display it on a serial 20x4 OLED (AXE134Y) wirelessly. The LED's on both transmitter and receiver flashes every 5 seconds.
I have been through all the set up tests in the paperwork and have achieved comms using all methods as described.


And this is now where the problem occurs.

As soon as I connect a serial 16x2 OLED (AXE133) in place of the 20x4 OLED, the receiver PICAXE circuit seems to go corrupt and stop receiving any signal.
The LED on the receiver flashes occasionally but the data both on the 16x2 OLED and the "debug" function in the Program Editor software is corrupt. If I then swap the serial cable (AXE027) over to the serial connector on the AXE213 receiver board, the data is also corrupt.
I swap back to the 20x4 and normal operation resumes. All data is good at all three points just mentioned.
If I connect the 16x2 OLED again, disconnect the RF receiver and reflash the 20M2 to do some text scrolling or display a local temperature reading everything works fine, until I reconnect the RF receiver.
If I replace the 20M2 with another 20M2 or 18M2, same thing happens.

I have been through everything, including reflashing/swapping the 18M2's on the OLED's. Power connections are all at the same point. Only thing I have not done yet is replaced the 16x2 OLED with another 16x2 OLED.

Any suggestions or am I just missing something obvious ?
 

g6ejd

Senior Member
Are you sure the 16x2 display has the same input connections, assuming both are serial displays?
 

geoff07

Senior Member
It usually is something obvious. Except at the time it isn't. Are the voltages correct when the 16x2 display is connected? Solder bridges, pins not soldered? Headers the wrong way round/offset? It sounds mechanical to me. Though I think you have not proven the 16x2 to be sound yet so maybe it is a duff unit.
 

westaust55

Moderator
Welcome to the PICAXE forum.

Have you tried placing the AXE033 LCD some distance from the Rx module and see if the problem ceases.
It could be electrical noise from the LCD module affecting the Rx so that the received data is garbage.
 

twits

New Member
Thanks for the responses so far everyone.

g6ejd - Yes the 16x2 and 20x4 are both OLED displays with serial inputs. The inputs are V+, 0V and IN. I have used RED, BLACK and GREEN respectively in a header connector so any reversal of connections would have to be intentional. I am therefore 99% confident I have not plugged it in incorrectly by accident.
 

twits

New Member
geoff07
I am hoping it is simply something I am over looking.
-The voltages are correct as in it is a regulated 5VDC. This does not fluctuate at all when connecting / disconnecting the 16x2 OLED or the 20x4 OLED. I have measured this on the bread board at the power input from my PSU (all power points connected at a single place), at the PICAXE power pins directly, at the header on the OLED (both 16x2 and 20x4) and finally on the RF receiver board.
-As for the headers, it is actually printed on the little serial interface PCB that piggy backs the display PCB. There is V+, 0V and IN to which I am using RED, BLACK and GREEN respectively. I am using a little header connector which makes it quite difficult (although not impossible) to reverse the IN and 0V. Worst case, if reversed this should not cause damage because the V+ remains in the center position with 0V going to the IN so effectively there is no DATA going into the OLED.
-Just to ensure there is not a printing mistake on the 16x2 OLED serial board I also checked on the product manual for it. It does not state the exact pins on the 18M2 that the header V+, 0V and IN should be connecting to. So looking at Manual 1, 0V goes to pin5, V+ goes to pin14. Looking at the 16x2 OLED firmware (available for download from http://www.techsupplies.co.uk/PICAXE) the IN goes to pin4 (C.5). These all connect as stated with no shortages to any other pin or between each other. I then compared this to the 20x4 OLED with identical results.
-I am starting to wonder if the 16x2 display is duff!
 

twits

New Member
westaus55

Thanks for the welcome. I have watched the forum with interest over the past several years now but must admit this is the first time that I have had to post something.

Just to clarify, the issue is with a serial 16x2 OLED display (AXE133Y) and not the serial 16x2 LCD (AXE033).

- I had placed the OLED and the Rx module about 50cm apart originally. Problem persists
- I increased this to about 2,5m. Problem persists.

This got me thinking that it may be that the receiver PICAXE circuit may not be able to handle the code quickly enough (mentioned somewhere in the manual for the kit).
So I increased the intervals between transmissions to 10 seconds apart. Problem still persists. Only with the 16x2 and not the 20x4.

I am thinking more and more that it has to be the unit.
 
Last edited:

russbow

Senior Member
It is not clear if you are using the Rev Ed OLED driver board or not. If you are, has each display got it's own board.

Try this simple bit of code in your 18m2 chip, connecting the OLED input to pin c.1

Code:
#picaxe18m2
symbol OLED=c.1
serout OLED,n2400,(254,1)
pause 100

do

for b0=32 to 128

	serout OLED,n2400,(254,128,"b0= ",#b0)
	serout OLED,n2400,(254,192,"Char ",b0)
	pause 2000
	
next b0
	
loop
It should show all the character on line 2. Note that it is at 2400 baud and N polarity.

Posting your own code would be helpful.
 

hippy

Technical Support
Staff member
It seems you have two quite similar setups -

AXE213 (NKM2401) ----> 20M2 ---> AXE134Y (20x4 OLED)

AXE213 (NKM2401) ----> 20M2 ---> AXE133Y (16x2 OLED)

The first works, the second does not.

There is no obvious reason that one should work while the other does not. It seems unlikely to be a power supply issue as the 16x2 would unlikely draw more current than the 20x4. The 16x2 would not seem to be faulty if you can communicate with it from the 20M2. The AXE133Y and AXE134Y control boards are the same and it is only the OLED displays themselves that differ.

The odd thing is that the AXE133Y interferes with the AXE213 reception. I don't know why that would happen ( and not with the AXE134Y ) but you could try insulating the AXE133Y and placing it in a metal box to shield the receiver from any interference there may be. If it works in the box but not out that could point to an interference issue.

One thing to consider is that any interference ( or whatever is happening ) may not actually be affecting the receiver, but affecting the transmitter.

It might be worth adding decoupling capacitors on the power rails though the AXE216, AXE133Y and AXE134Y include them. If running from a wallwart or regulated supply it might be worth trying with 3xAA batteries to see if that improves things.

You could split the receiving system into two parts; AXE213 to the 20M2, use a separate PICAXE just driving the AXE132Y or AXE134Y to see how it all behaves under those circumstances.
 

twits

New Member
russbow

- Both the serial 16x2 OLED display (AXE133Y) and the serial 20x4 OLED display (AXE134Y) were purchased from http://www.techsupplies.co.uk in the past month or two.
- Each display has a small serial interface pcb mounted underneath.
- Each serial interface has an 18M2 picaxe chip mounted on it.
- Each 18M2 then has firmware relevant to the displayflashed onto it. This firmware is downloaded from www.picaxe.com and is relevant to the display being a 16x2 OLED or 20x4 OLED.

Just to clarify, I have built a Picaxe circuit with an 18M2 and connected the IN for the 16x2 OLED to pin C.1 There is nothing else connected to the circuit.
I have programmed the 18M2 in the Picaxe circuit with your code from above. The 18M2 mounted on the OLED has the original 16x2 firmware flashed on it.

The results are as predicted. The 16x2 display shows on line 1 the variable b0 incrementing. Line 2 shows the word " Char " followed by different characters continuously altering about every 2 seconds.

As stated previously, when the 16x2 OLED is operated alone it appears to be fine. Only when I connect it to a Picaxe receiver circuit that has a RF receiver module attached does this problem occur. If I then disconnect the 16x2 OLED from the power and the circuit resumes normal operation. If I then attach the 20x4 OLED, the whole setup runs as if nothing ever happened.

As for posting my code, I haven't figured out how to paste the code yet. As soon as I have I will do so.
 

russbow

Senior Member
Thanks for that. At least it takes a faulty display out of the equation. I would now do as Hippy suggests above and run 3xAA cells and see if the problem persists.
 

twits

New Member
hippy

-Correct. The setup remains constant, only the display is changing. In this configuration the 20x4 OLED works whereas the 16x2 OLED does not work.
-Correct. The 20M2 can communicate with the 16x2 OLED provided the AXE213 (NKM2401) is disconnected. If reconected, the communication can be best described as corruption rather than data. Frequency of communication also slows down drastically.
-I will locate a metal box and post my results ASAP. There was a suggestion from westaust55 earlier to place some distance between the AXE213(NKM2401) and the Picaxe receiver circuit. Originally I had this at about 50cm's but then increased to 2,5m.Fault persisted.
-Transmitter is located about 2m apart from receiver. I have varied this from 1m to about 3m. Fault persists. Nearest electrical device is a PC, about 1m from transmitter. I will increase this distance and post results. To eliminate this as a potential cause however, when the problem was occurring, the transmitter remained stationary.
(1) Surely the "noise" would have occurred on both displays then?
(2)But then to contradict myself now, I have had several instances where the 20x4 OLED display has displayed a corrupt screen and not my test message that I was expecting. Powering down /up resolved this on each instance. Admittedly, I thought this may have been from transmission interval frequency being too small and therfore increased the interval to 10 seconds. I haven't had the corrupt 20x4 OLED display since. Problem with 16x2 OLED persists with the increased interval though.
(3)Could it indeed be interference that is causing this? With the 16x2 being more susceptible for some reason ?
(4)Could it have anything to do with the transmitter Picaxe circuit using an 08M variant ?
-I will add some decoupling capacitors to the power rail and post results.
-I use a CPX200 PSU from Thurlby Thandar but will swap to 3xAA batteries to see if problem improves. I will post results.
-Please can you clarify the last point. Are you suggesting I have the following : AXE213 connected to a 20M2 with an output going to a 2nd Picaxe which has the OLED attached to it?
 

twits

New Member
hippy

- I have placed the transmitter circuit and receiver circuit in seperate metal boxes. This seems to have helped with any corruption on the 20x4 OLED but I do still get it occasionally.Problem with 16x2 OLED persists.

- I increased the distance between transmitter box and receiver box to about 6m apart with nearest electrical device to either box at least 3m away. Very occasional corruption on 20x4 OLED. Problem with 16x2 OLED persists. I have left the boards in the metal boxes at these distances for all further testing.

- I then swapped power to 3xAA batteries for receiver and a 12V battery regulated to 5v (using circuit from pg26 of manual 1) for transmitter.Transmitter works fine but receiver circuit voltage drops to about 4.3V. The 20x4 OLED boots up and then goes blank. 16x2 OLED boots up and then goes blank. No reception on RX board. Disconnect the OLED's and voltage increases to 4.5V again and the LED on the RX board starts flashing again. I connected the AXE27 programming cable to the 20M2 and using debug I can see the 20M2 is receiving my transmitted test message. There does not seem to be any corruption on the debug display.

- I then swapped power to 3xAA batteries for transmitter and a 12V battery regulated to 5v (using circuit from pg26 of manual 1) for receiver. Everything now works ok with very occasional corruption on 20x4 OLED. Problem with 16x2 OLED persists. I have left the setup like this for all further testing.

- Admittedly, I did not have decoupling capacitors across the 20M2. This is normally the last thing I add one the circuit is up and running. I have added a 100uF electrolytic and 100nF tantalum across the power pins of the 20M2 in the receiver circuit. The transmitter is using an AXE092 school experimenter board to drive the circuit. This already has a 100nF fitted. Please advise if this is sufficient with regards to decoupling ?

- Still awaiting clarification on the final point ?
 

hippy

Technical Support
Staff member
-Please can you clarify the last point. Are you suggesting I have the following : AXE213 connected to a 20M2 with an output going to a 2nd Picaxe which has the OLED attached to it?
No, two completely separate systems; AXE216 to PICAXE and nothing else, a separate PICAXE driving the OLED and nothing else.

That you say you have had corruption on the 20x4 display does put things in a different light; it may well be the problem afflicts both setups but the 16x2 just happens to be more sensitive to whatever that problem is.

What I would focus on is the 20x4 setup; try to determine what the difference is between it working and not working.
 

twits

New Member
hippy

OK. Understood

I have already done the two seperate setups.

- The AXE216 to PICAXE setup by itself using the debug facility on Programming Editor to view the received results show the setup as working. There is occasional corruption but operation is pretty stable and consistent.
- The PICAXE to 16x2 OLED just running as a display with no other functions works correctly.
- The PICAXE to 20x4 OLED just running as a display with no other functions work correctly.

I agree that it seems like it could be a sensitivity issue where the 16x2 OLED is more susceptible. Ideally I would like to purchase another 16x2 OLED and see if the problem persists on the new one as well. At least we could eliminate it being just a duff unit.

Like you say, in the mean time I will concentrate on the 20x4 OLED.

Thanks for all the suggestions everyone.
 

twits

New Member
Just a quick update.

After leaving the project for a month, I powered it up with a 16x2 OLED attached. This resulted in a new development.

The green LED on the tx board will not flash, including when the test button is pressed. The green LED on the rx board remains off.
I checked voltages - all good.
I swapped the NKM2401 chips from both tx and rx boards around.
The tx board LED now flashes when the test button is pressed.
As for the rx board, no flashing LED indicating reception of any signal. I connected AXE27 programming cable to run Programming Editor Terminal Mode - nothing...not even corruption.

Undeniably, the NKM2401 chip is faulty and I will request a replacement but could this be the cause of the 20x4 OLED display issues?
 
Top