Ducati.ms - The Ultimate Ducati Forum banner

41 - 47 of 47 Posts

·
Registered
Joined
·
30 Posts
Discussion Starter #41
Hi Chris,

Thx! I did already found some errors in the schematics, so I need do some rework. I 'forgot' to handle the voltage difference between the USB Host chip (3.3v) and the ATMega328. (5v). So I'm adding two logic level shifters to compensate (74HCT125D and SN74AHC125D). this will take some time to redesign the PCB :confused:

  • Oil: Thx for the link, it was a bit off a guess that it was only 12v active HIGH, but now it is confirmed.
  • Voltage protection: I need to make sure that reading the 12v do not backfire on my ATMega. There is a lot of opinion out there (use opto couplers, no voltage divider, use voltage dividers, no problem if there isn't any load, use a zener divider, etc). So this makes me a bit on worried. But will see if the voltage divider will hold.
  • For reading the Can data, I've selected the PESD1CAN-UX to do the protection, which is also a basic part @ JLCParts
  • CANBUS transceiver: Correct, al lot of MCU's still need a transceiver, but i also need a controller in this setup. That could be a future change. I think a found that blog post in the past, didn't knew it was yours :)
  • turn signal: Yes, pin 17 is turn right and left, the table is missing that note. 12v means right, 0gnd means left. floating means nothing is selected.
  • upgrade MCU: I'm not looking for wifi and BT at this point. The extra speed could by handy but not what really need. The project can go two ways:
    • It's a phone holder where you can remove your phone, in this case you would need to power the phone, so wiring is USB is still needed, so why not use the data line as well. Much more reliable. There are ways to program ATMega from a Android device, this could be future upgrade. The phone has BT capability, so you can still connect a headset or something.
    • It's an all integrated dashboard. I was thinking about using a dragonboard 845c or HiKey 970 for android part. But then you need to add a TFT screen and 4G shield. If you calculate the price for these parts, it's way cheaper to use a midrange phone and embed it and the phone will bring wifi/BT/4G. It feels a bit off, but at this point it still looks like the right option. Building my own snapdragon based PCB really is a bridge to far for me ;)
  • Immobilizer: Not a dump question, I did a small test a while back. I powered off the Arduino and the engine didn't stopped. But it wasn't a long test, so at this point I'm sending them continuously, but I do not know if this is required. It is on my checklist to find out, but this is easily changed in code, so it bit lower on the list.
 

·
Registered
Joined
·
373 Posts
User Interface is my biggest hangup with these embedded projects. I've decided going forward, at the minimum, all my projects will use the m5stack since it neatly bundles: ESP32, display, 3 buttons, and a professional enclosure. Links: m5stack Digikey adafruit Interestingly enough, some m5stack models come with a 9-axis motion sensor.

For non-nerds, user interface is UI ... or make it graphical and it is GUI. To me, UI is the biggest aspect of technology. How it interacts with people is how usable something is. ATMs made a huge leap in UI with the "Fast Cash" menu item. Get your money, don't click through a hundred things.
 

·
Registered
Joined
·
30 Posts
Discussion Starter #43
UI is the reason I was trying out the MapBox SDK. They have a Mapbox Studio where you can style and customize the maps so they fit your application. I looks really nice.
these past days I redesigned the PCB with the logic level shifters. Pricing of a assembled PCB is now about 80 dollar. Because there are a lot of parts on the PCB which potentially all can go wrong and the PCB iteration price is quit high, I decided to try out the STM32. It will save at least 4 IC's and some capacitators/resistors. There isn't a lot of documentation about the android ADK library, but i managed to get it working based on this old library.
It will set me back a bit in the overall progress. I need to learn a new platform, the IDE and and redesign the PCB based on a 3.3v chip. But it is way faster, has all the features I want on a single chip, widely used.

The M5stack is also a really nice platform, I didn't know about it. Thanks! It has an usbhost and canbus stack, and a small form factor. I could design an pcb that does the 12v tot 5v conversion, read the pins and fits the pinout of the Ducati. something to think about for the weekend ;)
 

·
Registered
Joined
·
7 Posts
Truly awesome,
have some guys here doing a lot with gps and mapping, their software only works on apple(cough),At the moment.
with your permission i will forward this thred to software and engineering and see if they can help.
I WANT ONE.
 

·
Registered
Joined
·
30 Posts
Discussion Starter #45
Truly awesome,
have some guys here doing a lot with gps and mapping, their software only works on apple(cough),At the moment.
with your permission i will forward this thred to software and engineering and see if they can help.
I WANT ONE.
Thx for the compliment and Yeah sure, all the help is much appreciated.
The current status is iterating through the pcb design. I’ll hope I can order a Prototype this month to find out all of my mistakes 🤣
 

·
Registered
Joined
·
30 Posts
Discussion Starter #46
So, today I ordered my first pcb @jlcpcb. I’m really exited and also a bit worried that I missed some crucial stuff.
It is partically assembled with basic components from jlcpcb.
it is based on the stm32f405. I hope it will arrive begin September and then I need to add quite a few parts. So let’s hope it all works out...
991672
 

·
Registered
Joined
·
30 Posts
Discussion Starter #47
So the boards arrived last week and they look really nice!

992945

Luckily I had some time to solder (had some troubles soldering, but hey, it works!) and to test :
992944


There is a lot of good news and also some bad news. The good news is that all the complex stuff is working. This is completely above my own expectations! Steady power, @5v and @3.3v. The STM is programmable and responding nicely. Canbus and USB connection are working independently from each other. Headlight control, reading the mode button, passing button and left and right signal buttons all work. As well as powering the speed sensor at 5v.
But as expected ordering a first prototype board, I also some mistakes:
- I messed up the motor connector pin layout :cry::eek:. Only pin 1 is correct the rest is in the wrong order.(horizontal pin numbering instead of vertical pin numbering ). This is something that I fixed way back in December, but somewhere along the road it flipped back, and I didn’t notice it.... For debugging I can work around it, but it needs a new PCB order to work properly.
- Flipped a mosfet source drain connection for left and right blinkers, not a biggy but still an error
- The stm32 does not allow every gpio_analog port to connect to the internal ADC connector, so oil and gas isn’t measured correctly

There is still some testing and debugging to do, next steps are to test the CAN BUS and USB in a combined connection and do some more readouts on the bike.


During the wait, I also did a little impression on how the new navigation screen would look like:
992946


I would like to hear what you guys think of it.
 
41 - 47 of 47 Posts
Top