create account

Building a timelapse slider rail with Arduino - Part 3 - LCD Display by markangeltrueman

View this thread on: hive.blogpeakd.comecency.com
@markangeltrueman (edited)
$8.57
Building a timelapse slider rail with Arduino - Part 3 - LCD Display
Hey there,

This post goes into how I have set up a 16x2 LCD display to be used with my time-lapse rail. The LCD will display a number of menu items that allow you to configure the slider as well as starting and stopping the motion. I'll go through both the menu API and how I set up the buttons to navigate in a future post.

Previous parts are here

https://steemit.com/photography/@markangeltrueman/building-a-timelapse-slider-rail-with-arduino-part-1
https://steemit.com/photography/@markangeltrueman/building-a-timelapse-slider-rail-with-arduino---part-2---stepper-motor-1510869489-2758267

![IMG_0458.JPG](https://steemitimages.com/DQmS2Q9kRcMohe17CUPt5F9Gss77TQvPTMBjSBXLieZeXuA/IMG_0458.JPG)

It is possible to connect an LCD directly to the Arduino but the problem with this is that it uses at least 6 data pins on the Arduino, which doesn't leave enough for the other functions I need from the Arduino. To get around this, I decided to use a 74HC595 bit shift register chip. These chips allow you to pulse values into the chip on a single pin and then "latch" the value in place before outputting it. There are 8 output pins which give plenty of flexibility. You can also chain these chips together so you can get 8,16,24,32 bit outputs from just a few Arduino pins. Clever stuff.

Here is a schematic created in Fritzing (a great program if you want to do this kind of thing)

![Screen Shot 2017-11-18 at 21.06.03.png](https://steemitimages.com/DQmZdnPfJvuvjGiAu9emaS6FUB3PBR1B2z9uBT8WeHj2qKz/Screen%20Shot%202017-11-18%20at%2021.06.03.png)

As you can see there are just 3 wires coming out of the Arduino (apart from 5v and GND) and they all go into the 595 chip. The chip then has 6 outputs into the LCD, 4 for data, 1 to enable the LCD and 1 to switch the mode of the LCD from "command" mode to "data" mode. Command mode is used to move the cursor, clear the screen etc. Data mode is enable to actually take the data sent in on the 4 (in this case) data pins and display it.

In case you are wondering what the LCD pins do, this is a good page (i wont copy and paste the detail here)

http://www.circuitstoday.com/interfacing-lcd-to-arduino

In terms of Arduino code, you can't get any simpler. You need to include a couple of libraries, one for the LCD and one called SPI (serial peripheral interface), which tacks on the ability to use the 74HC595 chip.

![Screen Shot 2017-11-18 at 21.24.57.png](https://steemitimages.com/DQmTqBYKbJWdW4ctzSHtqGxQ4EP38UcqmCrBjXLqC3s94kU/Screen%20Shot%202017-11-18%20at%2021.24.57.png)

The output from this is shown in this video

https://youtu.be/0FmKherJg18

And here is a quick video showing how altering the resistance through the potentiometer changes the brightness of the lcd text. You can change the backlight brightness by either altering the value of the resistor in place on the breadboard, or by replacing that resistor with a potentiometer too, but i prefer to just leave it with a 680 ohm resistor which gives a good level of light.

https://youtu.be/eQy2utCO-Ds

In the next part, I'll go through how to set up the Arduino to accept input from 4 different buttons on a single pin and touch on my custom menu API

Thanks for looking

Mark
馃憤  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authormarkangeltrueman
permlinkbuilding-a-timelapse-slider-rail-with-arduino-part-3-lcd-display
categoryphotography
json_metadata{"tags":["photography","arduino","timelapse","electronics","diy"],"image":["https://steemitimages.com/DQmS2Q9kRcMohe17CUPt5F9Gss77TQvPTMBjSBXLieZeXuA/IMG_0458.JPG","https://steemitimages.com/DQmZdnPfJvuvjGiAu9emaS6FUB3PBR1B2z9uBT8WeHj2qKz/Screen%20Shot%202017-11-18%20at%2021.06.03.png","https://steemitimages.com/DQmTqBYKbJWdW4ctzSHtqGxQ4EP38UcqmCrBjXLqC3s94kU/Screen%20Shot%202017-11-18%20at%2021.24.57.png","https://img.youtube.com/vi/0FmKherJg18/0.jpg","https://img.youtube.com/vi/eQy2utCO-Ds/0.jpg"],"links":["https://steemit.com/photography/@markangeltrueman/building-a-timelapse-slider-rail-with-arduino-part-1","https://steemit.com/photography/@markangeltrueman/building-a-timelapse-slider-rail-with-arduino---part-2---stepper-motor-1510869489-2758267","http://www.circuitstoday.com/interfacing-lcd-to-arduino","https://youtu.be/0FmKherJg18","https://youtu.be/eQy2utCO-Ds"],"app":"steemit/0.1","format":"markdown"}
created2017-11-18 21:36:36
last_update2017-11-18 21:39:30
depth0
children4
last_payout2017-11-25 21:36:36
cashout_time1969-12-31 23:59:59
total_payout_value6.610 HBD
curator_payout_value1.964 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,202
author_reputation75,759,505,276,179
root_title"Building a timelapse slider rail with Arduino - Part 3 - LCD Display"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id20,816,288
net_rshares3,846,742,194,572
author_curate_reward""
vote details (56)
@andy23
Cool. :)
properties (22)
authorandy23
permlinkre-markangeltrueman-building-a-timelapse-slider-rail-with-arduino-part-3-lcd-display-20171118t215611759z
categoryphotography
json_metadata{"tags":["photography"],"app":"steemit/0.1"}
created2017-11-18 21:55:12
last_update2017-11-18 21:55:12
depth1
children0
last_payout2017-11-25 21:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation65,119,270,641
root_title"Building a timelapse slider rail with Arduino - Part 3 - LCD Display"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,817,417
net_rshares0
@lighteye (edited)
Most interesting project @markangeltrueman, hardly can wait to see the final product and the movies made with it :)

@originalworks
馃憤  
properties (23)
authorlighteye
permlinkre-markangeltrueman-building-a-timelapse-slider-rail-with-arduino-part-3-lcd-display-20171118t222952695z
categoryphotography
json_metadata{"tags":["photography"],"users":["markangeltrueman","originalworks"],"app":"steemit/0.1"}
created2017-11-18 22:30:00
last_update2017-11-18 22:31:48
depth1
children1
last_payout2017-11-25 22:30:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length131
author_reputation614,159,397,412,985
root_title"Building a timelapse slider rail with Arduino - Part 3 - LCD Display"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,819,596
net_rshares246,723,321
author_curate_reward""
vote details (1)
@originalworks
originalworks
The @OriginalWorks bot has determined this post by @markangeltrueman to be original material and upvoted(1.5%) it! 
<center>![ezgif.com-resize.gif](https://steemitimages.com/DQmaBi37A5oTnQ9NBLH8YU4jpvhhmFauyvgg3YRrEJwskM9/ezgif.com-resize.gif)</center> 

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
properties (22)
authororiginalworks
permlinkre-re-markangeltrueman-building-a-timelapse-slider-rail-with-arduino-part-3-lcd-display-20171118t222952695z-20171118t223307
categoryphotography
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-11-18 22:33:09
last_update2017-11-18 22:33:09
depth2
children0
last_payout2017-11-25 22:33:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length358
author_reputation79,292,026,602,057
root_title"Building a timelapse slider rail with Arduino - Part 3 - LCD Display"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,819,798
net_rshares0
@photo-trail
Full support @markangeltrueman!
properties (22)
authorphoto-trail
permlinkre-markangeltrueman-building-a-timelapse-slider-rail-with-arduino-part-3-lcd-display-20171118t223101009z
categoryphotography
json_metadata{"tags":["photography"],"users":["markangeltrueman"],"app":"steemit/0.1"}
created2017-11-18 22:31:09
last_update2017-11-18 22:31:09
depth1
children0
last_payout2017-11-25 22:31:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation30,503,178,530,838
root_title"Building a timelapse slider rail with Arduino - Part 3 - LCD Display"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,819,673
net_rshares0