• Required reading for all forum users!!!

    Welcome!
    Register to access the full functionality of the GSResources forum. Until you register and activate your account you will not have full forum access, nor will you be able to post or reply to messages.

    A note to new registrants...
    All new forum registrations must be activated via email before you have full access to the forum.

    A Special Note about Email accounts!
    DO NOT SIGN UP USING hotmail, outlook, gmx, sbcglobal, att, bellsouth or email.com. They delete our forum signup emails.

    A note to old forum members...
    I receive numerous requests from people who can no longer log in because their accounts were deleted. As mentioned in the forum FAQ, user accounts are deleted if you haven't logged in for the past 6 months. If you can't log in, then create a new forum account. If you don't get an error message, then check your email account for an activation message. If you get a message stating that the email address is already in use, then your account still exists so follow the instructions in the forum FAQ for resetting your password.

    Have you forgotten your password or have a new email address? Then read the forum FAQ for details on how to reset it.

    Any email requests for "can't log in anymore" problems or "lost my password" problems will be deleted. Read the forum FAQ and follow the instructions there - that's what we have one for...

  • Returning Visitors

    If you are a returning visitor who never received your confirmation email, then odds are your email provider is blockinig emails from our server. The only thing that can be done to get around this is you will have to try creating another forum account using an email address from another domain.

    If you are a returning visitor to the forum and can't log in using your old forum name and password but used to be able to then chances are your account is deleted. Purges of the databases are done regularly. You will have to create a new forum account and you should be all set.

1st generation AUTO cancel TSCU "banging the bits"

Status
Not open for further replies.
The Arduino NANO is a good platform for a project like this. Both analog and digital I/O and pretty easy to program. Any micro controller will require some amount of a learning curve but they're pretty basic. Language support will vary but most of these will use some form of a "C"ish language. Tiny BASIC is ported to a lot of hardware platforms as well.

There's even an event driven programming platform that might be very applicable to a project like this. The benefits of programming using an event driven software platform is pretty obvious in an environment where switch/pulse input capture is beneficial. Should make programming a bit easier.
Thanks for the information.

I've been doing a little bit of reading the last couple of hours and it looks like the Arduino may be a better choice than the Pi. What I was worried about was trying to multitask several operations at once. Maybe I should just stick with using interrupt handling.

I've a bit of learning to do...
 
The Arduino NANO is a good platform for a project like this. Both analog and digital I/O and pretty easy to program. Any micro controller will require some amount of a learning curve but they're pretty basic. Language support will vary but most of these will use some form of a "C"ish language. Tiny BASIC is ported to a lot of hardware platforms as well.

There's even an event driven programming platform that might be very applicable to a project like this. The benefits of programming using an event driven software platform is pretty obvious in an environment where switch/pulse input capture is beneficial. Should make programming a bit easier.

I have not even played with the few Arduinos (two UNOS and two NANOS) I have and probably will not do much other than kick the tires on them. I will use them to boot strap into the Atmel development platform.

However, since you linked the QL website, I'll mention that I have been wanting to do a project using QF but it has been on my long term to do list (since 2004 infact). I have looked at and watched this product mature and it is very impressive. I have even come to the conclusion that most embedded engineers should immerse themselves into it just to see what "best practices" look like for embedded code development.

In the meantime I have using UML from the first version of Rational Rose (V1.0). to do OOD code design (refactoring legacy C with OOD and C++). Once integration is completed I'm going to go back and try and clean up the diagrams and autocode the C++ headers. With that done, I'll be able to slide into the various versions of QF. I have been a strong proponent of model based design and state diagram implementation for a very long time. Back in the 1980's this stuff did not exist and you did it all by hand. The QF tools are amazing. There are others but the cost is through the roof not to mention the learning curves. The Rational Rose stuff has now been aquired by IBM who have created a tool suite that is truly a Tower of Babel. :(
 
Thanks for the information.

I've been doing a little bit of reading the last couple of hours and it looks like the Arduino may be a better choice than the Pi. What I was worried about was trying to multitask several operations at once. Maybe I should just stick with using interrupt handling.

I've a bit of learning to do...

If you need Multi-tasking you are making it too complicated. A single infinite loop is all you need and will be easier to do and harder to screw up. If you want to learn about multitasking or RTOSs then go for it, but certainly not necessary. You will probably need(read prefer) a timer interrupt for the Speed input but I doubt it is absolutely necessary. The rest of the inputs are slow switches.
 
There's even an event driven programming platform that might be very applicable to a project like this. The benefits of programming using an event driven software platform is pretty obvious in an environment where switch/pulse input capture is beneficial. Should make programming a bit easier.
Which is what I originally had in mind.

I would like to take three differing events, the initial event, is from the operation of the turn signal switch. The second event, exceeding a low level frequency threshold, will be used to trigger a third event, one that counts a certain number of pulses (distance), before pulling an output high or low to cancel the turn signal operation.

http://www.scriptoriumdesigns.com/embedded/timers.php
Compare/Match Registers

Compare registers (sometimes also called match registers) hold a value against which the current timer value is automatically and continuously compared. A compare register is used to trigger an event when the value in the timer register matches the value in the compare register. If the timer/counter is configured as a timer, using compare registers will let you generate events (output pin changes and/or interrupts and/or timer resets) at known and precise times. If the T/C is configured as a counter, the compare registers can generate events based on preset counts being achieved.

All the rest of the components will be discreet except for the above used to cancel turn signal operation by time, speed or distance. That way someone can build a replacement unit with just manual operation, or add on the self cancelling operation as the factory had intended.

Place holder. http://www.mikroe.com/products/view/285/book-pic-microcontrollers-programming-in-c/
 
Last edited:
That is the intent.

The enclosure and possibly having to populate the board yourself is an entirely different matter.
 
My big push is over for a while ; at least till next year but I'm still wound up so I powered up one of the knock off nanos I have. 5 minutes for the driver to install, me to find an install I had done sometime back, and compile the sketch and download it .you do have to setup the board , chip and com port but this is pretty easy. In fact it is usually harder to install the drivers but this uno seemed to use a real FTDI chip for USB so not a hickup.
 
Well after being motivated with the nano the other night, I powered up the three UNO's I bought off of ebay (well over a year ago :)) and they all worked as well. Funny I was expecting these to all be cheap knock offs with no preloaded loaders. Well now I'm really motivated to see how hard it is going to be to get the wireless connected over Bluetooth using an HC-5 (Arduino NANO to Win 7 and Hyperterminal over Bluetooth). Windows was much more trouble that the HC-5. It works well, at least at 9600 baud. I have not tried anything faster. :)

All the mods I did we just like writing "C" so that familiarity was comforting.


I also kicked around the Atmel Studio 6.1. It does use VS API but certainly has a different set of tools.
 
Last edited:
Well after being motivated with the nano the other night, I powered up the three UNO's I bought off of ebay (well over a year ago :)) and they all worked as well. Funny I was expecting these to all be cheap knock offs with no preloaded loaders. Well now I'm really motivated to see how hard it is going to be to get the wireless connected over Bluetooth using an HC-5 (Arduino NANO to Win 7 and Hyperterminal over Bluetooth). Windows was much more trouble that the HC-5. It works well, at least at 9600 baud. I have not tried anything faster. :)

All the mods I did we just like writing "C" so that familiarity was comforting.


I also kicked around the Atmel Studio 6.1. It does use VS API but certainly has a different set of tools.

This is just making me want to pull out all of my old AVR based dev boards to play with... Maybe time for some IoT projects
 
This is just making me want to pull out all of my old AVR based dev boards to play with... Maybe time for some IoT projects

Finally got my account setup on the Atmel website(the server was not sending my email confirmation). I was browsing some of the code last night and it certainly seems to be written much better than some other examples I have seen (like the code for NXP which is built includes an entire ARM development suite without using CMSIS).

I'm downloading this and the GNU tool chain in the Atmel Studio now.

Arduino IDE for Atmel Studio
 
Last edited:
Bump... Would like this thread to keep going. I've been doing some research on the Arduino and the Raspberry PI. I have both and am working on some projects with implementing both. Working on interfacing both to create a Homebrew automation platform but would still like to see the Arduino as a an easy solution to a turn signal controller. If this doesn't progress then I'll go ahead and implement a solution myself. These micro controllers are so much fun to work with and are very low cost. I'm amazed at how cost effective they are.
 
Love the Pi and would love to implement something with them as well. Even something as simple as an eye catching "chasing" LED signal array and/or a modulated brake like flash. Sure there are off the shelf available units that do this, but half the fun is the tinkering! ;)
 
While this would be overkill for a TSCU, I just got it yesterday and I'm pretty blown away as well. It is $50 but will replace what I would spend $1000 on 10 years ago and $2500 20 years ago. An size is no comparison (36x36mm with 30x30mm mounting holes). This is based on teh newer Cortex M4 which is supposed to be 50% faster than the not so old M3

Compare the STM32 F1 (M3) to the STM32 F3 (M4)!!

http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32
http://seriouslypro.com/spracingf3

A primary issue with productizing anything is the packaging. Sure the microcontrollers are super mini but you need to still attach it. The SP Racing F3 would be 1/2 the size (or less) if it was not for all the connectors on it. So packaging includes respinning the open source Arduino or whatever platform you are using to get rid of connectors and achieve higher integration.

Then you have to get to a certain threshold on volume and before you just send in your Gerbers and BOM and get assembled PCBs back.
 
Last edited:
Been off the forum for a while... Too many things happening to mention here but was curious if this project ever got built? If not, I may go ahead and take it on for the fun of it. Been working with the Adafruit Pro Trinket for a while and it seems like a good match for this. Very compact, lots of I/O and easy to program.
 
Been off the forum for a while... Too many things happening to mention here but was curious if this project ever got built? If not, I may go ahead and take it on for the fun of it. Been working with the Adafruit Pro Trinket for a while and it seems like a good match for this. Very compact, lots of I/O and easy to program.

That or the NANO (I have a few ebay specials) is what I would use to do a prototype.
https://www.arduino.cc/en/Main/ArduinoBoardNano

https://www.adafruit.com/products/2...AgVVqWBYpKgsrrO01Opw5YUesKV19XdMt4aAqEa8P8HAQ

In reality is this could be done with a 8-10 pin controller and a few protection discretes. :)

http://www.atmel.com/products/microcontrollers/avr/tinyavr.aspx

I'm working on a few other projects myself, including spinning another production run of the SSPB. I have been using KiCAD which is free for download and it has been dramatically improved since the last time I used it two years ago. I will be starting a new layout this week.

http://kicad-pcb.org/help/documentation/

https://www.youtube.com/watch?v=wRolB1my6fI
 
Last edited:
I've used both the Nano and Kicad and do like both. I currently have 8 or so of the Trinket Pro's laying around so that's what I was going to work with. The nice thing about the Nano is that it does have a native USB interface while the Trinket Pro does not. Adafruit did cobble together a software solution for USB download but it takes up some additional program space. The advantage of the Trinket Pro is it does have a little bit smaller footprint and does come in both 3.3V and 5.0V versions while being 98% Uno compatible sketch wise.

I guess nobody is wanting to take this on so I'll do some Tinkering (pardon the pun) and see what I can come up with. My goal would be to have a durable turn signal controller that's wire for wire compatible with the existing controller. The nice thing about doing the programming would be having complete control over the timing and speed trigger. The stock controller always shuts down on me too soon and I need to reset it before I get bellow the 9mph threshold.:(

As I understand it the stock control unit utilizes 7 wires. Two of which are power and ground, two are for the reed switch input, one is an output to the relay and two are inputs for cancel and start. I've seen several diagrams with errors on them in the service manuals but this is what I think is correct:

b50gGb.jpg
 
I think most of my source information came from here:

http://www.thegsresources.com/_forum/showthread.php?154528-LED-Flasher-Unit-amp-Auto-Cancelling

In the current board I'm doing I created several hierarchical sheets representing the 4-5 portions of the Main board I'm designing (power and signal distribution) and can then add additional sheets for external components including a mezzanine footprint for the main computer. It is a nice way to organize the design and consolidate various design documentation elements. You can even insert pictures right on the schematic which helps keep track of connectors and various other stuff. I just downloaded FreeCAD last night but that will have to wait till a little later.

Again, if you can do a PCB design, then the AT Tiny's are the obvious "production" choice as opposed to doing a mezzanine design. Of course working through the design with a NANO/Trinket on a protoboard is super simple to flesh out the S/W.

I'm assuming that you are not thinking of running wires right off this Tricket to run a TSCU without any protection?
 
I'm assuming that you are not thinking of running wires right off this Tricket to run a TSCU without any protection?

No I wont be doing that. I'm planning on reverse voltage and over voltage protection of the power supply input using a reverse polarity protection diode inline with the power supply along with a zener diode to clamp the input to the controller at ~9V. Logic level I/O protection will basically be like this on the DIO pins:

kMcblr.gif


Output driver to the relay will probably be MOSFET. Could use a simple transistor switch but I like working with MOSFETs and have a ton of them laying around. Some experimentation will have to be done to verify timing and speed control using the stock reed switch but that's what makes DIY fun.;)
 
Status
Not open for further replies.
Back
Top