cheaper large instrument displays - mast mount

Angus.

How do I control the LED brightness. I have tried powering up the LEDs with 5v which works but no control.

All the best

Tom

You need a MOSFET transistor. At the moment you have the anode of the backlight going to 5V. Instead it needs to go through the MOSFET, the gate of the MOSFET connected to pin B0 on the Discovery board. I have not chosen a suitable transistor yet, just used one I had in my bits box, which although does the job, is over-sized for this application.

I'm not an expert on this, but RS part 719-2281 looks like it will do the job and will fit in a breadboard. The display datasheet says that the backlight takes a maximum of 440 mA. I'll post the connections needed later.
 
Ok...I am very confused...

Been doing some testing..

If I have the ttl output for the max 233 (pin3) connected to pa3 on the disco board then the voltage sits at 0v when a data stream comes through...however if I unplug from pa3 then I can see a voltage change on the max233 pin3 when data is transmitted...
 
RS-232 5 MAX233CPP 6 STM32 GND
RS-232 3 MAX233CPP 4
MAX233CPP 3 STM32 PA3
MAX233CPP 7 STM32 5V
MAX233CPP 6 connected to MAX233CPP 9

Hope this makes sense
 
Last edited:
You can check your MAX233 like this...

Get a serial terminal if you are using Windows > XP, i.e. PuTTY, or use HyperTerm in XP.

Start it up with your serial port opened (hardware flow control off).

Type. See anything? No? Good. That means local echo is off which is what you want.

On the MAX233 connect pin 3 to pin 2.

Connect pin 5 back to the RS232 connector - the other pin out of 2 or 3 that you are not using already.

Now type in the terminal window. See what you type? Yes - MAX233 is working. No - MAX233 not working or your connections are wrong.
 
You need a MOSFET transistor. At the moment you have the anode of the backlight going to 5V. Instead it needs to go through the MOSFET, the gate of the MOSFET connected to pin B0 on the Discovery board. I have not chosen a suitable transistor yet, just used one I had in my bits box, which although does the job, is over-sized for this application.

I'm not an expert on this, but RS part 719-2281 looks like it will do the job and will fit in a breadboard. The display datasheet says that the backlight takes a maximum of 440 mA. I'll post the connections needed later.

Hi Angus

I can't find that part number, can you help with a description.
 
Thanks Angus..yep I have the loop back working...

It appears that everything is working until I connect between pin 3 (max233 ttl output) and pa3

Before i connect this then I have a voltage change on max233 pin 3 which follows data transmission, changes between 4.6v and a lower voltage (my metre can't keep up)

Prior to connection pa3 is sat at 0v

When pa3 is connected it seems to pull max233 pin 3 down to 0v

It looks like the max 233 is doing what it should be, it reduces the voltage of the logic level..but it does then not seem to be able to raise the state of the pa3 :(
 
Thanks Angus..yep I have the loop back working...

It appears that everything is working until I connect between pin 3 (max233 ttl output) and pa3

Before i connect this then I have a voltage change on max233 pin 3 which follows data transmission, changes between 4.6v and a lower voltage (my metre can't keep up)

Prior to connection pa3 is sat at 0v

When pa3 is connected it seems to pull max233 pin 3 down to 0v

It looks like the max 233 is doing what it should be, it reduces the voltage of the logic level..but it does then not seem to be able to raise the state of the pa3 :(

Anything coming out of PA9, only after reset of the Discovery though. It's at 115.2kBaud so you may not see it with a voltmeter, but a serial terminal should show it.
 
I have just checked mine and the voltage level on PA3 is flipping around between about 2.5 and 3V. Is the software definitely running on the STM32 - can you move around the menus with the buttons? Do you have another Discovery board you can try?
 
Hi Angus...

I have connected pa9 to the max 233 ttl output, then to the rs232 then to hyperterminal set at 115200/8n/1 no flow control and nothing


For the data in I am using 4800/8/n/1 no flow control and no data..


It looks like I have buggered either the disco board or the max233..better order some more..

Only thing I can think is that I am now going direct to a com port (USB adapter) in place of a hacked null modem cable..

I have checked and rechecked the connections and no joy..I will draw a pic and post in a minute
 
639470E0-CBC1-4437-8046-670C9D9B102F-28529-000016BD1FBA70EE_zpsdde13596.jpg


Gnd and 5v are taken from the disco board and sent to the power rails on the breadboard
 
Anything look wrong with those? The software responds at all times and the buttons work as they should

They look fine, although I am not using a MAX233 so I can't confirm by actually trying - I'm using a MAX232. All I can think of is try swapping over pins 2 and 3 and try again. If you are using a cable it might be a null modem cable.

I'm not sure how important the 1uF cap is on the supply line. You could try adding that if you have one.
 
Thanks Angus..I had ditched the null modem cable and am going direct into the pc com port (USB serial adapter - tested by feeding back into another serial adapter and using hyperterminal )

I am running v 0.8 and just tried re-flashing...guess I had better place a rs order for some new bits
 
Thanks Angus..I had ditched the null modem cable and am going direct into the pc com port (USB serial adapter - tested by feeding back into another serial adapter and using hyperterminal )

I am running v 0.8 and just tried re-flashing...guess I had better place a rs order for some new bits

If you are getting a RS order you could get a MAX232 and its caps so that we are the same. And a 16F882 and a 18F26K22 for the remote. Remote definitely works on the 18F26K22. Hope to get it to work on the 16F882 soon. They are both only a few pounds anyway.
 
well..it turns out that i had faulty pin on the disco board, happy to say that it is all working. I have also added the mosfet to control the backlight and happy to say that it is all working

Please excuse the shaky video, hope you get the idea



 
Last edited:
Top