Question about difference between Photon and Photon 2

Back in 2018 I used a Photon and a Carloop can-hitch to make a can bus simulator for an old car I retrofitted a Toyota Prius electric power steering (EPS) column into. Basically I programmed the Photon to output a set engine speed and wheel speed through the can-hitch module to the can bus wiring to the EPS control module so it thinks its still in a Prius.

I am in the process of setting up a second one of these on another older car and the Photon has been replaced by the Photon 2 and is shut down and no longer selling anything. I can buy a CAN transciever similar to the can hitch Carloop sold basically this: SN65HVD230 CAN Board Accessory board used for connecting MCUs to the CAN network, 3.3V, ESD protection

My question is will the Photon 2 support this combination. I assume the Photon sent a serial data signal the the tx/rx pins on the can hitch/ waveshare can module, and it converts the serial data to the CAN high and low needed to interface the EPS.

I saw something posted in the documentation about migrating from Photon to Photon2 this:

CAN (controller area network)

The Photon supports CAN on pins D1 and D2. There is no CAN on the Photon 2 or Gen 3 devices (except the Tracker).

  • The Tracker SoM includes CAN via a MCP25625 CAN interface with integrated transceiver.
  • Both the MCP2515 and MCP25625 work with the library used on the Tracker and can be used to add CAN to the Photon 2.

but I am not that technically savvy to figure out if the Photon 2 will work for me or if I need something else.

You have highlighted the solution in your post - use a CAN bus transceiver with the library indicated. You need to be mindful that the pins on the Photon2 are only 3v tolerant so depending upon the IC used (a module I would suggest) you may need a logic level shifter (5 to 3v). Fascinating use case.

Yes, you can use the MCP2515 or the MCP25625 on the P2, Photon 2, or M-SoM (RTL872x) to support CAN. Those chips use 3.3V logic and do not need a logic level shifter.

TimC, I'll be following this closely! I actually am working on effectively the same project as you, same steering hardware, but just going into a different vehicle. I originally put in the EPS long before I knew that it was possible to simulate the signals needed to get the ECU out of its limp mode. Eventually found your Threads on carloop and tried to make sense of your code, but by that point all the hardware (the photon 1 and carloop canhitch) had already been discontinued. I'm back on the project now and excited to see that your semi active again. Trying to figure out what hardware to use now, and as I'm as green as they come to coding, I hope I can get some insight from you once you have something running with current hardware

Also a question for rickkas7, would the Argon work the same as the photon 2 in terms of compatibility with the MCP2515, or would I need to get a photon 2?

The MCP2515/MCP25625 will work on all Particle devices, including all Gen 3 devices (Argon, Boron, B-SoM) and Gen 4 (P2, Photon 2, M-SoM).

The Tracker One and Monitor One have a MCP25625 built-in and are a Gen 3 devices (nRF52840 MCU, same as Argon).

Awesome, thank you for the quick response. I suppose I have a few options then, which is nice. I have to wonder if there's any difference in difficulty in terms of coding with the Argon + MCP2515 vs using a Tracker or Monitor with the built in MCP25625. I guess I'll likely just have to make a decision on hardware and just go from there.

The coding is exactly the same. The MCP25625 is just a MCP2515 that has the CAN PHY layer built into the chip. With the MCP2515 you need to add an external PHY chip.

Scquest, please respond or pm me if you do get this working. I'm interested in how it turns out for you. I'm a novice when it comes to coding and electronics, but I have a strong understanding of the basics due to my job as an auto tech, and my hobbies of cars and HAM radio. I have bought a couple of photon2's to play around with as well as the waveshare sn65hvd230 can transceiver board I linked to above. The original can hitch used a sn65hvd232 can transceiver and appears very similar to the waveshare board. The only difference I see between the two tranceivers is the 232 has no standby mode and the 230 can be put in a low power standby mode.

This has been a back burner project for me but I may be dusting it off in the next few weeks. I have a spare column and control module, so I may flash a photon2 and wire it to the waveshare board and see what happens on the bench. If I do I'll try to respond back. The original setup has been working flawlessly in my 67 Fairlane since 2020. I originally installed it in 2018 then the torque sensor in the Prius column died so I went back to hydraulic, the old bendix ram assist system, but I got tired of chasing leaks so I got a new used column and redid everything in 2020. Probably have 10000 miles since then.

@TimC I can't seem to figure how to private message on these forums, so I'll just reply here.
After a little bit of a stall I actually ended up buying an original photon since I'd originally bought the waveshare CAN adapter that you had posted on the car loop forums. It took me a little while to figure out how to compile everything between the code you posted on carloop and the additional libraries, mostly just unfamiliar with the IDE. Long story short I got to test it this weekend and it seems to be working! Can't thank you enough for the work you did with the code and testing. I'm still interested in figuring out how to make one of these gen 2 devices work as well either as a backup or for another vehicle, so please let me know how your progress goes. I have a lot to learn in terms of coding before I think I can truly make sense of a lot of this stuff.

That's great you got it working, I'm just getting back on experimenting with mine. I have a photon2 and the waveshare board, but I just ordered some mcp2515 boards that have a built in can transciever like the waveshare. That should convert the photon2 to can since the 2 doesn't have built in can like the original photon. I already have my extra column set up on the bench, just waiting for the mcp2515 to show up so I can figure out how to wire it and what needs to be changed in the code such as library differences to get it working.

Like you I want to be sure I have a working backup in case something happens to the one I'm running, and preferably it will be a backup that is still in production so I can buy parts to make it again, which is why I'm back on this project. I'm also looking for another car to build now that the original Fairlane is nearing completion, and it would be nice to have this ironed out for that future project too.

I will try to post either here or back on and/or in a few other forums once I get the bugs worked out, that way it will be easier to google and find the solution for other hot rodders. I have recently gone through my original code and re-commented it to make it easier to decipher and to explain how I came to the can bus data that I used and how to change it if you want to experiment with different wheel speed inputs to change how the EPAS responds, since it has 3 different assist maps (levels) depending on speed. The current code is max assist like the Prius uses in a parking lot 0 to 10 - 15 mph. Mid assist is 15ish to 45 ish and minimal assist is 45mph +, which is the same assist in the original fail safe mode. There is also a variable "dead band" around the center position, with the widest band at min assist and no dead band on center with max assist. So by playing with wheel speed you can adjust the EPAS to your liking. Or someone can try to incorperate a speed signal and make it automatic like the Prius but that's way above my pay grade :laughing:

If this link works this is my updated code for the current photon(1) and carloop can hitch. It has the updated comments.