Can't get clock to work

I have been doing this project:

and I can’t get the buttons to change anything.
When I plug in a usb lead from my pc, the MAX7219 led display lights up, then goes off. The voltage reading is 4.78 volts on the breadboard +vcc and -vcc or ground, and is the same across the pins on the RTC DS1307.

Here I am a bit confused, because the input voltage is 5v, but the RTC is powered by a 3.2v battery.

What should I be getting?

I can’t see anything different between what I have below and the schematic of the wiring etc

The RTC battery is used only when the 5v fails.

Show us a good schematic & image of your circuit wiring.
Posting images:

Use CTRL T to format ‘your’ code.
Attach ‘your’ complete sketch between code tags.
[code]Paste your sketch here[/code]

Schematic of the project included

The code is more than 9000 characters long so I can’t upload it

The code is in the link I posted, about halfway down.

MAX7219 Dot Matrix 4-in-1 8x32 dot matrix common cathode.jpg

I can't get the buttons to change anything.

Write a simple program to test just the buttons, and make sure that they work, as the program expects them to work.

You can attach the .ino file.

MAX7219 Dot Matrix 4-in-1 8x32 dot matrix common cathode.jpg

And your wiring?

Have you checked out each hardware item separately to confirm they work?

I uploaded a picture of my wiring in my initial post, but here it is again.

I have tried to make the wiring clear by using as many different colours as is used in the schematic.

larryd:
You can attach the .ino file.

And your wiring?

Have you checked out each hardware item separately to confirm they work?

No Ihaven’t, and not sure how I would do that, unless you mean by what voltage to each component.

MAX7219_RTC_dht11.ino (12.1 KB)

Picture of wiring:

Until you have separately verified proper operation of each component of the project, there is no point in jumping into the deep end of the pool.

There are simple test programs available for each one. Use them.

jremington:
There are simple test programs available for each one. Use them.

Where are these simple test programs, in the code?

you have the inputs set as INPUT_PULLUP
you have the buttons connected to +5VDC
pressing those buttons causes no change
ergo your system does nothing
exactly as it is told to do

either make it just INPUT without the _PULLUP
or connect the common lead of those switches to ground
and rethink those three resistors

Under examples in the IDE you can find support sketches.

Not a great idea to plug wires without Dupont pins into headers.

Do you mean in the sketch or in my wiring.I tried to wire it as per the schematic and picture, but it seems it is not.

larryd:
Not a great idea to plug wires without Dupont pins into headers.

The wire plugged into some of the headers are single core stiff wire, and the rest of them are supposed to be Dupont pins

Changing INPUT_PULLUP to just INPUT didn't make any difference.

The 10k resistors are what the author of the project used, and I wouldn't know what other values to use.

the best graphic available for this:

a snippet of your code:

  pinMode(3, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
  pinMode(5, INPUT_PULLUP);

that photo again:

MAX7219 Dot Matrix 4-in-1 8x32 dot matrix common cathode.jpg

you have the code set up for internal pullup and the wiring set up for external pulldown

disconnect the wires from 3, 4, and 5 and connect the pins to ground, one at a time, with INPUT_PULLUP.

I find that shorting pins directly to ground introduces drama. I prefer to short pins with a 47 ohm resistor in line.

I removed the 10k resistors 1 at a time and connected the same pin of the button to ground and tried the buttons. Whilst doing this the MAX7219 led board lit up rather haphazardly.

Now all three buttons are grounded, and when the MAX7219 board goes off, when I press each button, the Arduino goes off, ie the led on light goes off, and whenreleased the led board lights up occasionally, and only partly. Then when I press another button, the leds go off.
It's a bit sporadic at the moment. Oh, and the wires to the buttons from pins 3,4, and 5

Just so you know, I have made or done 2 projects , 1 with 3 buttons for an led setup, and an0other with 4 pieces of hardware, where both worked first time.

Like this:
switches.png

Sorry, I'm not sure what you mean when you say 'Like this'

If you mean: have I grounded all 3 buttons together, like from gnd pin on button 1 to same on button 2 and again onto button 3 gnd pin. Also grounded button 3 to the gnd rail, so all 3 buttons are grounded.

When I plug in the usb cable from my pc the voltage reading is 3.25v initially,the MAX7219 lights up, then rises rapidly to 4.8v where the MAX7219 does not light up.

Connecting the buttons to pins 2,3 and 4 on the arduino , then powering up the board, the MAX7219 lights up, the voltage is around 3.9v then rises rapidly to 4.9v where the leds go off on the MAX7219.

I have noticed that if the volatge is at around 3.25v, the MAX7219 does light up, but goes off when the voltage rises to 4.8v

Update:
I stripped everything down and rebuilt the project, and now the MAX7219 does display a time of sorts, and the violtage is steadyish at 2.3v plus or minus. Pressing each of the buttons turns the arduino off, leds go out, releasing the buttons brings it back on and the MAX7219 shows some sort of a time. But that is all it does for now..

The voltage has now dropped to 1.7v

Further Update:

Replacing the 10k resistors back onto the breadboard, now keeps the voltage steady at around 1.6v.I have also replaced to jumper wires between the gnd side of each button to the appropriate pin on the arduino Pressing each of the buttons
now does something now, and now need to find out what each button is supposed to dol.