You are here

Duty siren via CAN bus listener?

2 posts / 0 new
Last post
dammfine
Offline
Last seen: 4 years 2 months ago
Joined: 2020-03-15 05:00
Posts: 3
Duty siren via CAN bus listener?

So, to supplement my DIY Onewheel, I want to build a "siren" that increases in volume and pitch with increasing motor duty, being fairly quiet at 50% duty and absolutely banshee at 80% duty. I'd prefer to implement it outside the VESC because I don't really want to mess with the VESC software, I'd rather leave it 100% dedicated to motor control.

Two questions:

  1. I assume that something like an Arduino with a CAN bus interface is a good way to observe the motor duty and control the siren. Is it?
  2. Is there any particular kit that could get me going quickly? I have some Arduino experience from ages ago. But a smaller chip would be fine with me as long as the programmer isn't too expensive.

Thank you :")

-Ben

 

vadicus
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

If you use something like Arduino, you can get the COMM data from VESC via UART, map the duty cycle value to the PWM singal that goes to the siren.

Here is a good example on how you can stream data from VESC:

https://github.com/SolidGeek/VescUart 

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)