Pages: 1 [2]   Go Down
Author Topic: SoftwareSerial for Arduino Due  (Read 6416 times)
0 Members and 1 Guest are viewing this topic.
Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 Excellent work! Nice video!

Quote
(I ordered five more MC33290

 I have 2 MC33290 chips but, I have discovered that it is simply a voltage level converter. Therefore, I am using a LM393 DIP chip to convert my 12volt K-line to 5volt for my Arduino. Basically the LM393 is set-up as a dual comparator, one comparator is the TX from the Arduino with it's collector tied to 12v, and the other comparator is from the K-line of the bike with it's collector tied to 5v. I could e-mail a schematic to you if you need it. I have a few extra circuit boards for the LM393 level converter that I have made work for my Arduino.

I really like your project. My project is still early in development currently, I have a Bobuino board with RTC and SD card, a 2x16 LCD screen shield with buttons and my level converter circuit is a separate board. I hope to have a touch screen for a user interface then, have all other electronics hidden. In my case the Arduino will be in the back of my motorcycle and the screen will be mounted somewhere at the front of the bike.

 I have one request if you don't mind, could you list your pin-out that goes with your code? When I say pin-out I mean: LCD pins- 9,8,7,6,5,4 etc. , SD card pins 10,11,12,13, button pins....... etc. It is OK if you want to keep some of your build secret, you have done a lot of good work.
 
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the appreciations. And yes, I would really like to see the schematics for LM393!!!
Do not worry to ask for the code, I have already stolen something from the your code (the one you posted) and tested this evening with success  smiley-lol

About the pinout I posted the full code some posts behind. Following you can find the link:
http://luca72.xoom.it/td5mapsuiteweb/archive/td5opencom/td5opencom11q.zip

Download it and open the file named Td5Defs.h, it contains all the pinout for Atmega328p and for Mega2560.
Anyway here is a brief summary:
Code:
#if  defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
  #define LCD_D7                2
  #define LCD_D6                3
  #define LCD_D5                4
  #define LCD_D4                5
  #define lcdBKlightPin         6
  #define LCD_RS                7
  #define LCD_EN                8
  #define ledPin                9
  #define SD_CS                10
  #define MOSI                 11
  #define MISO                 12
  #define SCK                  13
  #define keyPadPowerPin       A0
  #define keyPadButtonsPin     A1
  #define K_OUT                A2 
  #define K_IN                 A3
  #define SDA                  A4
  #define SCL                  A5
#endif

#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  #define LCD_D7               40
  #define LCD_D6               38
  #define LCD_D5               36
  #define LCD_D4               34
  #define lcdBKlightPin         2
  #define btEnablePin           7
  #define LCD_RS               22
  #define LCD_EN               24
  #define ledPin               13
  #define SD_CS                53
  #define MOSI                 51
  #define MISO                 50
  #define SCK                  52
  #define keyPadPowerPin        3
  #define keyPadButtonsPin     A1
  #define K_OUT               A15
  #define K_IN                A14
  #define SDA                  20
  #define SCL                  21
#endif
Everything is OpenSource - OpenHardware so I am very pleased to share. There is only a little part I cannot share publicly: the seed-key table (residing in an external EEPROM) since it is reverse engineered and I fear to be break some law. Here you can find the rest of the project (non Arduino related): http://luca72.xoom.it/td5mapsuiteweb/index.html
There is some Android code too (still in very early stage and not published yet), since it connects to my 8" tablet via bluetooth and uses it as a second monitor (LCD is primary.

If you are interest you can contact me via e-mail, it is on my website.

So you are going to use your project on the motorbike? Really interesting, since I am a biker too!!!! BTW I really need a RTC. Which one do you use? Is it compatible with DUE levels or do you use a translator?

Luca
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 The Arduino board I am using is made by CrossRoads from this forum. It has built in RTC and SDcard slot. A picture of it is on this page http://www.crossroadsfencing.com/BobuinoRev17/

Quote
And yes, I would really like to see the schematics for LM393!!!

 I can not figure out how to make a picture of the schematic but, I will send you an Eagle .sch file of level converter. Please double check the design, it is board that I am designing but, it is not finished...........e-mail is sent.

Quote
Do not worry to ask for the code, I have already stolen something from the your code (the one you posted) and tested this evening with success
I am glad to hear that the code worked for you.

Quote
So you are going to use your project on the motorbike?

I have a 08 Suzuki GSXR and I have been communicating with it using a computer and program written by some other people http://ecuhacking.activeboard.com/. My project replaces the computer with my Arduino to log data and display sensor data. I have a lot of the code working but, there are still bugs that need worked out.

 I can tell you many things about the bike programming but, it would have to be another thread.



Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
LucaV72 wrote:
I have 2 MC33290 chips but, I have discovered that it is simply a voltage level converter. Therefore, I am using a LM393 DIP chip to convert my 12volt K-line to 5volt for my Arduino. Basically the LM393 is set-up as a dual comparator, one comparator is the TX from the Arduino with it's collector tied to 12v, and the other comparator is from the K-line of the bike with it's collector tied to 5v.

Have you mentioned that the DUE I/O-Pins are specified for 3.3 Volt only, 5 Volt would damage the chip.
Best regards Gerd
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Have you mentioned that the DUE I/O-Pins are specified for 3.3 Volt only, 5 Volt would damage the chip.

 I was speaking of my application using a 1284P chip. My converter could also work with 3.3volt when connected to a 3.3volt of Due.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Because I am developing an automotive project which needs 10400 baud on the serial port. With Atmega328P and Mega2560 I tried to set the hardware serial port to 10400 but I could not connect to the ECU of the car. So I modified the SerialSoftware library in order to accept this connection speed and it worked like a charm. I have been testing the system for more than 6 months and it almost never dropped a frame.
Now I fear to have the same problem on the new DUE so I would be very happy to have a SoftwareSerial library to modifiy to 10400 baud.
Luca

hi Luca!

can you share maybe that changes about SoftSerial. Same thing here.. I couldn't connect to ECU with hardware serial.
thanks in advance!
Logged

Pages: 1 [2]   Go Up
Jump to: