Car LCD clock

I want to have a small, bright LCD car clock, visible in the sun (I’m in AZ). There are many LCD clocks for cars, but they’re mostly of that wimpy black-on-gray LCD kind which is barely visible, even if back-lit. I’m looking at your white 4-segment LCD unit: https://www.sparkfun.com/products/11629 I don’t need any interaction with the display (besides setting the time), I just need a basic time display. The description says that it can be programmed “stand-alone operation”. My questions:

  1. Is it possible to program it to work as a self-contained clock, with no Arduino driving it?

  2. Is there an already-existing code or sketch that does it?

  3. Which of these the colors (white, red, blue etc) is the brightest? I really have to fight hard against AZ sun.

Thanks.

Greetings, thank you for postings.

1: This is possible, however, without using a real time clock every time you cycle power the “clock” code would probably reset to a default position, probably “00:00” depending on the code.

2: I am sure there is. Simply Google “Arduino real time clock LCD” and you should be able to find similar projects.

3: I don’t really know which is “brightest” as all of the segments are diffused due to the front panel. I would say they are all equally bright as far as the naked eye is concerned. Technically, some colors will be brighter than others. Generally speaking, the color white is produced when red, green and blue are on simultaneously so it should, in theory, be the brightest. I am not 100% sure with these diodes as build means a lot and each diode has different electrical characteristics.

I hope this helps.

Oh, just to reiterate. The serial 7-semgent has an ATmega328 chip built in which is the same chip used for the Arduino Uno and Redboard, so it is essentailly an Arduino by itself, however, you will need a USB to serial converter device to upload a sketch to it. It can be found here:

https://www.sparkfun.com/products/9716? … BEQAvD_BwE

See the tutorial for more information:

https://learn.sparkfun.com/tutorials/us … l#assembly

Using the 7-segment without an Arduno will require modification of Arduino code.

Thanks. I ordered the white one. I already have the Beefy, I assume it will work to program the 328 https://www.sparkfun.com/products/13746

Is there a pin on the 7-seg LCD that can be “read” or “detected” by the 328 code? To set the time without an Arduino, I wanted to have a small momentary switch which closes a pin. If the code detects the pin closed, it will set the time forward progressively faster (first by one minute slow, then faster, then hour - I think you know what I mean)

I’ll need more help. I want to display some sample chars on the 7-seg display by using code uploaded directly onto its ATMega328. I followed your instructions to install the 7-seg display as a board in Arduino IDE (https://github.com/sparkfun/Arduino_Boards) . Sparkfun 7-seg is installed in my Arduino IDE as a board, and selected for upload to the correct COM (COM4):

https://funkyimg.com/i/36LJw.jpg

https://funkyimg.com/i/36LJG.png

I’m using your Beefy 3 for UART communication (I also have your 5V FTDI cable if needed https://www.sparkfun.com/products/9718). The Beefy hooked up as follows:

https://funkyimg.com/i/36LJZ.jpg

https://funkyimg.com/i/36LK2.jpg

Below is the code I upload (set the brightness to max, display sample characters). I see the LEDs flashing on the Beefy as the code is uploaded , but nothing happens on the display. Is the code wrong?

void setup() {
  Serial.begin(9600);
  Serial.write(0x7A);
  Serial.write(100);
}

void loop() {
  Serial.write(0x01);
  Serial.write('2');
  Serial.write(0x0A);
  Serial.write('B');
  delay(1000);
}

You are running the program on the LED board itself. Therefore, it needs to talk to the LED segments directly. Looking at the code for the board at https://github.com/sparkfun/Serial7Segm … y_Firmware they are using a library at https://github.com/sparkfun/SevSeg to handle the display.

I would start with the SevSeg library to get the display working. Then add your RTC software. Think of the board as simply an Arduino with a 7-segment display connected to it.

/mike

Thanks, I think I follow. Let me know if I misunderstood something.

“Serial_7_Segment_Display_Firmware.ino” - this is Sparkfun’s firmware: the code that’s on the ATMega328 of the 7-seg display (as sold by Sparkfun). It includes stuff not needed for my project (I2C, SPI comm). It uses the “SevSeg” library to work. For my project, I need to change the “Serial_7_Segment_Display_Firmware.ino” code: add the real-time clock code, remove the unneeded comm stuff (I2C, SPI). It will still use the SevSeg library.

That would work but I would start with one of the examples in the SevSeg library; it will be easier as there’s a lot of stuff in Serial_7_Segment_Display_Firmware.ino that is not needed for this project.

Look at https://github.com/sparkfun/SevSeg/blob … ounter.ino - you will likely need to change the pinout to match what is in Serial_7_Segment_Display_Firmware.ino.

/mike

Thanks, I got the clock working on the ATMega328 (24 h time display: 21:58)

https://funkyimg.com/i/36MGd.jpg

One more question. I’ll add a single-button time adjustment (longer press, faster adjustment etc). The 7-seg display has two analog pins A6, A7. To use them with a momentary switch, should I set one of these pins to INPUT_PULLUP and wire the pin to VCC via a momentary switch, so that the ATMega328 can recognize two states on the pin with analogRead (“high” and “low”)?

Looks great! Glad to see it coming together.

I don’t believe A6 or A7 have internal pullups; I would use an external resistor for that (something in the 4.7k to 10k range would be perfect). You will need to do an analogRead and test the return value. Checking > or < than 127 should be fine. If you need more than 2 buttons, there are tricks you can do to put them all on one analog input by having the button select one of the two resistors in a voltage divider.

/mike

Thanks, everything works. I added an RTC “backpack” with a button cell to remember time. I think I’ll get away with just one switch for adjustments.

https://funkyimg.com/i/36PNc.jpg

Nice, looks like lots of progress to me!

I hope the 7-segment is bright enough for your needs. You could put it in a sort of recessed box so that the sun is not directly phasing the light out. I think just using a small cardboard box a few inches deep might work, or for something more durable you could use a metal or plastic enclosure instead.

Always a pleasure to see SparkFun products implemented to solve a real world problem!

https://funkyimg.com/i/36QHC.jpg

Yes, I already made a kind of a “hood” out of black card stock, pointed at the driver. I just realized I used hot glue for the RTC backpack, In AZ, the dashboard in a locked car can probably reach 140-150 deg. I’ll re-do it with high-temp glue.

Ah, good observation! The average hobby glue might not cut it in that intense heat for sure. Whatever glue you do decide to go with make sure it is not conductive.

The clock works fine in a car, but I temps are high. I 3D-printed the clock’s “visor hood” in PLA plastic. In a locked car, near the dashboard, the AZ sun warped it in 1/2 hr (left pic). I checked the glass trans. temp for PLA (when it becomes soft, but not liquid): 50-55 deg C (122-131 deg F). I had the hood re-printed in ABS plastic (glass trans. temp 90 deg C, or 194 deg F): right pic. It should work.

https://funkyimg.com/i/376ES.jpg

https://omnexus.specialchem.com/polymer … emperature