Binary Clock / Website Update

Arduino

Last night, I was trying to rapidly prototype my clock and I screwed up.

In my rush, I didn’t add resistors, and I used to much voltage. I’d previously learned that you need 5v (No less) to read the RTC. I also knew that if I powered the Pro Mini with 4.5V, it may not function correctly. I decided to wire 4 AA Batteries (6V) to power the Pro Mini.

I did not know that the Pro Mini does not have the same circuitry for power that the Uno does. By this I mean that you can supply an Uno with 5-12V, and it will only output 5V from the pins. The Pro Mini will push whatever voltage you put into it out of the pins.

Where I powered it on, it work briefly. I then heard a hissing, and then a POP and the project turned off. The Pro Mini is cooked, and the LEDs are burnt out. I’m lucky I didn’t blow the RTC.

For this reason, I’ll be using a Arduino Nano instead. I will use the USB port for power supply. I’ve also found the serial port is important for setting up the clock and verifying the time, so that will be nice.  Next, a few people told me that the way I had the clock set up was interesting, because binary is read the other way

binaryclockexampleFrank explained to me that binary is read the opposite way. Much like Hex-decimal, the lease significant digit is on the right. For example, 37 is actually 100101. Above I have it backwards. I am planning on altering the design. Instead of altering my code, I’ll just wire it in reverse.

The LEDs I use will be blue. I prototyped with 270 ohm resistors, but I think I will use 560 ohm to make them a bit dimmer. I may also experiment with charlieplexing or multiplexing to save more power.

Lastly, the website menus and pages will be changed. I would like to do more articles, and maybe even revisit the penny drop.

Advertisements

Binary Clock is finished!

Arduino

Even I surprised myself in how quickly I turned this project around…

I’ve been looking at different concepts for weeks now, and even made a few designs. At no point did I sit down and try a code it, or try and work on it. The coding didn’t take long at all, I’ll upload it to the page when the project is finish. Here it is:

The time shown is 1:38.

It’s hard to tell what you’re looking  at, but first make it work and then make it pretty. When I have this moved into a permanent enclosure with all the soldering done, I’ll make a page with the entire process, parts list, code, and loads of photos.

For now these posts will float around in the updates and LED Matrix clock list because I don’t have the time right now to redesign my site.

Binary Clock

Arduino

Between school and delays in the KSP Controller project, I decided to challenge myself and see how quickly I could finish a project I started forever ago. This project is the binary clock.

The clock will receive the time from a DS1307 (A realtime clock powered by it’s own battery) and then turn that time into binary shown by LEDs. The idea is to have it small and compact, while running off of 3( or 4) AA batteries. The Arduino Pro Mini will work nicely.

Onto the clock itself. It will feature two rows: one for the hour (4 LEDs) and one for the minutes (6 LEDs).  This will use ten pins. I considered adding seconds to the clock, but I think it would change to fast and wouldn’t give you time to read it. I think it would be neat if I could engrave the face of the clock as well with a laser cutter. I have not decided what colour the LEDs will be either.

I’ve begun prototyping already along with a bit of coding as well. The hours works on the initial test, and the next step is to have to our update with the data from the RTC. The code I found has minutes and hours as callable variables, so I should be able to use if, else if, and else to get data and then write it to the LEDs. Another thing to consider is that RTC uses 24 Hour time. I will have to find a work around for that, but it should be quite simple.

I would love to see it laid out on a breadboard by the end of the week.

 

v0.6

Arduino

The coding turned out to be rather simple for the display. After getting a working product, I packed it up for the night. The next day, KSP no longer detected my controller. I had been playing around with the serial port on my Arduino with other code, so I might have messed it up there. I also tried using an Android app to write code on the go, but it caused problems when I put it into the Arduino program. Those combined may have done it in. However, I did get it working to some degree, so v0.6 is done. At this point, a few modifications have been made to the plan.

1. I will not be using resistors to form a menu. it takes up a lot of space, and does not work well with my Arduino clone. I will have have simple menu system using individual pins.

2. Precision mode will be added. Although it is not currently supported, it should be soon. This switch will replace the action group buttons. I think the keyboard keys work fine. I have a stage button already, so I don’t think I’ll need the others.

3. Five buttons connected to the Analog pins will be used for controlling the display as shown. This should make things easier. I can always go back later and save pins.

modeexample

I’m quite proud of my mspaint skills…

My main objective is to get my code working again. I will post an update on how I got the plugin working again. v0.7 will be the menu system. As show in the photo, the five modes will be static buttons opposed to the menu system I originally wanted. I think it was getting a bit to complex, so this way it will be simpler. Once again, I can go back later once it’s working and try using resistors, as well as a menu system with a lot more modes.

The Start of the KSP Controller

Arduino

Alright, so I’ve been working heavily on an new Arduino project lately. It’s a custom controller for KSP. Here’s a rundown of what has happened so far:

v0.1

I was thinking that it would be fun to build an arcade stick for my PC, so I started research. I found KSP controllers, and decided to start on one.

v0.2

Started looking into how you could get inputs to KSP. My original idea was to have the Arduino output keyboard values. Then I found Zitronen’s KSPIO plugin. I started reading the comments and working with the code and tutorials.

v0.3

The plugin allows for outputting values to a display. I hooked up my never used 16×2 LCD Display and started learning all I could about the LiquidCyrstal libraries.

16x2 LCD

The 16×2 Display. I also have a green/black on the way.

v0.4

I drew up a few concepts and wired one up using the example code. I also decided and limited myself to what was going to be on the board. I decided:

  • 5 Switches (RCS, SAS, GEAR, LIGHT, BRAKES)
  • 1 Saftey Switch (ABORT)
  • 1 Green Button (STAGE)
  • 1 Black Button (Mode button for Display)
  • 4 Black Buttons (Action Groups 7, 8, 9, 10)
  • 1 16×2 LCD Display (Blue Backlight with White Text)
I cut some holes and fit the switches in.

I cut some holes and fit the switches in.

v0.5

Soldered the first prototype switch. When the switch is off, a red led is active. When the switch is on, a green led is active.

IMG_0221

Switch Prototype

IMG_0220

Rough Circuit Drawing

 

v0.6

This is where I’m at. I am currently trying to get values sent by the plugin onto my display. The code is difficult to manipulate to my liking. I’ve been asking on forums to see peoples working code. The goal is to have a working 16×2 display soon. I will post once it is solved.


Future Goals


v0.7

Code a menu system for the display, so that multiple modes are available. Such as Landing, take off, flight, etc. Displays data from KSP, tested and working. I may incorporate a design that uses five buttons and resistors. Code is complete and working.

v0.8

Code the buttons and switches. Tested and working.

v0.9

Final design. Arrange parts and design the layout. Soldering will be done here, and I need to figure out how to mount everything and hold it together. I’ll laser cut hardboard and paint it.

v1.0

Fully assembled, and coded. Begin debugging and optimization.

 

I’ll try to update this after every stage. Next one being after v0.6 is complete.