Adding blinking leds to mover

markor

Member
So I bought a bunch of bright leds for bicycle and am looking to putting them to my Ardumower to see where it is after sunset. I got rid of their own batteries and soldered always on bridge when power connected. They take in 3V and work just great with the 3.3V from the ardumower board. But I want to have couple of them (front and back) and make them blink in different patterns to tell different things. Like 5sec off 1 sec on for normal operation. 1sec off 1sec on for stuck. Only back led blink for charging etc.

It's all super easy with the Arduino Due directly by digitalWrite(40, HIGH) and low etc... But how can I get the different arduino due pin outputs through the ardumower mainboard? The pin40 seems to be connected to P40 "UserSwitch" on the ardumower mainboard. Can I send 3,3V there by digitalWrite P40 high? Which other slots/pins could/should be used to send the 3,3v to the leds when I want them on? I'd appreciate if someone can point me to right path without frying anything on the board.
 
After reading the schematics and some testing, it seems that I can connect at least 3 independently controlled leds to P13.3 - P13.5 . In arduino in same order pins 12 - 10 High/low. The P13 is the remote control port, but I don't use remote control so... Writing high/low to pin 12 in arduino code and having your led connected to mainboard in P13.2 (ground) and 13.3 (+), will blink the 1st led anyway I want.

I'm still at multimeter/theoretical level, but seems pretty promising. Use at your own risk if needed. ;)

C-ähnlich:
int pin = 12;
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(pin, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(pin, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(3000);                       // wait for a second
  digitalWrite(pin, LOW);    // turn the LED off by making the voltage LOW
  delay(3000);                       // wait for a second
}
 
Zuletzt bearbeitet:
After reading the schematics and some testing, it seems that I can connect at least 3 independently controlled leds to P13.3 - P13.5 . In arduino in same order pins 12 - 10 High/low. The P13 is the remote control port, but I don't use remote control so... Writing high/low to pin 12 in arduino code and having your led connected to mainboard in P13.2 (ground) and 13.3 (+), will blink the 1st led anyway I want.

I'm still at multimeter/theoretical level, but seems pretty promising. Use at your own risk if needed. ;)

C-ähnlich:
int pin = 12;
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(pin, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(pin, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(3000);                       // wait for a second
  digitalWrite(pin, LOW);    // turn the LED off by making the voltage LOW
  delay(3000);                       // wait for a second
}

Dont use delay() function. This freezes your Ardumower completely for 3 seconds.
 
Sorry for my late answer.

For Simple LED without big power (not bright leds for bicycle) ,you can use the free greenLed and redLed (P50 /wire 6 and 7 GND in 14)
01.png


For code simply search into AZURIT the word : pinLED and use as template for pingreenled and pinredLed.

Now for BIG POWER if you don't use REMOTE Control : P13 is a perfect level shifted connector and you can connect a 4 Relay board to it , or simple CMOS PCB:
If you use the remote it's also possible to use other level shifted out like P19 / P41 or a not use sonar.

cmosPCB.pngrelayPCB.png
For RELAY
VCC to +5VP
GND to GND
IN1 to P13 PinRemoteMow
IN2 to P13 PinRemoteSteer
etc....

For CMOS
VCC to +5VP
GND to GND
SIG to P13 PinRemoteMow

For the code
Search everywhere in the AZURITBER robomowGY87 branch code for userout1,userout2 etc and use this as template for your need.

 
@bernard Thanks for the reply. I was trying to pull HIGH the pins 6 and 7 on Arduino DUE, but I was only looking about the P10 status leds and didn't see them going on. I will have to take a closer look at it, always good to learn out more about or little toys ;) !
 
@bernard I though I could get off easy by using the 3,3V from the remote pins, but you are right, a relay board is needed. For anyone interested in tinkering here is what I have got so far.
  • my led is a 20mm led with forward voltage of 6,6V and forward current of 20mA
  • I'm drawing the power to led from mainboard 9V
  • 9V power (red) goes to relay common (middle)
  • 9V power (red) comes out of relay from left (when pin 12 is high) and goes to led resistors
  • before the 9V hits the led I need to add 120ohm (total) resistors to aim for 20mA. (9V-6,6V)/0,02A=120ohm
  • --------------------------------------------------------
  • the 5V goes from remote control (led control) to relay VCC
  • the control 3,3V yellow (pin 12 in code) goes from the remote control to relay in1
  • the ground (black) goes from remote control to relay ground
Might be doing a video of it all, but for now the proof of concept works great and led is blinking as I want it to.

relay_led2.jpg
 
Zuletzt bearbeitet:
Oben