EVSE with arduino - code

455 views
Skip to first unread message

Nuno S Silva

unread,
Jun 24, 2013, 11:08:44 AM6/24/13
to open...@googlegroups.com
Hi all,
The group absolute "rocks"...
I'm finishing doing the EVSE with arduino...

Using:
1x Arduino Uno
2x Protoshield (GFCI and OpAmp Pilot)
1x LCD keypad (not Adafruit)

A couple of things that are happening right now:
1 - as I'm using the USB port for power, when I insert the GFCI protoshield, the Arduino "breaks". By "breaks" I mean shuts down. if I put Arduino+Protoshield pilot+LCD -> no "shutdown". No current sufficient from USB port?!

2 - As I'm using a LCD keypad I've tried to use the LiquidCrystal library in order to view the messages..."No can do"! It only "shows" the top row of the LCD. Tried to use lcd.begin(16,2) and lcd.setcursor...no luck. The best I get was the 2 rows powered but blank... I've putted the code attached (basically is the one on the forum and the adafruit example code with some changes...
For instance: Right now shows "Vent Required" on the top row, but, as I could understand on the code this message should be in the bottom row and on the top should presente "EVSE Error"...
Did someone used LiquidCrystal library successfully with Arduino?

3 - Testing mode: What about the CT? can the system be tested (with the diodes+resists) and "discard" the CT?

I think I need first to put the LCD working first. Can I get a little help? Maybe the code merging of the Adafruit and LiquidCrystal is screwing up...

Thanks in advance

open_evse (1).ino

lincomatic

unread,
Jun 24, 2013, 6:03:45 PM6/24/13
to open...@googlegroups.com

I’m guessing that your LCD is using pins that the EVSE also uses. If it works w/o the other shields hooked up, then that’s the culprit.

 

--
You received this message because you are subscribed to the Google Groups "OpenEVSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openevse+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nuno S Silva

unread,
Jun 25, 2013, 3:11:08 AM6/25/13
to open...@googlegroups.com
Hi lincomatic, thanks for your reply
The pins I use for config the lcd are lcd(8, 9, 4, 5, 6, 7)...  

Nuno S Silva

unread,
Jun 25, 2013, 6:13:55 AM6/25/13
to open...@googlegroups.com
Just after send my reply I've confirmed...
Indeed I'm using common pin...at least D5 and D2
Can i get some help in how to correctly initialize the lcd?

lincomatic

unread,
Jun 25, 2013, 12:47:40 PM6/25/13
to open...@googlegroups.com

You can’t share the pins that the EVSE uses. Look through the code for the defines with “PIN” in them.

If you have all features enabled, then these pins are already taken: A1, A3,D3,D4,D5,D7,D8,D10,D13.

 

That’s why everyone else is using an I2C connections for their LCD’s… only 2 I/O pins used.

Nuno Santos Silva

unread,
Jun 25, 2013, 1:04:01 PM6/25/13
to open...@googlegroups.com

Thanks lincomatic,

You are right.

I’ve managed to get a lcd 1602A (plain simple, no buttons)! Can I use the I2C connections? Nevertheless, the code should be changed to meet these I2C spec, no?

 

Thanks (again and again)

--
You received this message because you are subscribed to a topic in the Google Groups "OpenEVSE" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openevse/ZK4E20fg8mQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openevse+u...@googlegroups.com.

lincomatic

unread,
Jun 25, 2013, 1:30:24 PM6/25/13
to open...@googlegroups.com

I don’t know without a spec sheet, but that sounds like a typical HD44780-compatible parallel interface LCD.  You can hook up an HD44870-compatible to Adafruit’s I2C backpack: http://www.adafruit.com/products/292 and enable I2CLCD in the code, or use an Adafruit RGB LCD-compatible http://www.adafruit.com/products/714 by turning on RGBLCD.

Nuno S Silva

unread,
Jun 26, 2013, 11:38:33 AM6/26/13
to open...@googlegroups.com
Ok, almost there...
actions taken: no use the gfci module...baby steps :)
first "bad thing": when connected led goes allways blue. :(
attached a diode+resistor in order to get the charging state...pilot read -6v (?!) and output relay ok...

If not coonected: pilot read 12V, green led...nothing


just to clarify...I'm using fw 0.4 (because it has the pde/ino file). isn't there a new one "editable". my guess is that I might need to clear // some code parts and as far as I have been seeing, #define gfci does not exist in my code, as well as advpwr...

So, I might been dealing with a code problem rather than a physical on. Can I get a "newer" code version not precompiled?

Thanks guys!

conradel...@gmail.com

unread,
Jun 26, 2013, 12:47:45 PM6/26/13
to open...@googlegroups.com
Are you using this one https://github.com/lincomatic/open_evse I have read through the entire thing multiple times and as far as I can tell it is complete for the 4.2 Version build.

Nuno S Silva

unread,
Jun 26, 2013, 1:19:55 PM6/26/13
to open...@googlegroups.com
Actually no.
Apparently has nothing to do with my current version (0.4.0)
Do you have any ideia if it is Arduino compliable?

conradel...@gmail.com

unread,
Jun 26, 2013, 1:58:29 PM6/26/13
to open...@googlegroups.com

Open Mouth Remove foot.  Well thats what I get for answering a question without reading the entire back post.  I didn't notice that you were building the Arduino Shield version,  now I have a limited knowledge of coding but I don't see why this wouldn't work with the Uno.  You shouldn't need the Arduino includes since they will be automatically included with the uno's bootloader.  I may have over stepped my knowledge a bit by answering your question Sorry.

Chris

unread,
Jun 26, 2013, 2:05:10 PM6/26/13
to open...@googlegroups.com

Chris

unread,
Jun 26, 2013, 2:07:47 PM6/26/13
to open...@googlegroups.com

Do you have any ideia if it is Arduino compliable?
Yes, the code is designed for the Atmel 328p which is the same microprocessor as the Arduino Uno.

Nuno S Silva

unread,
Jun 26, 2013, 2:37:55 PM6/26/13
to open...@googlegroups.com
Thanks Chris and Conrad


About this current stable version, and since I will be doing, for now, the Pilot Opamp module and the Arduino itself, giving the info that this is also kinda new to me... I think, as lincomatic once told me, I should "//" the #define advpwr and the  what else? #define GFI? 

Thank you
Reply all
Reply to author
Forward
0 new messages