Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Ro-Bot-X on May 03, 2009, 07:41:55 PM

Title: SoR comunity project: serial LCD
Post by: Ro-Bot-X on May 03, 2009, 07:41:55 PM
Hi guys, I will work on making a serial interface for a 2x16 LCD using a tiny2313 microcontroller. This microcontroller has both UART and USI (that can be configured as TWI), so both interfaces will be available, but the first firmware version will have only UART. After the I2C protocol is finalized, I'll add support for it in the firmware. As usual, both the schematics and code will be available so anyone could build one.

I want this serial LCD to work with regular printf() or serial.print() functions, just as you would print out to the debug screen. 9600 baud will be default, but I hope faster speeds will also be available. There will be a list of commands to display custom characters, change baud, position cursor, clear LCD and so on. I'll post questions about the code here whn the time comes to do that.
Title: Re: SoR comunity project: serial LCD
Post by: Asellith on May 03, 2009, 07:54:24 PM
BWAHAHAHAH the project is alive!!! More MODULES must have more MODULES!!!

Can't wait to see the first few get done.
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 04, 2009, 12:36:28 AM
yep, im so glad to see this thing taking off a bit! as soon as i get some money in i will get some boards etched, parts bought and proto's made...
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 04, 2009, 04:37:09 AM
I did a serial one years ago with tiny2313... (2 years before)
I have an idea on software...

Since AVRs offer both UART interrupt and TWI interrupt...
You can configure the LCD to wait for selection....

Ok.... I'll work on the project too...
Hope next week it will be more than ready... ;D
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 04, 2009, 04:41:38 AM
Ok.... I'll work on the project too...
you mean the lcd or the community project?
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 04, 2009, 04:47:21 AM
for the time being... the LCD.....
I don't agree fully with the project ( how it will be materialized )
So I'll help at whatever I can and know...
But don't know if I'm gonna take on a module.... It's another responsibility after all....

Plus I'm learning C, cause I can't keep on programming in Basic.....
So I'm focused elsewhere, plus I have uni study this week....
Plus, I need a gf... 0x0a0xa00a0x0axa Am I supposed to say that????
I can't compensate for any bad mood and replies.... :P
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 04, 2009, 04:56:32 AM
nah bro, its all good,
Plus, I need a gf...
ive heard that one before ;)
and good luck with learning c! im trying to do it myself...
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 04, 2009, 05:03:57 AM
nah bro, its all good,
Plus, I need a gf...
ive heard that one before ;)
and good luck with learning c! im trying to do it myself...


Darn it they don't know that they want.... Take them seriously and you are....... done..... (It's been 2 years I last took one seriously... dammit)

Whatever....
I haven't worked with I2C before...
But I would like to use Atmega32 instead....
I know it's not needed to use such a big controller but....
I have much much more experience with it... ( I have worked with ATmega8535 for some months and then leveled to mega32 :P  )
Plus it gives me enough memory to play with and make the module more commercial....
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 04, 2009, 05:13:40 AM
it doesnt really matter if there is too big an mcu, it will just drive the cost up a bit :-\
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 04, 2009, 05:26:28 AM
the difference is only some cents....
I got 4 for 10E meaning ~12$ US...
That's good price...
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 04, 2009, 05:28:32 AM
wow! that is a good price, those types of things are very much more expensive over here :(
Title: Re: SoR comunity project: serial LCD
Post by: Ro-Bot-X on May 04, 2009, 09:46:59 PM
I want to design a board the size of Axon, that will have female connectors upside down that will allow it to plug directly on the Axon and use the UART0 for communication. The LCD will be soldered to the board using male pins or male-female if you want to be able to change it easy, also will have holes for nuts and bolts or whatever. The thing is there are several models of 2x16 LCDs out there, I'll try to find the most available model and use that, but anyone that will have a different model will have to mod the board layout.

Question: how do you guys think it will be better:
- to leave space for servo/sensor wires to be inserted into the Axon below the LCD board?
- or bring up all the pins like an Arduino shield?

In the first case, the connection can be done using an extender (a female heather soldered to a male heather), in the second case, it will need a bit rare female go through long pins heathers for ALL of the pins.

Thinking about the wires, I would like to use right angled heathers for my modules so the wires come out sideways instead of upward. For the DC motor controller it's easy, cause it uses screw terminals for motor wires, but for a servo controller module, or a sensor module, or the scanning sensor module, if you need to add another module on top, connections are not that simple. So, I want your opinion on this matter as well.

Thanks!
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 12:35:11 AM
i would say, adding all the headers the axon has would make the price go boom... maybe only a few bucks but still...
you would try it if you really wanted to...
or you could use those female header things that go thru-board and have like an extended tail, no idea what they're call though...
i do like the look of right angle headers on boards, i don't know what it is....
but it does depend on where you think the wires are going to be going....
it seems pointless to have some headers that point up if the go right to the servos...
i don't think it would matter much as anywhere where we can have right angle headers we can have normal ones to,
am i right?
those are just some of my thoughts...
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 05, 2009, 04:36:15 AM
Here are my schematics... One side only board...
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 04:58:31 AM
wow was that quick...
just a question...
how do you fill in the parts with copper?
like is there a fill tool or something similar?
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 05, 2009, 05:28:02 AM
Ha,
well you actually draw a polygon then name it with the line you want to match (99999,99999% you name it either GND or 0V)
then press ratsnest and done...

And you can also match the isolation and other things to fit your needs, when drawing the polygon
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 05:51:00 AM
thanks again lefteris! what would i do without you ;D
Title: Re: SoR comunity project: serial LCD
Post by: hazzer123 on May 05, 2009, 06:05:44 AM
Eeeek... surface mount components!

Can you design an alternative, non-SMT board aswell please? :)
Title: Re: SoR comunity project: serial LCD
Post by: Asellith on May 05, 2009, 06:43:25 AM
Several things. First your mounting holes don't comply to the standard. For your application of primarily being mounted above the axon it would also be better to make the holes match the axons so that standoffs can be used to hold both.

Also you'll need space for the I2C connectors. The in and outs need to be on the board. I don't know if we need to standardize the location as the board designs can get really complicated fast. So maybe something simple like one on the left side and one on the right for easy connecting to the next module but even that is not necessary.
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 06:46:35 AM
one on the left side and one on the right for easy connecting to the next module but even that is not necessary.
but then jumpering may be needed, i just plonked mine next to each other on my board...
if you really see it necessary i can move some stuff around...
Title: Re: SoR comunity project: serial LCD
Post by: Asellith on May 05, 2009, 07:16:02 AM
A distinct separation should be between the ports but I don't think it matters all that much. Only thing is a long string of modules could require a lot of connecting cables because the male/female right angle connectors will only work for one pair if they are on the same side. If they are on opposite sides of the board the next board in line can be connected without a cable.
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 05, 2009, 12:24:57 PM
Ι didn't make it to fit Axon anyway....
It's just a module....
Mounting above axon... unfortunately is a bad idea... for many reasons...
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 02:25:31 PM
A distinct separation should be between the ports but I don't think it matters all that much. Only thing is a long string of modules could require a lot of connecting cables because the male/female right angle connectors will only work for one pair if they are on the same side. If they are on opposite sides of the board the next board in line can be connected without a cable.
would right angle connectors on each side do?
Ι didn't make it to fit Axon anyway....
It's just a module....
Mounting above axon... unfortunately is a bad idea... for many reasons...
why would it be a bad idea?
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 05, 2009, 02:47:25 PM
Also you'll need space for the I2C connectors. The in and outs need to be on the board. I don't know if we need to standardize the location as the board designs can get really complicated fast. So maybe something simple like one on the left side and one on the right for easy connecting to the next module but even that is not necessary.

EEEhhhh????
If I see right I have a 2X3 pin header for I2C and one for the UART...
Hey... I can upload the project so you can correct yourself...
I just designed a module for everyone...
Sorry for the SMD parts.... I really ignore what you guys can get of from the market sometimes.... I'll make a non SMD one....




And why mounding above Axon is a bad idea... James.... I think you already told that for me....


Why you guys admire that arduino thing so much.... I mean come on there are many many very very nice ways of connecting stuff....
like.... flat cable..... (something like that 40pin or 80 pin cable you used to have with your old HDD.....but of course a lot of smaller...)
Title: Re: SoR comunity project: serial LCD
Post by: Asellith on May 05, 2009, 02:49:34 PM
Ι didn't make it to fit Axon anyway....
It's just a module....
Mounting above axon... unfortunately is a bad idea... for many reasons...

I guess what I'm getting at is that modules must comply to the physical standards and communication standards for the community project to be included in that project. The physical standard is like 90% finalized. I understand the communication standard is not completely ironed out yet. What your making qualifies as more of a Axon add on board then a OSCAR qualified module

would right angle connectors on each side do?

The idea would be to make right angle connectors on the left and right side as an in and out that could be used to connect the next module down with just a female right angle connector on the other board. But also allow the user to install straight headers and use a ribbon connector or something else to connect boards as needed.



Edit: I see what happened Robot-X started the thread and you posted pics of your project that you did separately. I am getting the hint now. I got confused when the discussion took off as to who started this thread. Mores more sense now. sorry for the confusion
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 03:01:08 PM
well basically wherever a right angle header can go a standard one can too.
with tricky's design, it would not be hard at all to move the mounting holes around a bit...
and as for the smd part, that wont be hard either.
Title: Re: SoR comunity project: serial LCD
Post by: Razor Concepts on May 05, 2009, 03:30:42 PM
Just a note... we should incorporate some kind of SMD parts in, much cheaper and takes up less space. Not ICs or anything but simple things like resistors and capacitors, the 1206 size is really easy to solder.
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 05, 2009, 03:40:57 PM
i will make one with smd parts but it is hard to get them in australia :(
i struggle enough to get regular parts as it is ;) but i will try...
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 05, 2009, 03:43:03 PM
Just a note... we should incorporate some kind of SMD parts in, much cheaper and takes up less space. Not ICs or anything but simple things like resistors and capacitors, the 1206 size is really easy to solder.

Even soldering microcontrollers is hell easy....
Only thing you need is solder wick... you put excessive solder which is very very easy, then remove with the wick.... easy as hell!!!
Title: Re: SoR comunity project: serial LCD
Post by: Razor Concepts on May 05, 2009, 04:09:40 PM
I've tried wick method... on ft232... it generally works well but sometimes the "dry solder" gets in between the pins and it's hard to take out  :-\
Title: Re: SoR comunity project: serial LCD
Post by: hazzer123 on May 05, 2009, 04:19:31 PM
We should make an SMD version and a non-SMD for each module (and maybe even a stripboard version). More flexibility is good :)
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 06, 2009, 12:29:53 AM
yea, that would be great and not too hard at all, thru-hole as a kit and open source design, smd for sale and stripboard designs up... although... some boards would be wayyy too hard to make on stripboard... actually most would :-\
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 06, 2009, 04:56:19 AM
I basically design my boards on what I can buy... :D
And they don't use ATMEGA32-AU here a lot... bad bad bad....
Also smd pin headers will be avoided cause of practical use..... (they unstuck with the copper layer in hard use....)
I'll try to make a version 1.1 ;D ;D ;D ;D ;D
Fixing some AXON incompatibilities.... Get a holda!!! 8)
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 06, 2009, 05:03:41 AM
haha nice, are smd more easy to get over there than thru-holes?
Also smd pin headers will be avoided cause of practical use..... (they unstuck with the copper layer in hard use....)
is this because they are just stuck on the copper with solder?
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 06, 2009, 11:18:44 AM
It depends on what you are asking for....
I know the supplier here...
So if there are smd parts in a big order...
He tells them to include some exclusive parts for me...
Thing is that, if they don't have something and EBV has it...
I get it in 2 - 7 days, based on when the big order was placed and such...
If I don't want to wait for the for an order then I can have the parts in 2 days but
pay some ~17$ US more.... still no big deal...


Thing is that I do this only for some very rare parts that no one uses them...
So from resistors to microcontrollers (here the use more AVRs so I get plenty of them....)
to anything I want I got it....
Plus modules, development boards etc etc etc

is this because they are just stuck on the copper with solder?

yup....
Come on... I love smd parts.... much less development time.... Yeah!!!
( I do want to avoid drilling as hell....)
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 06, 2009, 02:23:04 PM
is this because they are just stuck on the copper with solder?

yup....
Come on... I love smd parts.... much less development time.... Yeah!!!
( I do want to avoid drilling as hell....)
oh god, tell me about it... 6 broken 1mm bits in one hour :-\ damn i was frustrated!
Title: Re: SoR comunity project: serial LCD
Post by: Ro-Bot-X on May 06, 2009, 04:40:08 PM
I guess my post didn't get through last night... I was having problems with the net.

So, I guess none of my previous questions were answered... I will make them more obvious, just keep in mind the LCD module should be mounted on top of all boards or to the side, to be visible:

1. Do we want the board to be like an Arduino shield (that means a plug in board, not just a stackable board connected with wires)?
2. Do we want the board to have polarised Molex connectors (0.1" pin space) for both UART(3 pins) and TWI(4 pins)?
3. Do we want the board to be full size or half size?
4. Do we want the board to have right angle connectors on the sides so it can connect to another half size board (if the board will be half size)?


Now I know TrickyNekro is working on a similar board, but he is using a big mega32 and I'm using a tiny2313. The more, the merrier. The software should be compatible up to the point of setting the proper registers, so I guess it should not be too complicated to port the code from one micro to the other.
Title: Re: SoR comunity project: serial LCD
Post by: dellagd on May 06, 2009, 05:14:44 PM
1. I think no (wires but still stackable), as yes would make it less flexible, also we can make them ribbon wire things for no tangled wires
2. no also, because since it is already on top of a board there is really no need to make things chain off of the display (assuming it already has connecters so it can act as a TWI divice)
3. half size because you will probably need to be able to get to the stuff underneath the display (outputs on the side not covered).
4.uhhhhh... no, because it defeats the purpose of having a half size board.

bear in mind that half size will be a very small space to work with though
Title: Re: SoR comunity project: serial LCD
Post by: Razor Concepts on May 06, 2009, 06:55:58 PM
For number 4, he means you can connect two half sized boards to take the space of a full sized board.
*facepalm*
Title: Re: SoR comunity project: serial LCD
Post by: dellagd on May 06, 2009, 07:02:59 PM
I know that
but if you connect 2 half size boards whot is the pont of making it half size?
why not just make it full size
Title: Re: SoR comunity project: serial LCD
Post by: Razor Concepts on May 06, 2009, 07:29:03 PM
Because then you have TWO boards instead of one.
Title: Re: SoR comunity project: serial LCD
Post by: dellagd on May 06, 2009, 07:46:51 PM
Oh  :P
now I see what you mean
sry guys
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 07, 2009, 01:08:53 AM
Now I know TrickyNekro is working on a similar board, but he is using a big mega32 and I'm using a tiny2313. The more, the merrier. The software should be compatible up to the point of setting the proper registers, so I guess it should not be too complicated to port the code from one micro to the other.


Hey.... I'll rebuild it as a development board.... I'm just used to mega32...
And no problem should exist at all... It's all about port setting...

And something more... hey guys...
try to make a OSCAR library for eagle if you have something in mind... So we can base our designs there...
Don't just nag, if it isn't compatible with anything you know...
We have different thoughts about many things...
So let's just start clearing them out...

I personally have ALL the good will to help out... But, tell me where my feet are....
I could easily say, hey I did a board, I put effort and time into it... And hey these guys, only say there
are problems without even helping with the basics (the OSCAR CAD library...... :P )
But, f@ck the effort, I enjoy what I do...
And f@ck the time... Although I don't have plenty....

Help out a little.... Don't just comment... aimlessly without doing something practical...

I tell this to everyone... Cause this is the meaning of a community... help each other...

It's just like the communistic political parties over here...
Fight for your rights, fight for your rights, fight for your rights...
And everything turns up to be a a noisy mess with a lot of arguments, and no job done...
You gotta work to have rights to speak... that's the truth...
You gotta offer first, not only your thought, and then comment...

I just hope... that we can do a community project everyone will be proud of...
Both from inside and outside this community...

Amen, guys...... amen....
Title: Re: SoR comunity project: serial LCD
Post by: SmAsH on May 07, 2009, 01:16:12 AM
tricky, i don't want to sound mean... but we are open to everyone's thoughts.
we have about 3-5 modules going right now which makes me happy...

to ro-bot-x:
it does not matter what mcu he designs it on as we can probably switch it over later easily...
he is probably going by what he has available/can get easily.

and tricky, by eagle library what do you mean? like a library with all of our board designs in it?
Title: Re: SoR comunity project: serial LCD
Post by: Ro-Bot-X on May 08, 2009, 06:51:50 AM
to ro-bot-x:
it does not matter what mcu he designs it on as we can probably switch it over later easily...
he is probably going by what he has available/can get easily.

and tricky, by eagle library what do you mean? like a library with all of our board designs in it?

I'll answer the last question first. He means a library with parts that we are going to use in all modules schematics and boards and of course, a board template for each board size, allready made with mounting holes and side connectors for I2C interface. That way, anyone can use a template to built his own module and if he adds a new part to the schematic he needs to update the library and upload it on SoR.

Now to the first matter. You see, to me it's easier to use ATmega8/168/328 for any module, make it standard size, program it in Arduino and use a hardware programmer to upload the code. But for some modules I feel a mega8 is a waste of space, pins, program space. That's why I tailor the microcontroller to the job and not use whatever I feel confortable with. But it has to be a widelly available microcontroller so almost anyone can get it and build the module. And I like to build the module as small as possible to make room for other modules and the robot does not get too bulky. I'm sorry if I get on other people's nerves, I just try to design something that I would be proud off. And instead of letting TrickyNekro go ahead and build his module then work it out to a smaller version in secret and present it afterwards, I'm inviting him to join efforts to build a module that will suit all needs. :)
Title: Re: SoR comunity project: serial LCD
Post by: TrickyNekro on May 08, 2009, 09:24:16 AM
Hehe... I'm always here.....  ;D ;D ;D
Don't worry...
Title: Re: SoR comunity project: serial LCD
Post by: Ro-Bot-X on May 25, 2009, 01:52:40 PM
I think an update is in order.

After the tiny84/85 compatibility with Arduino software has been released by LumiNet developer, I have decided to build my small modules using tiny84, a 14 pin DIP micro. I intend to build for my robot a serial LCD and a dual DC motor driver with encoders. I will work on the boards and order them through Batch PCB so anyone here can also get them. This way people can have at least something to begin with, easy to program using Arduino software or AVR GCC. I'll make updates in the proper topic for the motor controller soon, since that one is the first I'm going to work on, because I allready have a different serial LCD (I need a second one, that is the reason for taking on the project).
Title: Re: SoR comunity project: serial LCD
Post by: emmannuel on May 26, 2009, 08:04:40 PM
I actually started this same project in the begging of my previous semester :P

I got a bit frustrated and switched to the attiny26 and then gave it up and worked on something else.

My goal was to make it an I2C LCD driver with all options being passed through the I2C bus.

The challenge I gave up on was removing the potentiometer for VO.
I wanted it to be full SMD with the controls being read from another microcontroller and the values passed through the I2C bus to the tiny26.
From searching around I found that the pot should be able to be replaced by a PWM signal with a low pass filter.  Are my low pass filter values (R=10k, C=1uF) right? I couldn't find anyone that could confirm them :(

I still would like to get it done so here's where I left at:
Title: Re: SoR comunity project: serial LCD
Post by: Razor Concepts on May 26, 2009, 08:20:55 PM
Digital potentiometer maybe?
http://www.maxim-ic.com/products/digi_pot/ (http://www.maxim-ic.com/products/digi_pot/)