Belt tensioner - Ca...
 
Notifications
Clear all

[Solved] Belt tensioner - Can't retrieve simhub's data into Arduino

4 Posts
2 Users
0 Reactions
345 Views
(@drv3r)
Active Member
Joined: 6 months ago
Posts: 5
Topic starter  

Hello,

I am trying to control a belt tensioner via an Arduino Minima R4 using a custom serial device. My difficulty is making my Arduino "listen" to SimHub output data.

I go through FlowSerialRead.h, ArqSerial.h and RingBuf.h

However I notice that simhub succeed to "listen" my arduino response (see attached screen below) 

Thank you for your help


   
Quote
(@drv3r)
Active Member
Joined: 6 months ago
Posts: 5
Topic starter  

I tried debugging to pinpoint what is going wrong. The buffer seems empty.

I have no idea what I should do to make it work
If you know an easir way to get data from Simhub, I'm all ears. Thanks.


   
ReplyQuote
(@admin5435)
Prominent Member Admin
Joined: 7 years ago
Posts: 736
 

Hi ! If you are using the custom serial device https://github.com/SHWotever/SimHub/wiki#custom-serial-devices-support as shown here you don't need any of that just reading from serial as any standard Arduino tutorial shows is enough.

A simple serial.read will do it.

Flow serial buffer and it's dependencies are completely specific to the Simhub Arduino sketch which adds a layer of crc and retries to avoid data corruption facing bad usb chips like some counterfeit ch340g.

 

If you plan to do a belt tensioner, you can also use the new motion plugin, it accepts any "serial devices" with precomputed effects.

You can also take inspiration from the existing simhub belt tensioner available here : https://www.simhubdash.com/diy-belt-tensionner/ you can throw away the hardware implementation and only keep the communication.


   
ReplyQuote
(@drv3r)
Active Member
Joined: 6 months ago
Posts: 5
Topic starter  

Hi Wotever, thank's for the advices

I managed to make it works with a SerialUSB.read and a Serial.parseInt, just like you said.

Regarding the Motion plugin, I use the Lebois tensioner system with torque control (a driver receive the analog signal from the arduino (+5V), which is interpreted to give the torque instruction to the motor). I think your plugins is designed for stepper with angle control only.

Thanks anyway for this suggestion.

Now that it's working, I just need to get a license to support your work and benefit from better tensioner resolution.

 


   
ReplyQuote
Share: