Author Topic: Using Arduino Mega with CleO  (Read 7090 times)

Dave Leddon

  • Full Member
  • ***
  • Posts: 4
    • View Profile
Using Arduino Mega with CleO
« on: July 31, 2016, 08:47:09 PM »
Well my application quickly ran out of memory using the NerO so I'm thinking of upgrading to the Mega.  But there could be some power supply issues, particularly if I decide later to implement the video camera and audio amplifier.  I'm currently powering the NerO with 12 volts which places a strain on the on board regulator but the NerO was designed to supply more current than your average Arduino so I've been getting away with it, so far.  Switching over to the Mega spells certain disaster unless I can come up with a different scheme to supply the power.  I've been toying with the idea of supplying an externally regulated 5-volt/1-amp power source directly to the Mega 5-volt pin.  Any thoughts or concerns regarding this approach?

Dave

Fred Dart

  • CEO of FTDI
  • Administrator
  • Full Member
  • *****
  • Posts: 74
  • Welcome...
    • View Profile
    • FTDI CleO Page
Re: Using Arduino Mega with CleO
« Reply #1 on: August 01, 2016, 12:26:44 PM »
NerO has a switch mode PSU, unlike the UNO and Mega, so 12v and above doesn't cause it any stress whatsoever, though I'd avoid going over 20v because of the ratings of the decoupling capacitors. If you want to use a Mega just go ahead with the following provisos -
1. Power the Mega off USB **but** use a decent round ( not flat ) USB cable, under 1M in length. A lot of the cheap Chinese USB cables have almost no copper inside which is ok (up to a point) for data but not for power delivery.
2. Unless you need it for your application, don't turn the LEDs of the camera on -they take a lot of "juice"- much more than the camera.
3. If you use the audio output, keep the volume to medium levels, not full blast - that will help in the current consumption budget as well.
I strongly suggest you give it a try, before considering a more elaborate solution. Let me know how you get on..
Cheers,
Fred

CleOSupport

  • Administrator
  • Full Member
  • *****
  • Posts: 51
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #2 on: August 01, 2016, 04:13:42 PM »
Hi Dave,

One other thing to note is that on some Arduino boards, if you power the board via a direct connection to the 5V rail, the regulator can be damaged by being reverse biased. Fred's suggestion of powering via USB would be safer.

Regards, CleO Support

Vinay Dand

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #3 on: August 02, 2016, 11:45:34 AM »
Hi Dave,

If USB does not supply enough current for your mega Arduino board and to prevent eventuality of reversed biased regulator.
You can add a power diode like 1N4007 between Vin and +5V pins available on 8 pin power header of Arduino Mega board.
Connect diode's Anode at +5V line and Cathode on Vin line.
Now powering board using external +5V source may work without much of a risk.

You may refer Arduino Mega schematic at
https://www.arduino.cc/en/uploads/Main/arduino-mega2560_R3-sch.pdf

Regards,
Vinay

Dave Leddon

  • Full Member
  • ***
  • Posts: 4
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #4 on: August 04, 2016, 06:01:50 PM »
I attempted to locate an Arduino Mega with extended header pins but failing that, I just ordered a sacrificial Chinese version from Amazon.  I replaced the four headers that mate with the Cleo display, leaving the others untouched in case I want to use the board in some other application at a later date.  I'm glad to report that the transition from NerO to Mega was seamless and that memory is no longer an issue.  I'm still powering the board with 12 volts but I plan to drop this down to about 7 volts by introducing a series string of 1-Amp diodes which should take some load off of the on board regulator.  FTDI ought to consider developing a NerO Mega for those wishing to develop larger applications, but for now the standard Mega seems to be an acceptable substitute.

Dave

Fred Dart

  • CEO of FTDI
  • Administrator
  • Full Member
  • *****
  • Posts: 74
  • Welcome...
    • View Profile
    • FTDI CleO Page
Re: Using Arduino Mega with CleO
« Reply #5 on: August 09, 2016, 12:44:48 PM »
That's a good result - well done there Dave. If there are enough folks out there who want a NerO Mega or something like that, please let me know and we'll consider it.

Gavin Melville

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #6 on: September 12, 2016, 11:37:03 AM »
I am probably missing something very obvious, but I simply can't get a genuine mega 2650 to work with CleO.

My CleO works with a clone UNO just fine.  Signals are as expected, and the jumpers are set correctly.

I have 2 Mega 2650's, neither works with Cleo, both seem to work otherwise.  There is no SPI activity, although once out of reset the SPI related pins park themselves in the right state.
I ran the little test script I saw on this forum, and I get just two lines on the serial terminal, "before CleO begin" and "Bit Bangin" -- usually no 'g'. 

The CleO board does display the signon graphic OK.

This is the script;

#include <SPI.h>
#include <CleO.h>
 
void setup()
{
  /* Initialize CleO - needs to be done only once */
  Serial.begin(9600);
  Serial.println("Before cleo begin");
  CleO.begin();
  Serial.println("After cleo begin");
 
  /* Start building a screen frame */
  Serial.println("Before cleo start");
 
  CleO.Start();
  Serial.println("after cleo begin");
 
  /* Draw a string "Hello World" at (160, 240) */
  CleO.String(160, 240, "Hello world");
 
  /* Display completed screen frame */
  CleO.Show();
}
 
void loop() {}


Does anyone have any bright ideas before I have to debug this the hard way ?

NeilMan

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #7 on: September 12, 2016, 10:10:13 PM »
I think you will find that, simply, SPI is on different pins between the UNO and the MEGA.

See this reference on the Arduino site ... https://www.arduino.cc/en/Reference/SPI

The only way you can standardise the SPI connections between UNO and MEGA is to use the 6-pin ICSP connector and CleO doesn't use this plug - so no easy fix  :(

Gavin Melville

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #8 on: September 12, 2016, 10:35:18 PM »
Oh - great.   This can however be fixed...  Sidecutters, wire, solder....

Thanks, I missed that, I've only ever used the Megas until now.

prashanthb

  • Full Member
  • ***
  • Posts: 23
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #9 on: September 13, 2016, 03:49:33 AM »
Hi Gavin,

May I know if you are using the CleO library from CleO V1.0.1 release (latest release). FYI, Bit banging is used for Mega, Due and other modules that do not have SPI lines similar to UNO module. FYI, "SPI Bitbang enabled" should be noticed on the COM port with the latest release.

Gavin Melville

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: Using Arduino Mega with CleO
« Reply #10 on: September 13, 2016, 09:14:25 AM »
I am using the latest release, but it seems to die before completing the bitbang message. As soon as I can get a few minutes, perhaps tomorrow, I'll see if I can debug further.

Fred Dart

  • CEO of FTDI
  • Administrator
  • Full Member
  • *****
  • Posts: 74
  • Welcome...
    • View Profile
    • FTDI CleO Page
Re: Using Arduino Mega with CleO
« Reply #11 on: September 15, 2016, 12:49:07 PM »
Correct me if I'm wrong, but using the bit-bang SPI on the Mega avoids having to rewire the Mega, so you wont need the wire snips or soldering iron, right?

Fred Dart

  • CEO of FTDI
  • Administrator
  • Full Member
  • *****
  • Posts: 74
  • Welcome...
    • View Profile
    • FTDI CleO Page
Re: Using Arduino Mega with CleO
« Reply #12 on: September 15, 2016, 01:31:35 PM »
Please do..