Welcome! Log In Create A New Profile

Advanced

Anyone interested in an LCD control panel for the Ormerod?

Posted by dc42 
Re: Anyone interested in an LCD control panel for the Ormerod?
October 12, 2014 09:44AM
Quote
dmould
Quote
kwikius
Looking good DC42

I somewhat hesitate to say this ( but decided to put it out there!) but what springs to my mind is to use the display for a close up view of what is going on at the print head. ie from a video camera. I appreciate this would definitely amount to feature and cost creep, but the QVGA display is perfect for the task I think. A webcam might work but looks like would need USB2 to get a good framerate, though I am no expert on the subject.

Anyway maybe I should put this in a separate thread?

regards
Andy

That would mean a complete redesign!

I prefer the term "Kiler Application". smiling smiley With my failing eyesight I am often straining to see what details are coming out and how well a print is going. A camera would be ideal.

Anyway I appreciate it would be a complete redesign. I have been thinking about it for a while and finally decided to air it here rather than put it in a separate thread. Its related so I hope relevant to the subject. and would otherwise surely be a bit surprising. I already have something I could use for demoing it, but based on video camera , but that is basically an OSD and needs a display to view it. so a nice marriage!
Ignoring hardware The layout and much of the software could be similar to the LCD display that DC42 is designing..

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
October 12, 2014 12:38PM
Regarding extra pins, the processor I plan to use (SAM3S1A or SAM3S2A) provides 31 I/O pins after allowing for the USB pins and the Erase pin (for programming, as on the Duet). The TFT display takes up 20 pins, the touch interface needs 5, the rotary encoder with push button needs 3, and we need 2 for communication with the Duet. This comes to 30 pins, leaving just one spare. I was going to use this to allow the display brightness to be controlled, although this is probably not necessary as I expect most users would leave it set to full brightness anyway. So I could make this available as a general purpose I/O pin.

If users think having extra I/O is really important, then there are ways I could make more I/O pins available. For example, I could use the 64-pin variant of the processor instead of the 48-pin variant (at significant extra cost). Or I could make another 7 pins available by using a latch to interface with the display, as I am doing in the current setup using an 8-bit AVR processor.

The video camera is a nice idea, but would need a RPi or similar to work with it.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 12, 2014 04:00PM
If it adds significant cost or complexity, don't bother for my sake. But I'd be perfectly happy to have the brightness set to full or controlled via a trim-pot or something (even if I have to resolder stuff on the PCB to do so).

Is the Duet <-> display serial link I2C, and would it in that case be possible to insert a separate device on that (some random cheap arduino board) for doing "generic extra stuff"? I just feel it might be easier and safer to add the code for anything like this to the display board, and leave the Duet to do printing.
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 07:36AM
Firstly I want to thank David for all his hard work on this so far.

I would also like the option of adding physical buttons. I work with industrial machines with HMI screens, and it is often difficult to make close adjustments with the inch / jog botton on a touch screen whilst looking at what the machine is doing. Having to look back at the screen to see where the button is on the screen is much harder than feeling where an actual button is.

I appreciate this can be done with the rotary encoder when adjusting one axis, but I can see where it may be advantageous to have six buttons that could be used to drive x, y and z in either direction. Maybe holding the button for longer will increase the speed?

If the option of adding buttons and or buzzer could be done without an increased pin count chip then that would be best as far as I'm concerned.


RS Ormerod #472
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 08:34AM
I believe the buzzer is in. Was part of the original spec

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 05:34PM
I must confess that I had forgotten about the piezo buzzer. It sounds as though I should go for the 64-pin version of the chip (giving 13 more I/O pins) or the extra 8-bit latch (giving 7 more I/O pins).



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 05:39PM
Or go for the SAM3X8E and be done with it! grinning smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 05:54PM
I'm hoping to use a 2-layer board to keep the costs down, and I'm not at all sure that would work with as large a chip as the SAM3X8E!



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 06:01PM
I was half joking, but it certainly has a log of pins and expansions, you can route enough pins away without needing 4 layers but you would not get all 144. It definitely overkill though
Re: Anyone interested in an LCD control panel for the Ormerod?
October 13, 2014 06:19PM
Yes I did notice the smiley, I didn't intend to sound serious spinning smiley sticking its tongue out



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 14, 2014 03:33AM
Not getting the increased cost of the 64 pin version?

Its only 7 p or so on Farnell
SAM3S1A SAM3S1B comparison

Extra board space cant be significant since you would use more for a latch surely?

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
October 14, 2014 03:45AM
Farnell doesn't keep the QFP 128K version of the chip, which is the one I may end up using. The QFN version is less suitable for a 2 layer pcb. Using the latch may well simplify the pcb layout because it reduces the number of wires that have to go from the mcu to the display connector, and the latch can go on the other side of that connector.

Edited 1 time(s). Last edit at 10/14/2014 03:46AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 14, 2014 06:57AM
Sorry for all the questions! Looks like it'll be a very nice addition. I'd better let you get on with it smiling smiley

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
October 15, 2014 12:40PM
Hi DC42...

I am also very interested.. could you let me know?..

Cheers
Gordon.
Re: Anyone interested in an LCD control panel for the Ormerod?
October 15, 2014 02:09PM
Quote
phoenix3d
Hi DC42...

I am also very interested.. could you let me know?..

Cheers
Gordon.
#

Will do!

The ATSAM3S dev kit arrived earlier this week, so I will soon be porting the code to the new processor.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 26, 2014 06:10PM
I've been away for a week presenting a conference paper and doing an exhibition, so I have had no time to do any work on this until today.

My plan was to host the ATSAM3S project in Atmel Studio and use the Atmel Software Foundation (ASF) for hardware interface. It turns out that Atmel Studio does not support the ASF in C++ projects, it only supports ASF in C projects. This is somewhat ironic seeing that I've just presented a conference paper, in which I make the point that C is an inadequate language for safety-critical systems, but a subset of C++ is usable. What century is Atmel is living in?

I eventually managed to build a small C++ project in Atmel Studio with a C library to interface to ASF, and upload it to the board using bossac. For now I will continue developing in Atmel Studio, but I see no reason why the final project couldn't be ported to Eclipse once I know which bits of the ASF I need. Either way, the upload mechanism will be bossac, which has the advantage of being familiar to Ormerod users.

Next step is to port the existing Arduino Leonardo project to the ATSAM3S, which should not be too difficult. Then I will have lots of memory to play with and I can add functionality.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
October 27, 2014 09:15AM
I'm not sure what format the BIN files are in - they appear to be a simple raw binary firmware image, though perhaps they have load and run addresses embedded. Whatever development environment is used, I am sure the output could fairly trivially be (re)formatted to a compatible binary image which bossac would upload to the board.

Dave
Re: Anyone interested in an LCD control panel for the Ormerod?
November 03, 2014 01:11PM
After a diversion to do real (paid) work, I've managed to spend time on this again. I spent many hours battling with Atmel Studio and ASF, which don't properly support C++ even with exceptions and RTTI disabled. Now I know why the Arduino core for the Duet is such a mess. I finally managed to port the code from the Arduino Leonardo to the ATSAM3S4B and upload it via bossac.



A tip for anyone else trying to use C++ in Atmel Studio on the ATSAM series: don't declare any pure virtual functions! In a Release build, doing so pulls in about 50K of library code. I suspect this is because the runtime wants to be able to report "Pure virtual function called" to someone.

The program size is actually lower than it was on the Arduino Leonardo, perhaps because I don't have USB interface code in the program (I use the USB port only to upload the firmware, via bossac). Free memory has gone up to 37K because the SAM3S4B I am currently using has 48K RAM. So there is plenty of memory for improvements. Even with the ATSAM3S2B that I plan to use, there should be more than enough RAM and flash memory The speed has also increased noticeably.

Now at last I can get on with adding functionality.

I plan to offer the controller board with wires to connect it to the Duet, but without the display. If I ship the display with it, then I would have to charge a substantial markup to allow for returns, stocking costs, unsold stock etc, which would blow the GBP50 target. Also I would have to charge VAT, whereas users who import direct from China often manage to avoid paying import VAT for low-cost items. An advantage of not including the display is that users who want to use a larger display with the same 16-bit parallel interface should be able to. The software I supply will be designed for a 3.8 inch 400x240 display ($22 from Itead), however Itead also offers a 4.3 inch 480x272 display at $38 and a 5 inch 800x480 display at $44. So it should be possible for users to pair the control board with a larger display and change the firmware to display more fields at once.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].

Re: Anyone interested in an LCD control panel for the Ormerod?
November 03, 2014 01:23PM
Sound great! - Thank You for Your time and hard work!

Erik
Re: Anyone interested in an LCD control panel for the Ormerod?
November 03, 2014 01:55PM
Hi DC42,

Yes, "Thank You for Your time and hard work!" smileys with beer It is really appreciated.

Regarding the LCD that you are using, can you confirm the precise part/ web URL please.

I presume 3.8inch was a typo and it is 3.2 inch as your image.
I couldn't find anything on Itead, but found this on eBay.co.uk

[www.ebay.co.uk] at £15.97 plus a £1 p&p if anyone else is looking....

Many thanks.


Ormerod #007 (shaken but not stirred!)
Re: Anyone interested in an LCD control panel for the Ormerod?
November 03, 2014 02:21PM
Hi Treth,

You are right, I meant 3.2 inch. Here are the displays I am looking at: [imall.iteadstudio.com]. They can be obtained for less from some other suppliers, but I have had a very good experience with Itead, and I received a faulty display when I tried another Chinese supplier.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
November 03, 2014 05:10PM
Great job. Would love to pit this on my O2.
Re: Anyone interested in an LCD control panel for the Ormerod?
November 05, 2014 05:35AM
Quote
dc42
After a diversion to do real (paid) work, I've managed to spend time on this again. I spent many hours battling with Atmel Studio and ASF, which don't properly support C++ even with exceptions and RTTI disabled. Now I know why the Arduino core for the Duet is such a mess. I finally managed to port the code from the Arduino Leonardo to the ATSAM3S4B and upload it via bossac.



A tip for anyone else trying to use C++ in Atmel Studio on the ATSAM series: don't declare any pure virtual functions! In a Release build, doing so pulls in about 50K of library code. I suspect this is because the runtime wants to be able to report "Pure virtual function called" to someone.

Hi DC42. Sounds like its working well.

Am interested to know What is the rationale for using Atmel Studio over simply barebones gcc.

Is there a way to export a project so it can be built outside the IDE?

On the virtual functions issue could try linker option -nodefaultlibs and provide own definition of extern "C" void __cxa_pure_virtual(){;} else I think gcc pulls in default definition which then pulls in a load of i/o stream stuff. Of course you may then be missing other stuff you need...

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Anyone interested in an LCD control panel for the Ormerod?
November 05, 2014 07:52AM
The reason for using Atmel Studio is that it provides a reasonable IDE that I have found easier to configure in the past than Eclipse, and an easy way to pull in the required drivers from Atmel Software Framework. The ATSAM processors are much more complicated to drive than the AVR series, so it's helpful to have the ASF rather than driving the registers directly. But once all the needed ASF bits have been pulled in, it shouldn't be difficult to move the whole project to Eclipse.

I've now got the touch interface working, and I pop up a window when a temperature field is touched.



Ignore the striations on the display in the photo, they are not really there, you get them because the pixel densities of the display and the camera interfere.

Edited 1 time(s). Last edit at 11/05/2014 07:53AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].

Re: Anyone interested in an LCD control panel for the Ormerod?
November 05, 2014 10:36AM
This sounds like the coolest upgrade mod. Have you given any thoughts on mounting points for this yet?
Re: Anyone interested in an LCD control panel for the Ormerod?
November 06, 2014 09:48AM
Quote
Pyro
This sounds like the coolest upgrade mod. Have you given any thoughts on mounting points for this yet?

Do you mean mounting points on the Ormerod? I'm thinking of putting mine at the top of the Z axis.

I now have the firmware adjusting the active and standby temperatures via the touch panel and generating the correct commands to send to the Duet.



I'm currently using the bottom 2 lines for debug messages. Total flash usage is only 22.5K, so the 128K flash/32K RAM version of the SAM3S should be easily large enough.

I've started committing the firmware to github, it's at [github.com].

Next steps:

1. Get it talking to and powered from the Duet, so that it is really controlling an Ormerod.

2. Add the rotary encoder and piezo buzzer.

3. Finish the PCB layout and order prototype PCBs and components.

4. While waiting for them to arrive, add more functionality to the firmware.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].

Re: Anyone interested in an LCD control panel for the Ormerod?
November 10, 2014 01:03PM
Exciting times. smiling smiley I would like one.
Re: Anyone interested in an LCD control panel for the Ormerod?
November 10, 2014 02:06PM
Thanks Paul, you are already on the list.

I've done the Duet firmware mods to provide the extended status response, see [reprap.org]. The board is talking over the serial port to an Arduino that is simulating the Duet serial interface. PCB layout is now complete, and I'll order prototype PCBs when I have tested a few more functions.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Anyone interested in an LCD control panel for the Ormerod?
November 14, 2014 05:21PM
Progress report

I now have the TFT prototype talking to the Duet, displaying temperature settings, position, extrusion factors etc. and controlling most of these values. The piezo buzzer is working and I am using it to provide audible confirmation of touch. I haven't connected the rotary encoder yet, but the touch interface does everything I need anyway. I have added a touch calibration function, to allow for imperfect matching between the touch membrane and the display. I have released new Duet firmware 0.78x-dc42 that includes the necessary serial comms support.



I plan to order prototype PCBs tomorrow.

If any of you feel like helping with the software effort, there are a few tasks you might consider:

1. Fonts with accented characters. I currently use a 19x20 font, which is about the right size for the 3.2 inch 400x240 display. However, it only covers the basic ASCII character set (characters 0x10 thru 0x7E). As there is now plenty of space since I switched to the SAM3S processor, this could be expanded to include characters up to 0xFF. This may be of benefit to users in non-English speaking countries who wish to translate the firmware messages and/or use accented characters in file names. The easiest way to create fonts is to download GLCD Font Creator, import an open-source font such as Liberation Sans, and then tidy it up.

2. Larger fonts. If anyone wants to use the board with the 4.3 inch or 5 inch display, and not use all the extra space to display more information, then larger fonts will be required. The process for creating the font files is as described above.

3. Graphics. Currently I use the display mostly in text mode, which seems a shame. It would be nice to have graphics at least for the print heads, bed and fan, such as can be seen here [ep.yimg.com] but of course in full colour and higher resolution. Would anyone care to volunteer to design the graphics? There is a program to convert various image formats to source code here [www.henningkarlsen.com].

The current firmware is at [github.com].



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].

Re: Anyone interested in an LCD control panel for the Ormerod?
November 16, 2014 05:05AM
Looking great! Thank a for making this!
Sorry, only registered users may post in this forum.

Click here to login