1976 Puch Maxi - APuchalypse Now

r0H4xZO.gif
 
OK... a little Arduino 101 for those folks who aren't inclined toward electronics and/or programming.

The code listed above is in the C language and makes use of some pre-written libraries specifically for use with the Arduino.

There are three functions, one of which is 100% necessary. By convention, the Arduino will look for the setup() function and run that as soon as the hardware is ready to go. setup() is optional. Following that, it will run the loop() function continuously (as fast as it can) until the Arduino is powered off. The loop() function is not optional. The speedoTrigger() function is one I created and then configured to be called when the interrupt occurs. An interrupt is how outside inputs get introduced into the electronics. As the name suggests, the code will stop running, wherever it may be in the process, and immediately handle the interrupt. The same thing happens on your phones and home computers every time you press a key, move the mouse, etc.

Interrupts should be handled as quickly as possible, so keep the code short and sweet. In this case, we just change the value of the 'triggered' variable to true so that the main execution of the loop() function (when it resumes) knows that the magnet on the spoke has passed by the sensor. We then make use of the millis() function in the Arduino library to get the number of milliseconds that have passed since the Arduino started running. This value gets compared to the last time we checked millis() to determine how much time has passed since the trigger was last activated. A bit of math and we're able to convert the elapsed time and the wheel circumference into miles per hour. The mph value is then piped off to the nixie tube(s). The heavy lifting for making that happen exists within the NixieTube library referenced at the top of the code file.

If I were working with a faster vehicle, I'd probably swap from the millis() function over to the micros() function for increased resolution. The millis() function should be good until around 70mph and I don't have to worry about overflow (this happens when you run out of room to count the number of milliseconds and it needs to start back at zero) since it would take several days of continuous running for that to happen. micros() would overflow every 70 minutes or so and the code would probably need to handle it.
 
Sonreir said:
The plan is to utilize the Hall sensor and ditch the unit.

At first I thought, "why not just buy a sensor from Digi-Key?" Then I clicked through to eBay and saw the price. Ha ha.
 
Bicycle speedos arrived in the mail today. Looks like they're not Hall sensors at all, but rather reed relays. Should still work.

After a bit of trial and error I got a setup that will trigger the LED light on the Arduino when I run the magnet past the reed relay.

Step one complete.
 
Holy mopedtastic. Sorry I'm late to the party.
Where will you fit the Van de Graff generator?
 
Proof of concept for my speedo code appears to have borne fruit.

The code starts the timer at 99 and counts down by one every second.

Now to hook it up to the speedo sensor. ;)
 

Attachments

  • 2015-11-09 001.JPG
    2015-11-09 001.JPG
    943.7 KB · Views: 316
Sonreir said:
Proof of concept for my speedo code appears to have borne fruit.

The code starts the timer at 99 and counts down by one every second.

Now to hook it up to the speedo sensor. ;)

Sorry to be dim, but why? Is that how long there is til the 'ped spontaneously combusts and at the same time releasing a zombie frying electromagnetic pulse?
 
Erskine said:
Sorry to be dim, but why? Is that how long there is til the 'ped spontaneously combusts and at the same time releasing a zombie frying electromagnetic pulse?

It's just a test to ensure I can control the lighting on the Nixies. Next version will be the speedo itself.
 
The main parts are back from paint and powder.

Time to install the sealed bearing swap on the hubs and then lace the rims.
 

Attachments

  • 2015-11-11 001.JPG
    2015-11-11 001.JPG
    1.1 MB · Views: 309
I'm surprised that your wife wouldn't want a CT90,it's so similar to a moped but with that strong 4 stroke clean burning motor :D
 
grcamna5 said:
I'm surprised that your wife wouldn't want a CT90,it's so similar to a moped but with that strong 4 stroke clean burning motor :D

She's not a fan of motorcycles. I think she's convinced herself the Puch is more like a bike than a motorcycle.
 
Sonreir said:
She's not a fan of motorcycles. I think she's convinced herself the Puch is more like a bike than a motorcycle.

Wait until she rides the one you are building!
 
Sonreir said:
She's not a fan of motorcycles. I think she's convinced herself the Puch is more like a bike than a motorcycle.

I think I get it,possibly 'the pedal thing'.
I think pedaling is very healthy.I miss riding my bicycle,no excuse:I just stopped riding for a while to my own detriment,now I have to go to the Dr. and pharmacy more... ::)
 
I do have are a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for people like myself.

In this particular case, my skills involve ordering only one set of spokes instead of two sets.

Anyway... with the parts back from color I laced up the rear wheel and started bolts bits back on to the frame.

Still waiting on another set of spokes to finish up the front wheel and a piston ring before I close up the engine.

Not pictured is the new three shoe clutch that went into the motor this evening.
 

Attachments

  • 2015-11-12 001.JPG
    2015-11-12 001.JPG
    194.7 KB · Views: 307
  • 2015-11-12 002.JPG
    2015-11-12 002.JPG
    837.2 KB · Views: 304
Goodbye old loose ball bearings. Hello new sealed bearings.

ID of the hub was a strange 29mm and bearings only came in 28mm OD, so some .020" stainless tattoo gun springs and the judicious use of a grinder made up the difference.
 

Attachments

  • 2015-11-15 001.JPG
    2015-11-15 001.JPG
    787 KB · Views: 304
Back
Top Bottom