OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
So while my Day Job mostly involves breaking things and broken things (I'm an InfoSec/ITSec consultant), one of my side interests for several years running has been Internet of Things (IoT) security, mostly because it's a never-ending train wreck of Fail and keeps getting worse as the scale (and with it, the attack surface) continues to grow.

And one of the reasons that it never ends is because when it works, the things you can do with it are pretty freakin' amazing. Like, in my case, gather and analyze detailed telemetry off a scooter in realtime.

Which leads me to The Ves-pi Project.

I may not have a lathe or a Bridgeport or a HAL9000 tri-axiall mill, but I *do* have a soldering iron and a keyboard and, much like my Dremel, there's not much I won't try with them. Some of this is going to be a little technical, but I'm going to deliberately try to keep things high level to start and if people want me to get into the nitty-gritty, we can do that, too.

So using a Raspberry Pi Zero W, which is a tiny (a little bigger than a AA battery) Linux server and several sensors, I've built a telemetry capture setup for detailed capture and (eventually) visualization & analysis of:
- Throttle position (Idle-WOT as %) -- use a Potentiometer (aka a "pot," or more commonly, "a dial") plugged into an Analog-to-Digital (A2D) converter
- Gear (1N234) -- another pot, attached to the selector box, on a second channel of the A2D
- Clutch (in/out) -- A simple momentary button, either on the lever or, assuming I can work out a good attachment point & method, the clutch arm itself
- RPM's -- I'm using an OptoElectric sensor plugged into the AC feed off the stator, which gives me complete isolation from voltage spikes, but I'm also going to try and build an induction sensor I could wrap around the plug wire and/or use a Hall Effect sensor and put a tiny magnet on the flywheel.
- CHT -- simple temperature probe, same principle as a "regular" CHT
- EGT -- Same thing, just haven't built it yet because I still need to test if my existing EGT probe will work with my temperature sensor board)
- Speed (via GPS)
- Position (latitude/longitude/altitude) (GPS)
- Acceleration -- Dedicated Accelerometer

The Pi captures all of it multiple times per second, then uploads it in realtime via wifi to my phone up to a Timestream database in AWS (Amazon Web Services, aka "The Cloud") via their IoT-Core service. I'll also be building a dashboard in the near future for viewing and analyzing the data (not to be confused with a physical dashboard on the scooter itself).

I'll have to experiment with capture rates, but I'm thinking five times per second and I could go significantly higher on everything but the GPS, which can only feed me updates about ten times per second due to limitations in how GPS'es communicate (they use a serial protocol at 9600 bps) if I so chose.

I also built a marker button (momentary switch) for noting interesting events--something interesting happens, hit the button and it logs the time for easy post-review--and a capture interval button (on/off switch) for capturing that a range will be interesting, e.g. specific performance testing. I may also use that as a trigger to up the sensor capture rate, say to 10/second.

I'll also be adding some additional signals and instruments for things like temperature spikes and delta, gear indicator, acceleration, maybe a temperature anomaly warning (i.e. "it's running hotter than usual for the current throttle/gear/speed), etc. that will use a combination of direct analysis on-board as well as getting alerts back from AWS

As of right now, I've only gotten so far as prototyping the sensors on breadboards, written all the code to capture and stream the data up to AWS and receive alerts back. As soon as some wiring arrives (should have been here yesterday, now arriving today or tomorrow) I'll be able to solder everything together properly, then install it on the GL and start capturing some real data to build the dashboard.

I still need to decide exactly how I want to build the dashboard, and may still switch databases to use ElasticSearch or OpenSearch and a Kibana dashboard, but that can be the subject of a separate post once I've had a chance to play with them and do a little more research.

All my custom code is written in Python and once I've had a chance to test it all out and add error handling (it doesn't have much currently), I'll share a link to my git repository. I'll also pull together the parts list and wiring diagram at some point, too.


One final note: While an Arduino (another kind of embedded computer) would in theory be slightly better suited for this, I went with the Pi because it doesn't need a separate controller to handle the MQTT (telemetry), it can handle more complex onboard operations, and it's a LOT easier for me to develop on.
VERY much a Prototype.  Testing the OptoElectric coupler as a tach.
VERY much a Prototype. Testing the OptoElectric coupler as a tach.
The brains of the operation.  The Pi Zero, not the battery.
The brains of the operation. The Pi Zero, not the battery.
@lynnb avatar
UTC

Ossessionato
1963 VBB2T
Joined: UTC
Posts: 2542
 
Ossessionato
@lynnb avatar
1963 VBB2T
Joined: UTC
Posts: 2542
UTC quote
This is going to be interesting, I did computer engineering back in the late 80's but of course the market was flooded and there was no money in it unless you wanted to relocate , I loved this kinda stuff back then.
@birdsnest avatar
UTC

Not So Moderator
VNB VSC 09C VMA VSX - vbc vmb
Joined: UTC
Posts: 7953
Location: Hustletown, TX
 
Not So Moderator
@birdsnest avatar
VNB VSC 09C VMA VSX - vbc vmb
Joined: UTC
Posts: 7953
Location: Hustletown, TX
UTC quote
Super interesting.
You guys keep raising the bar.
(I just keep drinking at the bar)
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
This idea has been kicking around my head for years, I just never got around to doing it.

In the course of my research, I found some folks who have done similar things to add better instrumentation to vintage muscle cars, but none of them seem to be doing any data capture and analysis, just building a better instrument cluster.
@qascooter avatar
UTC

Ossessionato
79 P200E (Ruby), 62 Allstate (B-62)
Joined: UTC
Posts: 4168
Location: Florence, OR
 
Ossessionato
@qascooter avatar
79 P200E (Ruby), 62 Allstate (B-62)
Joined: UTC
Posts: 4168
Location: Florence, OR
UTC quote
Very cool - following!

Popcorn emoticon
⚠️ Last edited by qascooter on UTC; edited 2 times
@safis avatar
UTC

Ossessionato
1979 P150X, 1983 P200E, 1987 PK125XL Elestart, 1988 T5, 1995 PX200E, 2011 Yamaha Fazer 600 S2
Joined: UTC
Posts: 4113
Location: Veria, Greece
 
Ossessionato
@safis avatar
1979 P150X, 1983 P200E, 1987 PK125XL Elestart, 1988 T5, 1995 PX200E, 2011 Yamaha Fazer 600 S2
Joined: UTC
Posts: 4113
Location: Veria, Greece
UTC quote
Nice! You're taking it to the next level. All I did was experiment a bit with an Arduino…

https://modernvespa.com/forum/post2210949#2210949
@jkj-fz6 avatar
UTC

Ossessionato
BV400, Primavera 150, Yamaha Zuma 125
Joined: UTC
Posts: 4204
Location: Twin Cities, Minnesota
 
Ossessionato
@jkj-fz6 avatar
BV400, Primavera 150, Yamaha Zuma 125
Joined: UTC
Posts: 4204
Location: Twin Cities, Minnesota
UTC quote
Cool! Having dabbled in a few Pi and Arduino projects I can appreciate the ingenuity and work you're putting into this. Clap emoticon
@popgunandy avatar
UTC

Hooked
61 VBB 76 Rally 200 79 P200 80 Sport 100
Joined: UTC
Posts: 288
Location: Folsom CA
 
Hooked
@popgunandy avatar
61 VBB 76 Rally 200 79 P200 80 Sport 100
Joined: UTC
Posts: 288
Location: Folsom CA
UTC quote
Love it...first thing that came to mind is that the Apollo project put men on the moon with less! That blows my mind.
UTC

Addicted
1968 VBB150
Joined: UTC
Posts: 686
Location: OC
 
Addicted
1968 VBB150
Joined: UTC
Posts: 686
Location: OC
UTC quote
Very cool!

I would love to have an led on the headset that changes green yellow blue based on temp. Can it be done? I also think something like what you are doing would be a marketable item. Especially for tuning purposes.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
dsnyder586 wrote:
Very cool!

I would love to have an led on the headset that changes green yellow blue based on temp. Can it be done? I also think something like what you are doing would be a marketable item. Especially for tuning purposes.
Yup. RGB Indicator LED's which can show any color on the fly for temp value and rate of change are already on the to-do list, just not ordered yet.

There's also the question of where I'm going to locate it in the longer term. The glovebox was my initial thought, but I may need to figure out how to squeeze it into the headset and run a big writing bundle back to the motor if I'm going to have anything but they most trivial headset display.

I don't know if it's marketable or not. I think installation would be too much for most people, and that's before we even get into manufacturing, support (it's tiny, but it's a full-blown Linux server), etc.

SaFis, which sensor board did you use for your EGT sensor? And is it just a "normal" EGT?
@pheasant_plucker avatar
UTC

Molto Verboso
bare metal cafe racer
Joined: UTC
Posts: 1379
Location: Aotearoa (New Zealand)
 
Molto Verboso
@pheasant_plucker avatar
bare metal cafe racer
Joined: UTC
Posts: 1379
Location: Aotearoa (New Zealand)
UTC quote
Love it. Appreciate the glitching.

Wondered if the Motogadget Motoscope Pro could be the HUD to use. Pretty expensive but has a half decent form factor to replace standard Vespa speedos - have seen them in Vespas plenty, especially Scooter and Service customs. But it seems like it is versatile and fairly user configurable. The break-out box cabling would mean you could stick to the glovebox plan.

https://motogadget.com/shop/en/motoscope-pro.html
@jackytwoshoes avatar
UTC

Enthusiast
'13 LML '70 Sprint Veloce
Joined: UTC
Posts: 92
Location: London
 
Enthusiast
@jackytwoshoes avatar
'13 LML '70 Sprint Veloce
Joined: UTC
Posts: 92
Location: London
UTC quote
Sounds great! I've always been fascinated by the prospect of using speeduino to control ignition curves and potentially fuel injection..
UTC

Addicted
1968 VBB150
Joined: UTC
Posts: 686
Location: OC
 
Addicted
1968 VBB150
Joined: UTC
Posts: 686
Location: OC
UTC quote
It's way beyond my pay grade, but could you run data over the existing copper power wires? Processing can be done in the rear and the only data would be feeding the readout info?
UTC

Ossessionato
Vespas 1964 GS160, 1965 SS180, 1977 V9A1T, 1983 PX150E
Joined: UTC
Posts: 2537
Location: Siam
 
Ossessionato
Vespas 1964 GS160, 1965 SS180, 1977 V9A1T, 1983 PX150E
Joined: UTC
Posts: 2537
Location: Siam
UTC quote
The Stone Age meets the Digital Age. Let's convert that Model T to hydrogen power.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
dsnyder586 wrote:
It's way beyond my pay grade, but could you run data over the existing copper power wires? Processing can be done in the rear and the only data would be feeding the readout info?
No, that's not an option here for multiple reasons, not least of which being that each sensor needs its own connection to the IO Bus of the Pi.

Ethernet-over-power solutions (not to be confused with Power-over-ethernet, or POE) are all kind've a hack even on a good day.

If I were really concerned, I'd probably figure out a bluetooth link or something.
@steelbytes avatar
UTC

Veni, Vidi, Posti
2019 GTS300 Supertech E3 57,000km
Joined: UTC
Posts: 5118
Location: Batmania aka Melbourne, Australia
 
Veni, Vidi, Posti
@steelbytes avatar
2019 GTS300 Supertech E3 57,000km
Joined: UTC
Posts: 5118
Location: Batmania aka Melbourne, Australia
UTC quote
Interesting.

I made my own android app to bluetooth to my Supertech for data logging etc. (The official Vespa app was buggy and limited). So obviously less work as the bt hardware is already in the bike.

Interestingly you say you get gps updates in the pi several times a second as I was unable to cajole android to give me gps more than once per second. :shrug:


PS Pretty sure my app also works on *some* of the other Piaggio bikes and scoots as they use the same BT data protocol for many of them


https://play.google.com/store/apps/details?id=com.steelbytes.vespasnoop
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
I'm less interested in an app at the moment, but will probably build something that's mobile-friendly using native features of whichever dashboard I eventually settle on--that's one of my selection criteria.

One nice thing about using a GPS breakout board connected to the Pi is that the limit for how fast I can hit it is the serial protocol's line rate. The Pi could do 115,200bps, but I'd have to find a GPS that could do it, and I'm not sure it matters since 10/sec is a plenty fast read rate for me.

With Android, they're trying to save you from poorly-implemented apps that keep the radios hot all the time and kill battery life--which GPS beats up enough as it is.

I haven't done any meaningful protocol reverse engineering in too many years, but it was certainly fun when I did it. Reversing application-level protocols, e.g. the API for an app, is less fun, but frequently more interesting--and "interesting" is never something you want to be when it's a security person talking. Razz emoticon
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
Plug all that data into gsf Dyno.

When you get the pnp kit together I'll buy one!
@oopsclunkthud avatar
UTC

Banned
3:5
Joined: UTC
Posts: 8909
Location: San Francisco
 
Banned
@oopsclunkthud avatar
3:5
Joined: UTC
Posts: 8909
Location: San Francisco
UTC quote
watching with great interest.

have you encountered any issues with ignition noise? I used an Arduino for a time/distance rally computer and had to run resistor plugs or it would freak out as soon as the bike started.
@qascooter avatar
UTC

Ossessionato
79 P200E (Ruby), 62 Allstate (B-62)
Joined: UTC
Posts: 4168
Location: Florence, OR
 
Ossessionato
@qascooter avatar
79 P200E (Ruby), 62 Allstate (B-62)
Joined: UTC
Posts: 4168
Location: Florence, OR
UTC quote
swiss1939 wrote:
When you get the pnp kit together I'll buy one!
Me too!
@charlieman22 avatar
UTC

Nedminder
62 VBB1T Round Tail W/ leaner sidecar
Joined: UTC
Posts: 4023
Location: california
 
Nedminder
@charlieman22 avatar
62 VBB1T Round Tail W/ leaner sidecar
Joined: UTC
Posts: 4023
Location: california
UTC quote
subscribed.
lemme know if you need anything welded.
🙂

BTW - Christopher's GPS board (bread board build) is still holding up and was working perfectly - when I had a motor.
Absolute game changer for capturing data.
UTC

Ossessionato
Vespas 1964 GS160, 1965 SS180, 1977 V9A1T, 1983 PX150E
Joined: UTC
Posts: 2537
Location: Siam
 
Ossessionato
Vespas 1964 GS160, 1965 SS180, 1977 V9A1T, 1983 PX150E
Joined: UTC
Posts: 2537
Location: Siam
UTC quote
Damn. I didn't know there were so many super-nerds here. I feel significantly inadequate.
@xantufrog avatar
UTC

Moderibbit
1980 P200E - "Old Rusty", 1976 ET3 Primavera
Joined: UTC
Posts: 8892
Location: Atlanta, GA
 
Moderibbit
@xantufrog avatar
1980 P200E - "Old Rusty", 1976 ET3 Primavera
Joined: UTC
Posts: 8892
Location: Atlanta, GA
UTC quote
Nice, I'll be following this. I love goofing around with microcomputers, but I've not gotten this ambitious!
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
oopsclunkthud wrote:
watching with great interest.

have you encountered any issues with ignition noise? I used an Arduino for a time/distance rally computer and had to run resistor plugs or it would freak out as soon as the bike started.
At the moment, there's no electrical connectivity. I'm using a 12v->3.3v opto-electric coupler for the tach sensor and have a Hall Effect sensor on order that I think will be an even better (more accurate, smaller, cheaper...don't even have to just Pick Two) option for the tach. I'm powering it off a USB battery pack for now, but will add a shielded USB port at some point and find out then, I guess.
charlieman22 wrote:
lemme know if you need anything welded.
🙂
Welded, I now have under control or will get under control.

If I wind up needing anything machined, though...you're my first call!
nomadinsiam wrote:
Damn. I didn't know there were so many super-nerds here. I feel significantly inadequate.
Who else is going to hang around talking about hotrodding sixty-year-old scooters on the Internet?

The ability to find a community of similar interests, no matter how obscure, was one of the original goals of the Internet. That, and Rule 34, but we don't talk about that.
@christopher_55934 avatar
UTC

Ossessionato
2007 Stella 225
Joined: UTC
Posts: 3547
Location: Rochester, Minnesota
 
Ossessionato
@christopher_55934 avatar
2007 Stella 225
Joined: UTC
Posts: 3547
Location: Rochester, Minnesota
UTC quote
If you need a second scooter or someone willing to help prototype let me know. I have a few Raspberry Pi's now. I could get a wireless zero with header no problem. I could also just use a pi 3.

I have been contemplating using one for a controller for headlights, turn signals etc.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
I also have been giving the questions of where to locate the Pi and how best to handle the fact that I'm going to have effectively two bundles of complexity (i.e. wiring): the sensor cluster and the display.

I thought about getting an Arduino and using it to drive the display, then connecting that to the Pi, either wired or maybe via bluetooth. While an Arduino can publish and subscribe MQTT topics, it still needs a gateway device, it can't act as its own. So using an Arduino as anything but a driver for the instrument cluster would require locally re-implementing a lot of what's already built on the Pi. That's not to say I might not still tackle something like that down the road, but for now, I think I'll just accept that I'm going to have some relatively thick wiring bundles (even 24ga wire adds up) that I need to get from the back to the headset.

Location-wise, I'm considering mounting it up under the seat. That will give me easy access when I need it, plenty of room, some vibration protection, and I can (relatively) easily run all the wiring down into the body and out to wherever it needs to go from there.

Next up, thinking about the panel. I ordered a variety of different LED's last night, various individual 5mm and some addressable micro-pixels, all RGBW (Red/Blue/Green/White) LED's and controllers, a couple of 8 LED RGBW sticks, and various other bits along with the rest of the sensors I should need.

I should have ordered some 40-pin stacking headers, too, but it was late and I just...forgot. Luckily, I should be able to just get those via Amazon, so no "shipping costs more than the parts" for me on that screwup.

And while I still can't seem to find a Pi Zero 2 W (the new model which was released literally the day after I ordered my Pi Zero), I did order a Pi4 last night which will replace an old P3 and provide me a dev environment where I can run the VSCode Remote module so I'm not coding in vi like I'm writing C on old UNIX systems again.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
Christopher_55934 wrote:
If you need a second scooter or someone willing to help prototype let me know. I have a few Raspberry Pi's now. I could get a wireless zero with header no problem. I could also just use a pi 3.

I have been contemplating using one for a controller for headlights, turn signals etc.
Once I'm through the initial Alpha build, I'll be happy to share my schematics and code.

I still have some major re-factoring of the object graph to do along with having almost no exception handling, which was fine for validating the design, but still a long way away from anything but the most lab-grade testing.

And I know jack squat about how best to stack the HATS and lay out the various breakout boards, so I have a fair amount of learning to do there, too.

The first rev is really going to be focused on telemetry capture, even though I'm already accumulating parts for the dashboard. I'm planning to keep my existing GPS Speedo since other than being a little tall, it works just fine, so I'll have two GPS'es on board. Go figure.

Okay...time to go buy some stuff on Amazon, but a few pennies in Uncle Jeff's pockets...
@orwell84 avatar
UTC

Ossessionato
Joined: UTC
Posts: 2876
Location: northern New York
 
Ossessionato
@orwell84 avatar
Joined: UTC
Posts: 2876
Location: northern New York
UTC quote
It's funny, I didn't know what a Raspberry pi was until yesterday. My older son was visiting a college and is interested in cyber security. We attended a presentation by the computer science/robotics department and it came up. Probably not his thing at all, but I was all ears.

I'm not a math guy, but have messed around a lot with pulse encoders, switches and rotary pots with my flight simulator and interfacing the simulator software with hand built controls. I have not had to get into the more advanced logic of the whole thing. It was quite a project getting all the hardware and software that was not meant at all to do what I was doing to work seamlessly. I failed trig in highschool but damn if I didn't remember enough of it to solve missing sides and angles 30 years later.

I love building and trouble shooting, whether it's a flight sim, VW bus, Vespa or learning how to cope crown molding the old school way. Once I get a hold of something like that, I am relentless and my brain won't let go.

I like your ideas. I was thinking about all the gauges I have on my VW bus. There is no way to log gauge readings while driving unless someone sits with a notepad and writes it all down. Neither of my kids wants to sign up. I guess I will have to hire a flight engineer for my bus.

Following along with your project and looking forward to your updates.
@oopsclunkthud avatar
UTC

Banned
3:5
Joined: UTC
Posts: 8909
Location: San Francisco
 
Banned
@oopsclunkthud avatar
3:5
Joined: UTC
Posts: 8909
Location: San Francisco
UTC quote
I used a hall effect sensor with a magnet on the front wheel to get the distance and speed. On the arduino I connected the sensor to an interrupt to make sure I didn't drop any rotations.
⬆️    About 28 days elapsed    ⬇️
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
It's been almost a month since I announced this project, and since then I've made a lot of progress, but also a lot of mistakes as I've fumbled my way to a workable prototype build.

One thing that I didn't realize until I'd made each successive mistake is how much of a n00b I am at building electronics. Getting to a working breadboard version was relatively easy. Writing up the initial software was also pretty easy.

But building the prototype boards? Brutal.

I built two prototype boards which just Didn't Work, which I mostly put down to poor soldering skills. I may still go back and re-visit them to see what I can figure out with some hindsight, but not yet.

In the past month, I've learned about soldering, de-soldering, tinning, when to flux, when not to flux, re-work, crimping, plus more about the various connectors you encounter but don't notice all the time than I ever thought existed. My respect for all the hardware hackers in Shenzhen has grown immensely, and it was pretty high to begin with.

I've also fought with K-type thermo-couplers and ultimately am going to be able to use my existing EGT sensor along with a spark plug CHT sensor, so that's two problems avoided after a fair amount of pain.

Yesterday, just as I thought that saw victory on the horizon, I managed to make enough of a mess of attaching the 40-pin connector to my GPS board that I had to cut the connector off with a saw, desolder 40 pins, then route around the damage I'd done to the board's connectors. In some cases, I was able to just shift to a working pin, but for the GPS itself, I had to run a wire to the next board, hence the orange wire you see in the photo below.

Eventually, I got it all working, but that was three profanity-filled hours of my life I'll never get back.

But I'm now at what I think is a working baseline prototype and I'm now onto the next round of problems, which is getting the throttle, clutch, and gear sensors actually connected to the bike.

The throttle & gear sensors are potentiometers, so I just need to be able to connect them to the throttle/gear selector and then hold them in place. I had the inspiration to use a selector box cover to hold the pot and I'm going to tack weld a blade for it onto the selector pin that'll seat into the split in the pot.

Naturally, I couldn't find a selector box cover to build with, so I ordered a few from along with a spare selector box in case I somehow screw that up.

For the throttle, It's going to be more straightforward, I think, since I don't expect I'll need to weld anything in place. I'm going to try to use the throttle tube holding clip as my center point, then fabricate a bracket that I can bolt to the headset. The challenge for that piece is going to be finding room for it, even in the relatively cavernous GL headset.

For the clutch, it's a simple pressure switch, but I'm not entirely certain how I'm going to attach it. I need to attach a mount point down by the clutch arm. I have a couple ideas for that, some of which involve just welding a bracket to the cases. I'll need a point of detection, which may be an extra pinch bolt on the clutch cable that presses/releases the switch (this would be the easiest to adjust I think) and a bracket mounted/held in place by the fine adjuster screw.

I'm sticking with my optoelectrical coupler firing off the AC out from the stator for now, but I have a hall effect sensor I'm going to experiment with as well.

Assuming that I get all that working, I'll be able to start generating telemetry, at which point I can get back to the question of what my backend data storage & visualization/analysis infrastructure should look like.

Note: If you're not at least a little bit of an IT Nerd, this next section may be a bit opaque.

I'm pretty committed to running my infrastructure in AWS, but do I want to keep it in Timestream (AWS' database for time series data) or move to something like ElasticSearch/OpenSearch (AWS' Elastic replacement) so I can run a Kibana dashboard on top of it for the visualization?

I've done some project work with Elastic/Kibana (aka "ELK Stack") databases in the now-distant past, so I'm kind've leaning that direction. It'll require running an EC2 instance, which isn't the end of the world, but will increase my monthly costs a bit compared to a serverless architecture and require that I actually manage an instance, which is something I'd prefer to avoid if I can.

The upside of this approach, though, is that if I ever thought it made sense to migrate my backend to an on-premises model, it'd make it relatively simpler to do. I'd still have to deal with setting up the MQTT capture & load infrastructure, though, so that probably will never happen. That stuff's a PITA.

Non-IT Nerds, it's safe to come back in the room now

In the meantime, I'm also going to start working on some on-bike instrumentation. Probably just simple warning lights and the like to start. At some point I'll probably buy a small LCD display to do something similar to what SaFis built above, but I don't really need that right now, but who knows what the future will bring. Eventually, I might even replace my bodged-in GPS speedo if I have something that I think is reliable enough.

I have another Pi Zero I'll use to start breadboard prototyping all that, though. The cool thing is that I can set that up as a subscriber to the MQTT message flow and receive/act on events as a separate process which I'll just move over to the on-bike Pi when I'm ready to install it.

And I still need to sort out the accelerometer. It's on the prototype and I can capture data off it, but need to code some calibration routines, plus I'm still interested in exploring the hall effect sensor reading a magnet on the flywheel as my tach, but that would be a straight swap with the existing tach, so it can probably wait.

And, as a final note for those who have stuck with me this long, I'd like to take a moment to talk about strippers...

Everyone got their heads back out of the gutter? OK, I'll continue. I picked up a cheap automatic wire stripper and it's been LIFE CHANGING. Just stick the wire in, squeeze the grip, and you have a perfectly stripped wire to whatever length you choose. When you're dealing with a constant stream of 22-24ga wires that need to be stripped to exact lengths for crimping or soldering, it makes a HUGE difference in speed and consistency of work.

Hopefully it won't take another month until there's enough progress for another update.
It was an insane amount of work and learning to get to this point.
It was an insane amount of work and learning to get to this point.
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
For throttle, i dont know if they exist.. and if they do what they would be called.. but what about a plunger switch that senses depth of plunge? Then you just find a way to attach it to the carb throttle cable or throttle plunger where the cable attaches to it. So that when you have throttle at rest, its at its zero mark and when you pull throttle to WOT its at its most depressed point and you can read its position everywhere between?

For sensing which gears you could take the shifter box, drill/dremel a small hole at the lowest point of each gear position's valley, fill it with silicone as insulation around the rest of the shifter gear wheel, then insert a copper or brass pin or rod (kinda like a fret on a guitar) at the center point of the dip to act as a contact for each gear which can be wired up to send signal to separate pins on the board. So each gear would have an insulated metal pin that contacts the shifter gear arm thing when its in that gear, and bam you know which gear its in! Granted lots of wires feeding off the top of the shifter wheel out the back of the box and back up to the controller.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
swiss1939 wrote:
For throttle, i dont know if they exist.. and if they do what they would be called.. but what about a plunger switch that senses depth of plunge? Then you just find a way to attach it to the carb throttle cable or throttle plunger where the cable attaches to it. So that when you have throttle at rest, its at its zero mark and when you pull throttle to WOT its at its most depressed point and you can read its position everywhere between?
That's essentially what I'm doing, only with a pot attached to the center of the throttle tube. I could do the same thing with a slide pot rather than a dial pot, but don't know that I have a good place to mount it unless I was able to attach it to the throttle cable inner between the pulley and the cable outer.

It also would require more precise matching of the length/size of the pot. I'd need to find one that had a travel distance that was just a little bit longer than the cable travel, which is going to be 35mm (so call it 40mm of travel) for my carb. I *know* I don't have that sort of room inside the headset and it's all a closed system past that point.

I'll definitely explore that option when I'm in there, but I don't know there's enough room for it to work or if the geometry will allow it, plus the travel would be carb-size-specific, whereas this will work out-of-the-box with any carb and pulley, other than needing to .capture the 0 and WOT values.
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
My thought was you attach it inside the carb box cause there is more room in there. And you can calibrate the range in software every time you remove and replace either the carb or the cable.

Here are some examples of the gear shifter sensors I was thinking. One was the suggested pin at the valley of each gear.. the other which might be better is to make the contact pin on one side wall of each valley. Then you just need to make sure it gets an closed loop signal from ground when each gear pin closes the loop.
sensor contact at the bottom of each valley.
sensor contact at the bottom of each valley.
sensor contact as a side wall for each valley
sensor contact as a side wall for each valley
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
and third option I just thought about after looking at photo of the selector box in detail.

insulator seat wedged in the gap between the two wheel plates.. with the contact point seated in the middle of the insulator.. then wires fed through holes drilled in top wheel plate to the contacts.
Forum member supplied image with no explanatory text
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
swiss1939 wrote:
My thought was you attach it inside the carb box cause there is more room in there. And you can calibrate the range in software every time you remove and replace either the carb or the cable.
Unless you're running a side draft carb...which I am. The other challenge I see with putting it inside the carb box is that it's a very dirty environment in there, which is not a good combination with sensitive electronics. So now I'd have to either find an environmentally-rated slide pot of the right size or somehow seal it up, neither of which are going to be easy. And that still assumes you have enough exposed cable to match the full throw distance. If you were running autolube, you could tie it to the autolube arm, maybe, but you still have the geometry issue that you're dealing with a (slight, but still there) arc versus a linear travel where you need fairly precise tolerances.
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
The contact-per-gear was my initial design thought, but it adds a lot of complexity because you have to monitor four different circuits, plus deal with contacts and mounting infrastructure and moving parts.

By attaching a pot to the batwing, I can just specify ranges to match each gear, plus eventually do things like identify a missed shift versus a worn gear or cruciform causing gear jumping.
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
chandlerman wrote:
Unless you're running a side draft carb...which I am. The other challenge I see with putting it inside the carb box is that it's a very dirty environment in there, which is not a good combination with sensitive electronics. So now I'd have to either find an environmentally-rated slide pot of the right size or somehow seal it up, neither of which are going to be easy. And that still assumes you have enough exposed cable to match the full throw distance. If you were running autolube, you could tie it to the autolube arm, maybe, but you still have the geometry issue that you're dealing with a (slight, but still there) arc versus a linear travel where you need fairly precise tolerances.
Yes the carb mounting option is dirty.. but seems the easiest as long as you can insulate the electronic sensor.

Did not think about side draft carb.. which makes this option dead in water.
@jackytwoshoes avatar
UTC

Enthusiast
'13 LML '70 Sprint Veloce
Joined: UTC
Posts: 92
Location: London
 
Enthusiast
@jackytwoshoes avatar
'13 LML '70 Sprint Veloce
Joined: UTC
Posts: 92
Location: London
UTC quote
Not sure what scoot this is going on, but regarding a clutch sensor: PX's and LML's have clutch safety switches for the electric starter. Could provide some useful inspiration
@swiss1939 avatar
UTC

Ossessionato
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
 
Ossessionato
@swiss1939 avatar
P208, Stella VMC Stelvio 187, Stella 150, VNX1T, V9A1T, V9B1T, 02 Sportster XLH1208
Joined: UTC
Posts: 4110
Location: Staten Island, NY
UTC quote
jackytwoshoes wrote:
Not sure what scoot this is going on, but regarding a clutch sensor: PX's and LML's have clutch safety switches for the electric starter. Could provide some useful inspiration
Thats essentially 1 position sensor at the lever. But is also another option.. modifying the headset and shifter handle to do essentially the same i was suggesting in the batwing, but in the shift handle instead. Remove the shift handle, drill into the side wall that sits flush against the headset side wall, glue some small magnets into the side wall on the shifter handle below the center point of each gear mark. then drill matching holes with magnets or sensors (whatever is needed) mounted on the headset side with wiring feeding from each sensor/magnet in the headset to the control board. Kinda like how the koso speedo uses two magnets on the wheel.. but instead you are just using magnets to signal when the shifter handle/tube is in each gear position.

EDIT: actually now that I think about it.. not sure how that would work. Cause your headset side sensor is a single point where the "in gear" mark is. So your opposite side magnets/sensors would need to be distinguished in some way.. not sure how.

Maybe different strength magnets can be recognized by the in gear marker sensor? Hence knowing which gear you are in?

Lipstick on a pig!
OP
@chandlerman avatar
UTC

Lucky
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
 
Lucky
@chandlerman avatar
76 Sprint V, 63 GL, 62 VBB, 05 Stella, 66 Smallstate
Joined: UTC
Posts: 9393
Location: Nashville

118 Days Since Last Explosion
UTC quote
jackytwoshoes wrote:
Not sure what scoot this is going on, but regarding a clutch sensor: PX's and LML's have clutch safety switches for the electric starter. Could provide some useful inspiration
It's going on my GL. I considered putting the button under the clutch lever. I still may, just trying to avoid more wires through an already-crowded neck.
DoubleGood Design banner

Modern Vespa is the premier site for modern Vespa and Piaggio scooters. Vespa GTS300, GTS250, GTV, GT200, LX150, LXS, ET4, ET2, MP3, Fuoco, Elettrica and more.

Buy Me A Coffee
 

Shop on Amazon with Modern Vespa

Modern Vespa is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com


All Content Copyright 2005-2024 by Modern Vespa.
All Rights Reserved.


[ Time: 0.0958s ][ Queries: 4 (0.0126s) ][ Debug on ][ 313 ][ Thing One ]